diff --git a/libs/sslstrip/ClientRequest.py b/libs/sslstrip/ClientRequest.py index 9bf2ed3..6c7410e 100644 --- a/libs/sslstrip/ClientRequest.py +++ b/libs/sslstrip/ClientRequest.py @@ -190,7 +190,7 @@ class ClientRequest(Request): def process(self): logging.debug("Resolving host: %s" % (self.getHeader('host'))) host = self.getHeader('host') - + if (self.hsts and host): real = self.urlMonitor.real diff --git a/libs/sslstrip/ServerConnection.py b/libs/sslstrip/ServerConnection.py index 43ae336..cc6d831 100644 --- a/libs/sslstrip/ServerConnection.py +++ b/libs/sslstrip/ServerConnection.py @@ -125,15 +125,14 @@ class ServerConnection(HTTPClient): self.isCompressed = True elif (key.lower()== 'strict-transport-security'): - value="max-age=0" - logging.info("Zapped a strict-trasport-security header") + logging.info("%s Zapped a strict-trasport-security header" % self.client.getClientIP()) elif (key.lower() == 'content-length'): self.contentLength = value elif (key.lower() == 'set-cookie'): self.client.responseHeaders.addRawHeader(key, value) - + else: self.client.setHeader(key, value) diff --git a/libs/sslstrip/URLMonitor.py b/libs/sslstrip/URLMonitor.py index 0d1a10c..a486fe9 100644 --- a/libs/sslstrip/URLMonitor.py +++ b/libs/sslstrip/URLMonitor.py @@ -76,6 +76,10 @@ class URLMonitor: method = url[0:methodIndex] pathIndex = url.find("/", methodIndex) + if (pathIndex == -1): + pathIndex = len(url) + url += "/" + host = url[methodIndex:pathIndex].lower() path = url[pathIndex:]