mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor bug fix in parsing Burp (WebScarab too?) log to correctly parse httpS urls
This commit is contained in:
parent
02f6425db8
commit
c7b72abc0e
|
@ -96,7 +96,15 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
|||
|
||||
reqResList = fread.split("======================================================")
|
||||
|
||||
scheme = None
|
||||
|
||||
for request in reqResList:
|
||||
if scheme is None:
|
||||
scheme = re.search("\d\d\:\d\d\:\d\d\s+(http[\w]*)\:", request, re.I)
|
||||
|
||||
if scheme:
|
||||
scheme = scheme.group(1)
|
||||
|
||||
if not re.search ("^[\n]*(GET|POST).*?\sHTTP\/", request, re.I):
|
||||
continue
|
||||
|
||||
|
@ -151,7 +159,8 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
|||
|
||||
if getPostReq and params:
|
||||
if not url.startswith("http"):
|
||||
url = "http://%s%s" % (host, url)
|
||||
url = "%s://%s%s" % (scheme or "http", host, url)
|
||||
scheme = None
|
||||
|
||||
if not kb.targetUrls or url not in addedTargetUrls:
|
||||
kb.targetUrls.add(( url, method, data, cookie ))
|
||||
|
|
Loading…
Reference in New Issue
Block a user