Untitled

 avatar
user_3334049
plain_text
6 months ago
442 B
3
Indexable
import socket


def main():
    host = '10.170.45.98'
    port = 80
    while True:
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
            sock.connect((host, port))

            message = input()

            sock.sendall((message + '\n').encode())

            modified_message = sock.recv(1024).decode().strip()

            print(modified_message)


if __name__ == "__main__":
    main()
Editor is loading...
Leave a Comment