From bc5b6437009837c7dfc884274a6f48469ea68646 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 18 Apr 2019 11:18:00 +0200 Subject: [PATCH] One more improvement for #3587 --- lib/core/settings.py | 2 +- lib/parse/cmdline.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 8d506bc33..691f0eb1b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.3.4.22" +VERSION = "1.3.4.23" 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/parse/cmdline.py b/lib/parse/cmdline.py index 798fbb4cf..9f2fa1be2 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -855,6 +855,14 @@ def cmdLineParser(argv=None): elif argv[i] == "-H": if i + 1 < len(argv): extraHeaders.append(argv[i + 1]) + elif argv[i] == "-r": + for j in xrange(i + 2, len(argv)): + value = argv[j] + if os.path.isfile(value): + argv[i + 1] += ",%s" % value + argv[j] = '' + else: + break elif re.match(r"\A\d+!\Z", argv[i]) and argv[max(0, i - 1)] == "--threads" or re.match(r"\A--threads.+\d+!\Z", argv[i]): argv[i] = argv[i][:-1] conf.skipThreadCheck = True