Upload files to "archive"

This commit is contained in:
2026-03-02 09:54:19 -05:00
parent c8247e687d
commit cbe7b9b86d
2 changed files with 153 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import socket
def run_server():
print("=" * 80)
print("CLRadio Reciever Version A-1 | by P7MJ")
print("-" * 80)
host = '0.0.0.0' # Listen on all available interfaces
port = 443
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(1)
print(f"Listening on {host}:{port}.")
c, addr = s.accept()
print(f"Connection established from {str(addr)}")
while True:
data = c.recv(1024).decode()
if not data:
break
print(f"{str(addr)}: {data}")
# Optional: send a response back
# c.send(data.encode())
c.close()
if __name__ == '__main__':
run_server()