blob: 7b25eb28b34b97d436d537378e8085d95a2dfc5e (
plain)
1
2
3
4
5
6
7
8
9
10
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%"))
|