[英]Problem with Scapy ARP request in netscanner
I was creating a netscanner using scapy, but i got an error...我正在使用 scapy 创建一个网络扫描仪,但出现错误...
When i put a normal ip address, the arp request arrive and return with no problem, but when i try to send it to all the ip in the network with ip/24 this error pop up!当我输入一个普通的 ip 地址时,arp 请求到达并返回没有问题,但是当我尝试将它发送到 ip/24 的网络中的所有 ip 时,会弹出此错误!
Code:代码:
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])
Error:错误:
Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'split'
I've resolved it!我已经解决了! The arp_request.show() and arp_request_broadcast.show() created the error. arp_request.show() 和 arp_request_broadcast.show() 创建了错误。 Simply remove them and it will work fine!只需删除它们,它就会正常工作!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.