From 550497e907868ac0249a18eef2a0fb7f5bcd9ed8 Mon Sep 17 00:00:00 2001 From: jerome Date: Tue, 17 Sep 2024 15:32:53 +0200 Subject: scapy --- scapy/capture.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 scapy/capture.py (limited to 'scapy/capture.py') diff --git a/scapy/capture.py b/scapy/capture.py new file mode 100644 index 0000000..64393fc --- /dev/null +++ b/scapy/capture.py @@ -0,0 +1,7 @@ +from scapy.all import * + +# fonction callback +def packet_capture(pkt): + print(pkt[IP].src, "->",pkt[IP].dst) + +sniff(prn=packet_capture, filter="ip", count=10) -- cgit v1.2.3