mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Patch for counter in --smoke-test
This commit is contained in:
parent
32dd4a938c
commit
921a53e314
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.0.9.12"
|
VERSION = "1.0.9.13"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
|
|
|
@ -53,16 +53,17 @@ def smokeTest():
|
||||||
if any(_ in root for _ in ("thirdparty", "extra")):
|
if any(_ in root for _ in ("thirdparty", "extra")):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for ifile in files:
|
for filename in files:
|
||||||
length += 1
|
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
||||||
|
length += 1
|
||||||
|
|
||||||
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
||||||
if any(_ in root for _ in ("thirdparty", "extra")):
|
if any(_ in root for _ in ("thirdparty", "extra")):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for ifile in files:
|
for filename in files:
|
||||||
if os.path.splitext(ifile)[1].lower() == ".py" and ifile != "__init__.py":
|
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
||||||
path = os.path.join(root, os.path.splitext(ifile)[0])
|
path = os.path.join(root, os.path.splitext(filename)[0])
|
||||||
path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
|
path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
|
||||||
path = path.replace(os.sep, '.').lstrip('.')
|
path = path.replace(os.sep, '.').lstrip('.')
|
||||||
try:
|
try:
|
||||||
|
@ -71,7 +72,7 @@ def smokeTest():
|
||||||
except Exception, msg:
|
except Exception, msg:
|
||||||
retVal = False
|
retVal = False
|
||||||
dataToStdout("\r")
|
dataToStdout("\r")
|
||||||
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, ifile), msg)
|
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
else:
|
else:
|
||||||
# Run doc tests
|
# Run doc tests
|
||||||
|
@ -80,9 +81,9 @@ def smokeTest():
|
||||||
if failure_count > 0:
|
if failure_count > 0:
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
|
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
|
||||||
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
|
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
|
||||||
|
|
||||||
clearConsoleLine()
|
clearConsoleLine()
|
||||||
if retVal:
|
if retVal:
|
||||||
|
|
|
@ -45,11 +45,11 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
|
||||||
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
|
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
|
||||||
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
|
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
|
||||||
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
|
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
|
||||||
9121fd574f559b5401d5529f0b602b04 lib/core/settings.py
|
7bf39beeda908ad06081385433db8567 lib/core/settings.py
|
||||||
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
|
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
|
||||||
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
|
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
|
||||||
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
|
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
|
||||||
21b9aa385c851a4e8faaff9b985e29b8 lib/core/testing.py
|
3c7478f279ed1b5645b4a75b29d4ac5d lib/core/testing.py
|
||||||
424a6cf9bdfaf7182657ed7929d7df5a lib/core/threads.py
|
424a6cf9bdfaf7182657ed7929d7df5a lib/core/threads.py
|
||||||
53c15b78e0288274f52410db25406432 lib/core/unescaper.py
|
53c15b78e0288274f52410db25406432 lib/core/unescaper.py
|
||||||
6bdc53e2ca152ff8cd35ad671e48a96b lib/core/update.py
|
6bdc53e2ca152ff8cd35ad671e48a96b lib/core/update.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user