From 069740139cc395522c92c8f4baf6c1526f171fc4 Mon Sep 17 00:00:00 2001 From: Roan Rothrock Date: Wed, 29 Mar 2023 21:05:42 -0500 Subject: [PATCH] Fixes #5375 --- lib/core/option.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 7fc2116df..6657f44ea 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -994,7 +994,11 @@ def _setPostprocessFunctions(): raise SqlmapSyntaxException("cannot import postprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex))) 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 kb.postprocessFunctions.append(function)