mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-25 07:29:47 +03:00
Fixes #5375
This commit is contained in:
parent
257c4d1c88
commit
069740139c
|
@ -994,7 +994,11 @@ def _setPostprocessFunctions():
|
||||||
raise SqlmapSyntaxException("cannot import postprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
raise SqlmapSyntaxException("cannot import postprocess 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):
|
||||||
if name == "postprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("page", "headers", "code")):
|
try:
|
||||||
|
argspec = inspect.getargspec(function).args
|
||||||
|
except: # `inspect.getargspec` was removed in PY 3.11
|
||||||
|
argspec = inspect.getfullargspec(function).args
|
||||||
|
if name == "postprocess" and argspec and all(_ in inspect.getargspec(function).args for _ in ("page", "headers", "code")):
|
||||||
found = True
|
found = True
|
||||||
|
|
||||||
kb.postprocessFunctions.append(function)
|
kb.postprocessFunctions.append(function)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user