Files
nudtns2026spring/Sniffing_Spoofing/Labsetup/volumes/sniffer.py
2026-04-07 20:49:20 +08:00

9 lines
239 B
Python
Executable File

#!/usr/bin/env python3
from scapy.all import *
def print_pkt(pkt):
pkt.show()
print("Sniffing ICMP packets from spoofed IP 1.2.3.4...")
pkt = sniff(iface='br-c031fbf1a197', filter='icmp and src host 1.2.3.4', prn=print_pkt, count=1)