Reputation: 1414
I have the following running (finally after installing libnet etc) on my Mac trying to listen for a Dash button's MAC address:
from scapy.all import *
def arp_display(pkt):
if pkt[ARP].op == 1: #who-has (request)
if pkt[ARP].psrc == '0.0.0.0': # ARP Probe
print ("ARP Probe from: " + pkt[ARP].hwsrc)
print (sniff(prn=arp_display, filter="arp", store=0, count=300))
However, this just runs indefinitely and nothing is picked up even after numerous presses on the Dash and many other devices connecting and disconnecting.
I tried the following too
from scapy.all import *
print (sniff(filter="arp",count=10).summary())
Which also yields no results. Nothing I find online tells me what might be causing this.
Any ideas? Or even how I could debug?
Upvotes: 1
Views: 1208
Reputation: 1964
The new buttons don't put out the same ARP request as the old ones. Remove this line and it should work.
if pkt[ARP].psrc == '0.0.0.0': # ARP Probe
Upvotes: 2