This commit is contained in:
parent
7c7397d7a7
commit
511d58e9c5
1 changed files with 3 additions and 3 deletions
|
@ -26,11 +26,11 @@ while True:
|
|||
ips = pl.split("\t")[3]
|
||||
for ip in ips.split(","):
|
||||
if ip.endswith("/32"):
|
||||
print(ip[:-3])
|
||||
print(f"{ip}:{UDP_PORT} {MESSAGE=}" % MESSAGE)
|
||||
UDP_IP = ip[:-3]
|
||||
print(f"{UDP_IP}:{UDP_PORT} {MESSAGE=}" % MESSAGE)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
|
||||
sock.bind(('0.0.0.0', 1900)) # 1900 is SSDP src port
|
||||
sock.sendto(MESSAGE, (ip, UDP_PORT))
|
||||
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
|
||||
sock.close()
|
||||
time.sleep(10)
|
||||
|
||||
|
|
Loading…
Reference in a new issue