Create a gist now

Instantly share code, notes, and snippets.

infinite loop
#!/bin/python2
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5353
MESSAGE = ('7EFD01000001000000000000' + 'C0' + '0C').decode('hex')
print "UDP target IP:", UDP_IP
print "UDP target port:", UDP_PORT
print "message:", MESSAGE
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment