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

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -