Scapy Arp Function Not Giving Proper Output When Running It
I have a simple script: import scapy.all as scapy def scan(ip): arg = scapy.ARP(pdst=ip) print(arg.summary()) scan('192.168.11.0/24') But when I run this script the outp
Solution 1:
You're not actually doing anything with your script. Your function includes arg = scapy.ARP(pdst=ip)
, which creates an ARP packet. To send it, use sr or sr1. There are also ARP example one-liners that cover ARP pings. Applied here,
from scapy.allimport *
defarp_scan(ips):
resp = arping(ips)
print(resp)
arp_scan("192.168.11.0/24")
We will get output that looks similar to
Begin emission:*Finished sending 256 packets.
Received 1 packets, got 1 answers, remaining 255 packets
9c:5c:12:ca:7b:6f 192.168.11.1
Post a Comment for "Scapy Arp Function Not Giving Proper Output When Running It"