Fixed bug in DNS resolving logic

This commit is contained in:
byt3bl33d3r 2015-03-12 19:43:29 +01:00
parent cd9a16de55
commit c85fd2b5f3
3 changed files with 98 additions and 61 deletions

View file

@ -223,13 +223,13 @@ class ClientRequest(Request):
real = self.urlMonitor.real
if 'wwww' in host:
logging.debug("Resolving %s for HSTS bypass" % (host))
logging.debug("Resolving %s for HSTS bypass (Twisted)" % (host))
host = host[1:]
elif 'web' in host:
logging.debug("Resolving %s for HSTS bypass" % (host))
logging.debug("Resolving %s for HSTS bypass (Twisted)" % (host))
host = host[3:]
elif host in real:
logging.debug("Resolving %s for HSTS bypass" % (host))
logging.debug("Resolving %s for HSTS bypass (Twisted)" % (host))
host = real[host]
hostparts = host.split(':')