diff options
Diffstat (limited to 'scapy/capture.py')
| -rw-r--r-- | scapy/capture.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scapy/capture.py b/scapy/capture.py new file mode 100644 index 0000000..64393fc --- /dev/null +++ b/scapy/capture.py @@ -0,0 +1,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) |
