mirror of
https://github.com/couchfault/sslstrip2.git
synced 2025-10-29 16:56:59 +00:00
Bugs fixing
This commit is contained in:
parent
6f2ab2e264
commit
e8456c5f5a
@ -34,6 +34,9 @@ from URLMonitor import URLMonitor
|
||||
from CookieCleaner import CookieCleaner
|
||||
from DnsCache import DnsCache
|
||||
|
||||
def NUEVO_LOG(str):
|
||||
return
|
||||
|
||||
class ClientRequest(Request):
|
||||
|
||||
''' This class represents incoming client requests and is essentially where
|
||||
@ -52,7 +55,6 @@ class ClientRequest(Request):
|
||||
|
||||
def cleanHeaders(self):
|
||||
headers = self.getAllHeaders().copy()
|
||||
|
||||
if 'accept-encoding' in headers:
|
||||
del headers['accept-encoding']
|
||||
|
||||
@ -75,7 +77,7 @@ class ClientRequest(Request):
|
||||
host = self.urlMonitor.URLgetRealHost("%s"%headers['host'])
|
||||
logging.debug("Modifing HOST header: %s -> %s"%(headers['host'],host))
|
||||
headers['host'] = host
|
||||
headers['securelink'] = '1'
|
||||
#headers['securelink'] = '1'
|
||||
self.setHeader('Host',host)
|
||||
|
||||
return headers
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -17,7 +17,7 @@ class URLMonitor:
|
||||
real = {} # LEO: diccionario host / real
|
||||
patchDict = {
|
||||
'https:\/\/fbstatic-a.akamaihd.net':'http:\/\/webfbstatic-a.akamaihd.net',
|
||||
'https:\/\/www.facebook.com':'http:\/\/social.facebook.com',
|
||||
'https:\/\/www.facebook.com':'http:\/\/wwww.facebook.com',
|
||||
'return"https:"':'return"http:"'
|
||||
}
|
||||
|
||||
@ -26,23 +26,14 @@ class URLMonitor:
|
||||
self.strippedURLPorts = {}
|
||||
self.faviconReplacement = False
|
||||
|
||||
self.sustitucion["mail.google.com"] = "gmail.google.com"
|
||||
self.real["gmail.google.com"] = "mail.google.com"
|
||||
|
||||
self.sustitucion["www.facebook.com"] = "social.facebook.com"
|
||||
self.real["social.facebook.com"] = "www.facebook.com"
|
||||
|
||||
self.sustitucion["accounts.google.com"] = "cuentas.google.com"
|
||||
self.real["cuentas.google.com"] = "accounts.google.com"
|
||||
|
||||
self.sustitucion["accounts.google.es"] = "cuentas.google.es"
|
||||
self.real["cuentas.google.es"] = "accounts.google.es"
|
||||
|
||||
def isSecureLink(self, client, url):
|
||||
for expression in URLMonitor.javascriptTrickery:
|
||||
if (re.match(expression, url)):
|
||||
logging.debug("JavaScript trickery!")
|
||||
return True
|
||||
|
||||
if (client, url) in self.strippedURLs:
|
||||
logging.debug("(%s, %s) in strippedURLs" % (client, url))
|
||||
return (client,url) in self.strippedURLs
|
||||
|
||||
def getSecurePort(self, client, url):
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user