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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -