This commit adds active packet filtering/modification to the framework (replicates etterfilter functionality)

by using netfilterqueue, you can pass a filter using the new -F option, (will be adding an example later)
additionaly removed some deprecated attributes and the --manual-iptables option
This commit is contained in:
byt3bl33d3r 2015-07-27 20:44:23 +02:00
commit 7ec9f7b395
17 changed files with 99 additions and 53 deletions

View file

@ -86,13 +86,15 @@ class ClientRequest(Request):
del headers['accept-encoding']
log.debug("Zapped encoding")
if 'if-none-match' in headers:
del headers['if-none-match']
if self.urlMonitor.caching is False:
if 'if-modified-since' in headers:
del headers['if-modified-since']
if 'if-none-match' in headers:
del headers['if-none-match']
headers['pragma'] = 'no-cache'
if 'if-modified-since' in headers:
del headers['if-modified-since']
headers['pragma'] = 'no-cache'
return headers

View file

@ -50,6 +50,7 @@ class URLMonitor:
self.faviconReplacement = False
self.hsts = False
self.app = False
self.caching = False
@staticmethod
def getInstance():
@ -75,6 +76,9 @@ class URLMonitor:
else:
return 443
def setCaching(self, value):
self.caching = value
def addRedirection(self, from_url, to_url):
for s in self.redirects:
if from_url in s: