Self-Improvement

Scapy 사용법 5 (sniff) 본문

scapy

Scapy 사용법 5 (sniff)

JoGeun 2018. 10. 22. 15:43

*예제


>>> sniff()



>>> a=_

>>> a.nsummary()



>>> a[3]




>>> sniff(iface="eth0", filter="icmp", count=10)



iface=”eth0” - nice simple one, I’m defining the interface to sniff on (remember by default it’s all interfaces that Scapy will sniff packets from). filter=”icmp” - This is telling the sniff() function to only look for ICMP packets 

count=10 - If you only want to collect a certain amount of packets, you can use the count option to define that number, in this case I told it to collect 10 ICMP packets and then stop.


>>> a=_

>>> a.nsummary()



>>> a[2]