session hijack plugin 50% done

This commit is contained in:
byt3bl33d3r 2014-11-28 23:37:11 +01:00
parent e4cf519356
commit fcbc2254bd
6 changed files with 68 additions and 21 deletions

View file

@ -16,7 +16,7 @@
# USA
#
import re
import re, os
class URLMonitor:
@ -41,6 +41,22 @@ class URLMonitor:
return (client,url) in self.strippedURLs
def writeClientLog(self, client, headers, message):
if (client.getClientIP() + '.log') not in os.listdir("./logs"):
try:
log_message = "#Log file for %s (%s)\n" % (client.getClientIP(), headers['user-agent'])
except KeyError:
log_message = "#Log file for %s\n" % client.getClientIP()
log_file = open("./logs/" + client.getClientIP() + ".log", 'a')
log_file.write(log_message + message + "\n")
log_file.close()
else:
log_file = open("./logs/" + client.getClientIP() + ".log", 'a')
log_file.write(message + "\n")
log_file.close()
def getSecurePort(self, client, url):
if (client,url) in self.strippedURLs:
return self.strippedURLPorts[(client,url)]
@ -69,12 +85,16 @@ class URLMonitor:
self.strippedURLs.add((client, url))
self.strippedURLPorts[(client, url)] = int(port)
def setFaviconSpoofing(self, faviconSpoofing):
def setValues(self, faviconSpoofing, clientLogging):
self.faviconSpoofing = faviconSpoofing
self.clientLogging = clientLogging
def isFaviconSpoofing(self):
return self.faviconSpoofing
def isClientLogging(self):
return self.clientLogging
def isSecureFavicon(self, client, url):
return ((self.faviconSpoofing == True) and (url.find("favicon-x-favicon-x.ico") != -1))