From 3b3c2a5d0419b5f679d860d02a8c8cff21c81abd Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 7 Apr 2023 12:32:32 +0200 Subject: [PATCH] Fixes #5386 --- lib/core/common.py | 9 +++++---- lib/core/settings.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index c2ab0a0ed..83ab41178 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -5385,11 +5385,12 @@ def parseRequestFile(reqFile, checkParams=True): elif key.upper() == HTTP_HEADER.HOST.upper(): if '://' in value: scheme, value = value.split('://')[:2] - splitValue = value.split(":") - host = splitValue[0] - if len(splitValue) > 1: - port = filterStringValue(splitValue[1], "[0-9]") + port = extractRegexResult(r":(?P\d+)\Z", value) + if port: + value = value[:-(1 + len(port))] + + host = value # 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 3a1ffb448..99b5130b2 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.7.4.3" +VERSION = "1.7.4.4" 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)