updated skeleton with true data

This commit is contained in:
2025-12-09 08:40:18 +01:00
parent 61e6644158
commit 8cd91b6f22
27 changed files with 1193 additions and 14 deletions

View File

@ -1,2 +1,20 @@
#!/usr/bin/env python3
print(8000)
import socket
START, END = 8000, 8100
def port_free(port):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
try:
s.bind(("0.0.0.0", port))
return True
except OSError:
return False
for port in range(START, END + 1):
if port_free(port):
print(port)
exit(0)
print("ERR_NO_FREE_PORT")
exit(1)