HTTP header HOST is now mandatory in a HTTP request file

This commit is contained in:
Miroslav Stampar 2010-01-12 14:07:58 +00:00
parent a193205323
commit 3434a22872

View File

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