Write a python program that creates TCP connection between server and client and do the following: (You need to use datetime, hashlib, random modules) 1.1 When the client connects to a server, it will send one of the following commands (‘time’, ‘md5 STRING’, ‘random’) 1.2 The server will receive the command and based on the command will send back data to the user: 1.2.1. Time: the server will send back the current time using the datetime module. 1.2.2. MD5: the server will take the string along with the md5 word and calculate the MD5 value for it and then send the hash to the client. 1.2.3. Random: the server will generate a random number between 1,100 and will send it back to the use
Write a python program that creates TCP connection between server and client and do the following: (You need to use datetime, hashlib, random modules)
1.1 When the client connects to a server, it will send one of the following commands (‘time’, ‘md5 STRING’, ‘random’)
1.2 The server will receive the command and based on the command will send back data to the user:
1.2.1. Time: the server will send back the current time using the datetime module.
1.2.2. MD5: the server will take the string along with the md5 word and calculate the MD5 value for it and then send the hash to the client.
1.2.3. Random: the server will generate a random number between 1,100 and will send it back to the user.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images









