python - receiving packets from a socket in scapy -
i trying code basic packet sniffer listening socket in python , found use socket library in python , following,
s = socket.socket( socket.af_packet , socket.sock_raw , socket.ntohs(0x0005))
wanted know whether if same in scapy?
from scapy documentnat:
from scapy.all import sniff data = sniff(filter="icmp , host 127.0.0.1", count=2) print data.summary()
Comments
Post a Comment