我正在使用 wsl2 运行 kali linux 终端。我似乎有一些网络问题或可能遗漏了一些东西。
当我尝试在本地网络或外部对任何内容执行 ping 操作时,我根本
没有得到任何响应
from scapy.all import Ether, ARP, srp
if __name__ == "__main__":
#If all bits of a MAC address is set to 1 it will broadcast to all devices in a network
broadcast = "FF:FF:FF:FF:FF:FF"
#Create a ethernet layer packet
ether_layer = Ether(dst = broadcast)
#This represent that we want to scan all devices with IP addresses from 192.168.74.1 up tp 192.168.74.255
ip_range = "192.168.0.1/24"
arp_layer= ARP(pdst = ip_range)
packet = ether_layer / arp_layer
ans, unans = srp(packet, iface="eth0", timeout=2)
for snd, rcv in ans:
ip = rcv[ARP].psrc
mac = rcv[Ether].src
print("IP = ", ip, " MAC = ", mac)
任何提示将不胜感激。[PingTest][1]
[1]:https: //i.stack.imgur.com/S2Iqg.png