revamped appoison plugin and fixed some bugs

This commit is contained in:
byt3bl33d3r 2014-12-15 17:00:05 +01:00
parent ca28de91f6
commit 0defaf7b86
12 changed files with 223 additions and 333 deletions

View file

@ -32,6 +32,7 @@ class URLMonitor:
def __init__(self):
self.strippedURLs = set()
self.strippedURLPorts = {}
self.redirects = []
self.faviconReplacement = False
def isSecureLink(self, client, url):
@ -66,6 +67,19 @@ class URLMonitor:
else:
return 443
def addRedirection(self, from_url, to_url):
for s in self.redirects:
if from_url in s:
s.add(to_url)
return
self.redirects.append(set([from_url,to_url]))
def getRedirectionSet(self, url):
for s in self.redirects:
if url in s:
return s
return set([url])
def addSecureLink(self, client, url):
methodIndex = url.find("//") + 2
method = url[0:methodIndex]