Newer
Older
dhcp2MQTT / dash-listen.py
@Osbert Feng Osbert Feng on 27 Sep 2015 428 bytes Initial dash listen script.
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=10)

# sudo apt-get install python-scapy tcpdump tcpreplay wireshark

# Note that wireshark prompts during installation if non-root users
# should be allowed to perform packed capture.