Dirty implementation for #4571

This commit is contained in:
Miroslav Stampar 2021-02-21 22:49:57 +01:00
parent b902cca791
commit f87aa83e9b
3 changed files with 7 additions and 1 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
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)

View File

@ -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)

View File

@ -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):