import datetime from _socket import socket, AF_PACKET, SOCK_RAW from time import sleep import utils if __name__ == "__main__": sock = socket(AF_PACKET, SOCK_RAW) sock.bind((utils.get_device_name(), 0)) frame = utils.broadcast_address + utils.mac_address + b"\x60\x00" + "ZeusWPI is de max!".encode() while True: dt_string = datetime.datetime.now().strftime("%d/%m/%Y %H:%M:%S") print("Sending message") sock.send(frame) sleep(1)