mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
fix for redirect/HOST header bug
This commit is contained in:
@@ -3127,4 +3127,12 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||
for target in retVal:
|
||||
kb.targetUrls.add(target)
|
||||
|
||||
return retVal
|
||||
|
||||
def getHostHeader(url):
|
||||
retVal = urlparse.urlparse(url).netloc
|
||||
|
||||
if any(map(lambda x: retVal.endswith(':%d' % x), [80, 443])):
|
||||
retVal = retVal.split(':')[0]
|
||||
|
||||
return retVal
|
||||
Reference in New Issue
Block a user