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