diff options
Diffstat (limited to 'scapy/arping.py')
| -rw-r--r-- | scapy/arping.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scapy/arping.py b/scapy/arping.py new file mode 100644 index 0000000..7b25eb2 --- /dev/null +++ b/scapy/arping.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +from scapy.all import * + +# Le réseau à scanner +network = "192.168.2.0/24" + +# Scanne le réseau et affiche le résultat +ans, unans = srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst=network), timeout=5, verbose=0) +for snd, rcv in ans: + print(rcv.sprintf(r"%Ether.src% - %ARP.psrc%")) |
