网络扫描仪中的 Scapy ARP 请求出现问题



我正在使用scapy创建一个网络扫描仪,但是我遇到了一个错误...

当我输入一个普通的 IP 地址时,arp 请求到达并返回没有问题,但是当我尝试将其发送到网络中使用 ip/24 的所有 ip 时,会弹出此错误!

法典:

import scapy.all as scapy
import sys
if len(sys.argv)==2:
def scan(ip):
arp_request = scapy.ARP(pdst = ip)
arp_request.show()
broadcast = scapy.Ether(dst="ff:ff:ff:ff:ff:ff")
broadcast.show()
arp_request_broadcast = broadcast/arp_request
arp_request_broadcast.show()
scan(sys.argv[1])

错误:

Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'split'

我已经解决了! arp_request.show(( 和 arp_request_broadcast.show(( 创建了错误。 只需删除它们,它就可以正常工作!

最新更新