This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import * | |
import requests | |
import time | |
MAGIC_FORM_URL = 'http://put-your-url-here' | |
def record_poop(): | |
data = { | |
"Timestamp": time.strftime("%Y-%m-%d %H:%M"), | |
"Measurement": 'Poopy Diaper' | |
} |