Skip to content

Instantly share code, notes, and snippets.

@rgee0
Forked from eob/dash-listen-2.py
Created June 12, 2017 20:22
Show Gist options
  • Save rgee0/6915a3b2f1dc952eecf0d8b37b108c7e to your computer and use it in GitHub Desktop.
Save rgee0/6915a3b2f1dc952eecf0d8b37b108c7e to your computer and use it in GitHub Desktop.
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:75:48:5f:99:30': # Huggies
print "Pushed Huggies"
elif pkt[ARP].hwsrc == '10:ae:60:00:4d:f3': # Elements
print "Pushed Elements"
else:
print "ARP Probe from unknown device: " + pkt[ARP].hwsrc
print sniff(prn=arp_display, filter="arp", store=0, count=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment