Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1522566

Browse files
committed
Somebody was fooling around (Issue #4357)
1 parent c1bf36b commit 1522566

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

lib/core/option.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -870,13 +870,16 @@ def _setPreprocessFunctions():
870870
raise SqlmapSyntaxException("cannot import preprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
871871

872872
for name, function in inspect.getmembers(module, inspect.isfunction):
873-
if name == "preprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("req",)):
874-
found = True
873+
try:
874+
if name == "preprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("req",)):
875+
found = True
875876

876-
kb.preprocessFunctions.append(function)
877-
function.__name__ = module.__name__
877+
kb.preprocessFunctions.append(function)
878+
function.__name__ = module.__name__
878879

879-
break
880+
break
881+
except ValueError: # Note: https://github.com/sqlmapproject/sqlmap/issues/4357
882+
pass
880883

881884
if not found:
882885
errMsg = "missing function 'preprocess(req)' "
@@ -1525,7 +1528,7 @@ def _createHomeDirectories():
15251528
if conf.get("purge"):
15261529
return
15271530

1528-
for context in "output", "history":
1531+
for context in ("output", "history"):
15291532
directory = paths["SQLMAP_%s_PATH" % context.upper()]
15301533
try:
15311534
if not os.path.isdir(directory):

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.9.22"
21+
VERSION = "1.4.9.23"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)