Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. # NOTE: Could not get this to work on Mac OSX - had to use linux
  4. # Pre-requisites:
  5. # sudo apt-get update
  6. # sudo apt-get upgrade
  7. # sudo apt-get install tcpdump tcpreplay wireshark python-scapy
  8.  
  9. from scapy.all import *
  10.  
  11. def arp_display(pkt):
  12. if pkt[ARP].op == 1: #who-has (request)
  13. if pkt[ARP].psrc == '0.0.0.0': # ARP Probe
  14. if pkt[ARP].hwsrc == '74:c2:46:e8:f1:f6': # Glad dash button
  15. print "Pushed Glad"
  16. else:
  17. print "ARP Probe from unknown device: " + pkt[ARP].hwsrc
  18.  
  19. print sniff(prn=arp_display, filter="arp", store=0, count=10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement