mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Dirty implementation for #4571
This commit is contained in:
parent
b902cca791
commit
f87aa83e9b
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# 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 = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -794,6 +794,9 @@ def cmdLineParser(argv=None):
|
||||||
parser.add_argument("--profile", dest="profile", action="store_true",
|
parser.add_argument("--profile", dest="profile", action="store_true",
|
||||||
help=SUPPRESS)
|
help=SUPPRESS)
|
||||||
|
|
||||||
|
parser.add_argument("--localhost", dest="localhost", action="store_true",
|
||||||
|
help=SUPPRESS)
|
||||||
|
|
||||||
parser.add_argument("--force-dbms", dest="forceDbms",
|
parser.add_argument("--force-dbms", dest="forceDbms",
|
||||||
help=SUPPRESS)
|
help=SUPPRESS)
|
||||||
|
|
||||||
|
|
|
@ -488,6 +488,9 @@ class Connect(object):
|
||||||
header, value = line.split(':', 1)
|
header, value = line.split(':', 1)
|
||||||
headers[header] = value
|
headers[header] = value
|
||||||
|
|
||||||
|
if conf.localhost:
|
||||||
|
headers[HTTP_HEADER.HOST] = "localhost"
|
||||||
|
|
||||||
for key, value in list(headers.items()):
|
for key, value in list(headers.items()):
|
||||||
del headers[key]
|
del headers[key]
|
||||||
if isinstance(value, six.string_types):
|
if isinstance(value, six.string_types):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user