I was creating a netscanner using scapy, but i got an error...
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!
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. Simply remove them and it will work fine!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.