fix for redirect/HOST header bug

This commit is contained in:
Miroslav Stampar committed 2011-11-11 11:28:27 +00:00
1 parent 1061c06617
commit ccbd93cc2e
4 files changed
+32 -8

No files matched your search

+8
View File
@@ -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