mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-29 13:23:45 +03:00
Somebody was fooling around (Issue #4357)
This commit is contained in:
parent
c1bf36b876
commit
15225668d0
|
@ -870,6 +870,7 @@ def _setPreprocessFunctions():
|
||||||
raise SqlmapSyntaxException("cannot import preprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
raise SqlmapSyntaxException("cannot import preprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
||||||
|
|
||||||
for name, function in inspect.getmembers(module, inspect.isfunction):
|
for name, function in inspect.getmembers(module, inspect.isfunction):
|
||||||
|
try:
|
||||||
if name == "preprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("req",)):
|
if name == "preprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("req",)):
|
||||||
found = True
|
found = True
|
||||||
|
|
||||||
|
@ -877,6 +878,8 @@ def _setPreprocessFunctions():
|
||||||
function.__name__ = module.__name__
|
function.__name__ = module.__name__
|
||||||
|
|
||||||
break
|
break
|
||||||
|
except ValueError: # Note: https://github.com/sqlmapproject/sqlmap/issues/4357
|
||||||
|
pass
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
errMsg = "missing function 'preprocess(req)' "
|
errMsg = "missing function 'preprocess(req)' "
|
||||||
|
@ -1525,7 +1528,7 @@ def _createHomeDirectories():
|
||||||
if conf.get("purge"):
|
if conf.get("purge"):
|
||||||
return
|
return
|
||||||
|
|
||||||
for context in "output", "history":
|
for context in ("output", "history"):
|
||||||
directory = paths["SQLMAP_%s_PATH" % context.upper()]
|
directory = paths["SQLMAP_%s_PATH" % context.upper()]
|
||||||
try:
|
try:
|
||||||
if not os.path.isdir(directory):
|
if not os.path.isdir(directory):
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.4.9.22"
|
VERSION = "1.4.9.23"
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user