From 6df778743f9fa0ef15f4301686df5566b84bddb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Tue, 27 Oct 2026 09:17:37 +0100 Subject: [PATCH] Update related to the #6161 --- lib/core/common.py | 16 +++++++++++++++- lib/core/settings.py | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 6b72a3c8d..4b93d3ffd 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4108,6 +4108,19 @@ def getDaysFromLastUpdate(): return int(time.time() - os.path.getmtime(paths.SQLMAP_SETTINGS_PATH)) // (3600 * 24) +def jitEnabled(): + """ + Returns True if the experimental JIT compiler is active (Python >= 3.13) + + >>> jitEnabled() in (True, False) + True + """ + + try: + return bool(sys._jit.is_enabled()) + except: + return os.getenv("PYTHON_JIT") == '1' + def unhandledExceptionMessage(): """ Returns detailed message about occurred unhandled exception @@ -4128,7 +4141,8 @@ def unhandledExceptionMessage(): errMsg += "reproduce the bug. Developers will try to reproduce the bug, fix it accordingly " errMsg += "and get back to you\n" errMsg += "Running version: %s%s\n" % (VERSION_STRING[VERSION_STRING.find('/') + 1:], (" (%s)" % revision) if revision else "") - errMsg += "Python version: %s\n" % PYVERSION + # Note: experimental JIT (Python >= 3.13) has been behind a whole class of reports where an unrelated object ends up bound to a name + errMsg += "Python version: %s%s\n" % (PYVERSION, " (JIT)" if jitEnabled() else "") errMsg += "Operating system: %s\n" % platform.platform() errMsg += "Command line: %s\n" % re.sub(r".+?\bsqlmap\.py\b", "sqlmap.py", getUnicode(" ".join(sys.argv), encoding=getattr(sys.stdin, "encoding", None))) errMsg += "Technique: %s\n" % (enumValueToNameLookup(PAYLOAD.TECHNIQUE, getTechnique()) if getTechnique() is not None else ("DIRECT" if conf.get("direct") else None)) diff --git a/lib/core/settings.py b/lib/core/settings.py index e1c1939ac..04bd15383 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.10.20" +VERSION = "1.10.10.21" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" 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)