mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
HTTP header HOST is now mandatory in a HTTP request file
This commit is contained in:
parent
a193205323
commit
3434a22872
|
@ -365,21 +365,9 @@ def __setRequestFromFile():
|
||||||
|
|
||||||
if host:
|
if host:
|
||||||
conf.url = "%s%s" % (host, page)
|
conf.url = "%s%s" % (host, page)
|
||||||
elif conf.url: #insert page into here
|
|
||||||
index = conf.url.find("://")
|
|
||||||
if index != -1:
|
|
||||||
index += len("://")
|
|
||||||
else:
|
else:
|
||||||
index = 0
|
errMsg = "mandatory HTTP header HOST is missing in "
|
||||||
|
errMsg += "the HTTP request file"
|
||||||
index = conf.url.find("/", index)
|
|
||||||
if index != -1:
|
|
||||||
conf.url = "%s%s" % (conf.url[:conf.url.find("/", index)], page)
|
|
||||||
else:
|
|
||||||
conf.url = "%s%s" % (conf.url, page)
|
|
||||||
pass #mirek
|
|
||||||
else:
|
|
||||||
errMsg = "target url is not known"
|
|
||||||
raise sqlmapFilePathException, errMsg
|
raise sqlmapFilePathException, errMsg
|
||||||
|
|
||||||
def __setMetasploit():
|
def __setMetasploit():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user