From e75d75dbe686ece49f4367ffc406653fca79d779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Tue, 28 Jul 2026 21:58:51 +0200 Subject: [PATCH] Adding a minor comment --- lib/core/settings.py | 2 +- lib/parse/cmdline.py | 2 +- lib/utils/safe2bin.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 324f15cce..d3863c826 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.7.233" +VERSION = "1.10.7.236" 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) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 03bddb531..a4ceb7819 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -1171,7 +1171,7 @@ def cmdLineParser(argv=None): dataToStdout("[!] detected usage of long-option without a starting hyphen ('%s')\n" % argv[i]) raise SystemExit - for verbosity in (_ for _ in argv if re.search(r"\A\-v+\Z", _)): + for verbosity in [_ for _ in argv if re.search(r"\A\-v+\Z", _)]: # Note: list (not a generator) - the loop mutates argv (del), which would desync a live generator and leave a stray '-v' for argparse to choke on try: if argv.index(verbosity) == len(argv) - 1 or not argv[argv.index(verbosity) + 1].isdigit(): conf.verbose = verbosity.count('v') diff --git a/lib/utils/safe2bin.py b/lib/utils/safe2bin.py index d6004ef7a..1b7aa605d 100644 --- a/lib/utils/safe2bin.py +++ b/lib/utils/safe2bin.py @@ -55,6 +55,9 @@ def safecharencode(value): if isinstance(value, string_types): if any(_ not in SAFE_CHARS for _ in value): + # NOTE (checked twice, do NOT "fix" by deleting): this marker keeps an already-`\x`-carrying + # value (incl. getUnicode's 'reversible' \xNN) from double-escaping to `\\x` in console/CSV. + # Dropping it only swaps that for the rare literal-`\x`-in-data round-trip - a bad trade. retVal = retVal.replace(HEX_ENCODED_PREFIX, HEX_ENCODED_PREFIX_MARKER) retVal = retVal.replace('\\', SLASH_MARKER)