Relative Content

Tag Archive for pythonnetwork-programmingscapy

How can I sniff ICMP requests to offline hosts using Python?

I’m trying to sniff ICMP packets on my network using Python, but I’ve noticed a limitation. When I use my script, I can only sniff packets that receive replies (e.g., echo-reply). However, for offline hosts that don’t exist (e.g., a ping to 192.168.15.201 in the same subnet), I cannot capture the ICMP echo requests.