Fixed POST parsing when -l option is provided (burp/webscarab log file)

This commit is contained in:
Bernardo Damele 2009-04-23 15:04:28 +00:00
parent 69259c5984
commit 1af6898618

View File

@ -134,10 +134,12 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
getPostReq = True getPostReq = True
# GET parameters
elif "?" in line and "=" in line and ": " not in line: elif "?" in line and "=" in line and ": " not in line:
data = line data = line
params = True params = True
# Cookie and Host headers
elif ": " in line: elif ": " in line:
key, value = line.split(": ", 1) key, value = line.split(": ", 1)
@ -146,6 +148,11 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
elif key.lower() == "host": elif key.lower() == "host":
host = value host = value
# POST parameters
elif method is not None and method == "POST" and "=" in line:
data = line
params = True
if getPostReq and params: if getPostReq and params:
if not url.startswith("http"): if not url.startswith("http"):
url = "http://%s%s" % (host, url) url = "http://%s%s" % (host, url)