summaryrefslogtreecommitdiff
path: root/scapy/capture.py
blob: 64393fcdc5abaf1e822027cad3e096a95bb1eef0 (plain)
1
2
3
4
5
6
7
from scapy.all import *

# fonction callback
def packet_capture(pkt):
    print(pkt[IP].src, "->",pkt[IP].dst)

sniff(prn=packet_capture, filter="ip", count=10)