Skip to content

Commit

Permalink
Create DASHButton.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienBob93 committed Sep 11, 2015
1 parent 2670322 commit d4b71b5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions DASHButton.py
@@ -0,0 +1,24 @@
from scapy.all import *
import time
import requests

MAGIC_FORM_URL = 'http://api.cloudstitch.com/alien/magic-form/datasources/sheet'

def record():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Action": 'LOG'
}
print str(data['Timestamp']) + " " + str(data['Action'])
requests.post(MAGIC_FORM_URL, data)

def arp_display(pkt):
timestamp = time.strftime("%Y-%m-%d %H:%M")
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:bb:c7:e5':
record()
else:
print "ARP Probe from: " + pkt[ARP].hwsrc

print sniff(prn=arp_display, filter="arp", store=0, count=10)

0 comments on commit d4b71b5

Please sign in to comment.