咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
代码如下:
from scapy.all import srp, Ether, ARP IpScan = '192.168.114.1/24' try: ans,unans = srp(Ether(dst="FF:FF:FF:FF:FF:FF")/ARP(pdst=IpScan), timeout=2) except Exception as e: print(e) else: for send, rcv in ans: ListMACAddr = rcv.sprintf("%Ether.src%---%ARP.psrc%") print(ListMACAddr)