This is my line of code:
ans,unans=srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.5.0/24"),timeout=2)
ans.summary(lambda (s,r): r.sprintf("IP: %ARP.psrc% MAC: %Ether.src%")
using python 2.7, it scans and print the hosts using arp ping scan Using python3, it doesn't work and bring up this error:
File "arp1.py", line 9
ans.summary(lambda (s,r): r.sprintf("IP: %ARP.psrc% MAC: %Ether.src%")
^
SyntaxError: invalid syntax