Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DPITest/key_word_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from scapy.all import sniff, send, IP, TCP, Raw
import sys

# this is a test here
KEYWORD = b"bangumi"

def handle_packet(pkt):
Expand All @@ -24,4 +25,4 @@ def handle_packet(pkt):
send(rst_pkt, verbose=0)

print(f"[*] Starting Dummy DPI... Monitoring for '{KEYWORD.decode()}'")
sniff(filter="tcp port 80", prn=handle_packet, iface="wlan0")
sniff(filter="tcp port 80", prn=handle_packet, iface="wlan0")
Loading