diff --git a/lib/core/settings.py b/lib/core/settings.py index d25a969e0..c5b5b2a73 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.5.2.21" +VERSION = "1.5.2.22" 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 39676d89e..8efac88a7 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -794,6 +794,9 @@ def cmdLineParser(argv=None): parser.add_argument("--profile", dest="profile", action="store_true", help=SUPPRESS) + parser.add_argument("--localhost", dest="localhost", action="store_true", + help=SUPPRESS) + parser.add_argument("--force-dbms", dest="forceDbms", help=SUPPRESS) diff --git a/lib/request/connect.py b/lib/request/connect.py index 67eaf12a1..7c4e47bec 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -488,6 +488,9 @@ class Connect(object): header, value = line.split(':', 1) headers[header] = value + if conf.localhost: + headers[HTTP_HEADER.HOST] = "localhost" + for key, value in list(headers.items()): del headers[key] if isinstance(value, six.string_types):