From 175dc5dfa4036cd2e5c04b0ad01e0b30a3700354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 17:00:27 +0100 Subject: [PATCH] Fix for -l Burp logs losing entry's scheme and port --- lib/core/common.py | 13 ++++++++++--- lib/core/settings.py | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index e3d59d4c6..0c3078237 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -5748,6 +5748,12 @@ def parseRequestFile(reqFile, checkParams=True): else: scheme, port = None, None + # Note: Burp's entry header line (e.g. '16:20:47 https://www.target.com:443 [1.2.3.4]') is right above the request's separator + if not isinstance(match, six.string_types): + _ = re.search(r"(?Phttps?)://[^\s/]+:(?P\d+)\s+\[[^\]]*\]\s*\Z", content[:match.start()].rstrip("=\r\n\t "), re.I) + if _: + scheme, port = _.group("scheme"), _.group("port") + if "HTTP/" not in request: continue @@ -5823,11 +5829,12 @@ def parseRequestFile(reqFile, checkParams=True): if '://' in value: scheme, value = value.split('://')[:2] - port = extractRegexResult(r":(?P\d+)\Z", value) - if port: + _ = extractRegexResult(r":(?P\d+)\Z", value) + if _: + port = _ host = value[:-(1 + len(port))] else: - host = value + host = value # Note: keeping port (if any) from e.g. Burp's entry header line # Avoid to add a static content length header to # headers and consider the following lines as diff --git a/lib/core/settings.py b/lib/core/settings.py index 4152cffa2..c089c737e 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.11.60" +VERSION = "1.10.11.61" 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)