mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-05 00:03:44 +03:00
Minor patch
This commit is contained in:
parent
e22fab1945
commit
45c699e9cf
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.1.0"
|
VERSION = "1.3.1.1"
|
||||||
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}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -54,42 +54,42 @@ def smokeTest():
|
||||||
|
|
||||||
if not checkIntegrity():
|
if not checkIntegrity():
|
||||||
retVal = False
|
retVal = False
|
||||||
else:
|
|
||||||
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
|
||||||
if any(_ in root for _ in ("thirdparty", "extra")):
|
|
||||||
continue
|
|
||||||
|
|
||||||
for filename in files:
|
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
||||||
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
if any(_ in root for _ in ("thirdparty", "extra")):
|
||||||
length += 1
|
continue
|
||||||
|
|
||||||
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
for filename in files:
|
||||||
if any(_ in root for _ in ("thirdparty", "extra")):
|
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
||||||
continue
|
length += 1
|
||||||
|
|
||||||
for filename in files:
|
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
|
||||||
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
if any(_ in root for _ in ("thirdparty", "extra")):
|
||||||
path = os.path.join(root, os.path.splitext(filename)[0])
|
continue
|
||||||
path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
|
|
||||||
path = path.replace(os.sep, '.').lstrip('.')
|
for filename in files:
|
||||||
try:
|
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
|
||||||
__import__(path)
|
path = os.path.join(root, os.path.splitext(filename)[0])
|
||||||
module = sys.modules[path]
|
path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
|
||||||
except Exception, msg:
|
path = path.replace(os.sep, '.').lstrip('.')
|
||||||
|
try:
|
||||||
|
__import__(path)
|
||||||
|
module = sys.modules[path]
|
||||||
|
except Exception, msg:
|
||||||
|
retVal = False
|
||||||
|
dataToStdout("\r")
|
||||||
|
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
|
||||||
|
logger.error(errMsg)
|
||||||
|
else:
|
||||||
|
# Run doc tests
|
||||||
|
# Reference: http://docs.python.org/library/doctest.html
|
||||||
|
(failure_count, test_count) = doctest.testmod(module)
|
||||||
|
if failure_count > 0:
|
||||||
retVal = False
|
retVal = False
|
||||||
dataToStdout("\r")
|
|
||||||
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
|
|
||||||
logger.error(errMsg)
|
|
||||||
else:
|
|
||||||
# Run doc tests
|
|
||||||
# Reference: http://docs.python.org/library/doctest.html
|
|
||||||
(failure_count, test_count) = doctest.testmod(module)
|
|
||||||
if failure_count > 0:
|
|
||||||
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:
|
||||||
|
|
|
@ -49,11 +49,11 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
|
||||||
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
|
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
|
||||||
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
|
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
|
||||||
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
||||||
488341156951968cd3d07c41a87e4c61 lib/core/settings.py
|
0128758c83a31ba80424336cc45f1e6e lib/core/settings.py
|
||||||
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
|
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
|
||||||
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
|
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
|
||||||
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
|
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
|
||||||
2f87870562ac9a79a5105a0e20fdbf9a lib/core/testing.py
|
a71b23612f2f2c7be8a843858408fdcc lib/core/testing.py
|
||||||
5ebd996b2a77449df90320847e30a073 lib/core/threads.py
|
5ebd996b2a77449df90320847e30a073 lib/core/threads.py
|
||||||
2c263c8610667fdc593c50a35ab20f57 lib/core/unescaper.py
|
2c263c8610667fdc593c50a35ab20f57 lib/core/unescaper.py
|
||||||
5bd7cd6553a4a1c85cbaaddc268108e4 lib/core/update.py
|
5bd7cd6553a4a1c85cbaaddc268108e4 lib/core/update.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user