From 39ca71619c09f7300495d3f8c8c0b6816635aca9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 11 Nov 2019 12:43:45 +0100 Subject: [PATCH] Trivial patch --- lib/core/common.py | 3 +++ lib/core/settings.py | 2 +- lib/utils/crawler.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 7ad0daf50..bc1931461 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4476,6 +4476,9 @@ def findPageForms(content, url, raise_=False, addToTargets=False): # flag to know if we are dealing with the same target host _ = checkSameHost(response.geturl(), url) + if data: + data = data.lstrip("&=").rstrip('&') + if conf.scope: if not re.search(conf.scope, url, re.I): continue diff --git a/lib/core/settings.py b/lib/core/settings.py index 8da169f1f..8ca09f7e7 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.11.27" +VERSION = "1.3.11.28" 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/utils/crawler.py b/lib/utils/crawler.py index 5079c3381..8c031cf35 100644 --- a/lib/utils/crawler.py +++ b/lib/utils/crawler.py @@ -215,7 +215,7 @@ def crawl(target): if target[1] in (HTTPMETHOD.GET, None): match = re.search(r"/[^/?]*\?.*\Z", target[0]) if match: - key = re.sub(r"=[^=&]*", "=", match.group(0)) + key = re.sub(r"=[^=&]*", "=", match.group(0)).strip('&') if key not in seen: results.add(target) seen.add(key)