This repository contains two Python scripts for creating a simple TCP client and server to transfer data in the clear with echo.
The TCPServer.py
script is a simple server that waits for a connection request over a pre-defined port. Once a connection is established, the server receives data sent over the port, displays the contents of the received data, generates an MD5 hash hex digest of the message content, and echoes it back to the client.
-
Run the server script as sudo using Python3:
sudo python3 TCPServer.py
-
Wait for the incoming client request.
The TCPClient.py
script demonstrates a client application that connects to a server running on the same host over a pre-defined and agreed-upon port. The client transfers a list of text messages to the server, one by one. The server displays the contents of the message and echoes back the message along with its MD5 hash hex digest.
-
Run the client script as sudo using Python3:
sudo python TCPClient.py
-
Type
continue
to continue orexit
to exit the program. Wait for the server to return the messages back along with the hashes.