mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-06 13:02:24 -07:00
Update packetfilter.py
Added multi filter support
This commit is contained in:
parent
2dc1dd4f12
commit
37937f74ba
1 changed files with 7 additions and 6 deletions
|
@ -26,11 +26,12 @@ class PacketFilter:
|
|||
data = pkt.get_payload()
|
||||
packet = IP(data)
|
||||
|
||||
try:
|
||||
execfile(self.filter)
|
||||
except Exception:
|
||||
log.debug("Error occurred in filter")
|
||||
print_exc()
|
||||
for filter in self.filter:
|
||||
try:
|
||||
execfile(i)
|
||||
except Exception:
|
||||
log.debug("Error occurred in filter", filter)
|
||||
print_exc()
|
||||
|
||||
pkt.set_payload(str(packet)) #set the packet content to our modified version
|
||||
pkt.accept() #accept the packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue