From 95e6b6c0af764a9143199709fe39db9cf0685385 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 22 Aug 2019 11:41:06 +0200 Subject: [PATCH] Implements #3835 --- lib/controller/controller.py | 9 +++++++++ lib/core/settings.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index cabe5f76c..9bd97ad16 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -422,6 +422,15 @@ def start(): if not checkConnection(suppressOutput=conf.forms) or not checkString() or not checkRegexp(): continue + if conf.rParam and kb.originalPage: + kb.randomPool = dict([_ for _ in kb.randomPool.items() if isinstance(_[1], list)]) + + for match in re.finditer(r"(?si)]+\bname\s*=\s*[\"']([^\"']+)(.+?)", kb.originalPage): + name, _ = match.groups() + options = tuple(re.findall(r"]+\bvalue\s*=\s*[\"']([^\"']+)", _)) + if options: + kb.randomPool[name] = options + checkWaf() if conf.nullConnection: diff --git a/lib/core/settings.py b/lib/core/settings.py index 95a4bc050..2106878b4 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.8.19" +VERSION = "1.3.8.20" 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)