add files

This commit is contained in:
2026-02-04 17:24:25 +03:00
commit e939a3bed9
7 changed files with 316 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import requests
import socket
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(("0.0.0.0", 10000))
server.listen(1)
print("TCP сервер запущен")
while True:
conn, addr = server.accept()
print(f"Подключение от {addr}")
data = conn.recv(1024)
if not data:
break
conn.sendall(data.upper())
conn.close()
if data.upper() == b'EXIT':
break