Skip to content

Commit f87aa83

Browse files
committed
Dirty implementation for sqlmapproject#4571
1 parent b902cca commit f87aa83

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.2.21"
21+
VERSION = "1.5.2.22"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,9 @@ def cmdLineParser(argv=None):
794794
parser.add_argument("--profile", dest="profile", action="store_true",
795795
help=SUPPRESS)
796796

797+
parser.add_argument("--localhost", dest="localhost", action="store_true",
798+
help=SUPPRESS)
799+
797800
parser.add_argument("--force-dbms", dest="forceDbms",
798801
help=SUPPRESS)
799802

lib/request/connect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ def getPage(**kwargs):
488488
header, value = line.split(':', 1)
489489
headers[header] = value
490490

491+
if conf.localhost:
492+
headers[HTTP_HEADER.HOST] = "localhost"
493+
491494
for key, value in list(headers.items()):
492495
del headers[key]
493496
if isinstance(value, six.string_types):

0 commit comments

Comments
 (0)