Skip to content

Instantly share code, notes, and snippets.

@mr-pj
mr-pj / dashbutton.py
Last active January 3, 2018 12:34
if dhcp request matches a given mac, an action will be taken. Requires pydhcplib
from pydhcplib.dhcp_network import *
def do_something():
print("button has been pressed")
netopt = {'client_listen_port':"68", 'server_listen_port':"67", 'listen_address':"0.0.0.0"}
class Server(DhcpServer):
def __init__(self, options, dashbuttons):