Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # NOTE: Could not get this to work on Mac OSX - had to use linux
- # Pre-requisites:
- # sudo apt-get update
- # sudo apt-get upgrade
- # sudo apt-get install tcpdump tcpreplay wireshark python-scapy
- 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
- if pkt[ARP].hwsrc == '74:c2:46:e8:f1:f6': # Glad dash button
- print "Pushed Glad"
- else:
- print "ARP Probe from unknown device: " + pkt[ARP].hwsrc
- print sniff(prn=arp_display, filter="arp", store=0, count=10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement