Update server.py

This commit is contained in:
Aryan Singh committed 2026-09-09 01:06:03 -05:00
1 parent 4c19b6b053
commit ed5689fb5a
1 file changed
+3 -2
+3 -2
View File
@@ -1,9 +1,10 @@
# server.py
import socket
import shlex
import subprocess
HOST = "0.0.0.0"
PORT = 5000
PORT = 5055
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -19,7 +20,7 @@ while True:
command = conn.recv(65536)
# print("Received Grep Command:", command.decode())
result = subprocess.run(command.decode(), capture_output=True, text=True)
result = subprocess.run(shlex.split(command.decode()), capture_output=True, text=True)
conn.sendall(result.stdout.encode())
conn.close()