Skip to content

SecBear/TCP-Client-Server-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

TCP Client and Server - Python Scripts

This repository contains two Python scripts for creating a simple TCP client and server to transfer data in the clear with echo.

Server

Description

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.

Usage

  1. Run the server script as sudo using Python3:

    sudo python3 TCPServer.py
  2. Wait for the incoming client request.

Client

Description

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.

Usage

  1. Run the client script as sudo using Python3:

    sudo python TCPClient.py
  2. Type continue to continue or exit to exit the program. Wait for the server to return the messages back along with the hashes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages