From a9de51380bd9086b5ad0a502c0a55779745ff01d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 31 Jul 2019 20:00:51 +0200 Subject: [PATCH] Implementation for #3845 --- lib/core/common.py | 4 ++-- lib/core/settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index e28cebf34..0a86df45e 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4995,7 +4995,7 @@ def parseRequestFile(reqFile, checkParams=True): else: scheme, port = None, None - if not re.search(r"^[\n]*(%s).*?\sHTTP\/" % "|".join(getPublicTypeMembers(HTTPMETHOD, True)), request, re.I | re.M): + if "HTTP/" not in request: continue if re.search(r"^[\n]*%s.*?\.(%s)\sHTTP\/" % (HTTPMETHOD.GET, "|".join(CRAWL_EXCLUDE_EXTENSIONS)), request, re.I | re.M): @@ -5020,7 +5020,7 @@ def parseRequestFile(reqFile, checkParams=True): newline = "\r\n" if line.endswith('\r') else '\n' line = line.strip('\r') - match = re.search(r"\A(%s) (.+) HTTP/[\d.]+\Z" % "|".join(getPublicTypeMembers(HTTPMETHOD, True)), line) if not method else None + match = re.search(r"\A([A-Z]+) (.+) HTTP/[\d.]+\Z", line) if not method else None if len(line.strip()) == 0 and method and method != HTTPMETHOD.GET and data is None: data = "" diff --git a/lib/core/settings.py b/lib/core/settings.py index c00567d75..09a1b58cb 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.7.43" +VERSION = "1.3.7.44" 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)