From 541cebdce97b1f518bf6b5f48572d8caf7ba1c4a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 11 Nov 2019 14:18:50 +0100 Subject: [PATCH] More curl-alike options --- lib/core/settings.py | 2 +- lib/parse/cmdline.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index cc76943fc..e856dc06e 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.30" +VERSION = "1.3.11.31" 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 b11af39d2..43c8d9900 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -145,6 +145,12 @@ def cmdLineParser(argv=None): # Request options request = parser.add_argument_group("Request", "These options can be used to specify how to connect to the target URL") + request.add_argument("-A", "--user-agent", dest="agent", + help="HTTP User-Agent header value") + + request.add_argument("-H", "--header", dest="header", + help="Extra header (e.g. \"X-Forwarded-For: 127.0.0.1\")") + request.add_argument("--method", dest="method", help="Force usage of given HTTP method (e.g. PUT)") @@ -166,9 +172,6 @@ def cmdLineParser(argv=None): request.add_argument("--drop-set-cookie", dest="dropSetCookie", action="store_true", help="Ignore Set-Cookie header from response") - request.add_argument("--user-agent", dest="agent", - help="HTTP User-Agent header value") - request.add_argument("--mobile", dest="mobile", action="store_true", help="Imitate smartphone through HTTP User-Agent header") @@ -181,9 +184,6 @@ def cmdLineParser(argv=None): request.add_argument("--referer", dest="referer", help="HTTP Referer header value") - request.add_argument("-H", "--header", dest="header", - help="Extra header (e.g. \"X-Forwarded-For: 127.0.0.1\")") - request.add_argument("--headers", dest="headers", help="Extra headers (e.g. \"Accept-Language: fr\\nETag: 123\")")