diff --git a/docker/dash-listen.py b/docker/dash-listen.py index f9078bf..c6f9236 100644 --- a/docker/dash-listen.py +++ b/docker/dash-listen.py @@ -8,9 +8,11 @@ #import requests DASH_MAC_ADDRESS=os.environ.get('DASH_MAC_ADDRESS') +DASH_INTERFACE=os.environ.get('DASH_INTERFACE') #URL_CALLBACK=os.environ.get('URL_CALLBACK') def arp_display(pkt): + print pkt[ARP].hwsrc + " " + pkt[ARP].psrc + " op:" + str(pkt[ARP].op) if pkt[ARP].op == 1: #who-has (request) if pkt[ARP].psrc == '0.0.0.0': # ARP Probe if pkt[ARP].hwsrc == DASH_MAC_ADDRESS: @@ -24,12 +26,12 @@ # end apr_display -while True: - try: - print "start" - print sniff(prn=arp_display, filter="arp", store=0, count=10) - except: - pass - # end try +#while True: +# try: +# print sniff(prn=arp_display, iface="eth0", filter="arp", store=0, count=10) +# except: +# pass +# # end try # end while +print sniff(prn=arp_display, iface=DASH_INTERFACE, filter="arp", store=0, count=10)