From 1af68986181fd71509994f87e840931fe6aa4ac2 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 23 Apr 2009 15:04:28 +0000 Subject: [PATCH] Fixed POST parsing when -l option is provided (burp/webscarab log file) --- lib/core/option.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/core/option.py b/lib/core/option.py index b15361c0c..41a4021f7 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -134,10 +134,12 @@ def __feedTargetsDict(reqFile, addedTargetUrls): getPostReq = True + # GET parameters elif "?" in line and "=" in line and ": " not in line: data = line params = True + # Cookie and Host headers elif ": " in line: key, value = line.split(": ", 1) @@ -146,6 +148,11 @@ def __feedTargetsDict(reqFile, addedTargetUrls): elif key.lower() == "host": host = value + # POST parameters + elif method is not None and method == "POST" and "=" in line: + data = line + params = True + if getPostReq and params: if not url.startswith("http"): url = "http://%s%s" % (host, url)