Question: Example File tree - 1 2 3 4 5 6 7 8 9 . zip - server.py - client.py - report.pdf - cert.crt - key.pemProblem

Example File tree
-123456789.zip
- server.py
- client.py
- report.pdf
- cert.crt
- key.pemProblem Statement:
Assignment #2 is the extension of Assignment #1, in which you
will implement a secure, robust TCP client-server
communication system for the "Guess the Number" game using
Python's socket and SSL libraries. This implementation should
ensure that all communications are encrypted using SSL/TLS and
handle data transmission and reception reliably.
Requirements:
Server-Client Communication:
a. Implement a synchronous server that can handle one
client at a time.
b. The server chooses a random number between 1 and 10,
which the client must guess.
c. The client will request to start the game by sending
the first request as "start."
d. The client will have only five attempts to guess the
correct number
e. The client will only win if he guesses the correct
number within five attempts.
Data Handling:
a. Communications between the server and the client
should be serialized using JSON.
b. Implement error handling to manage incomplete or
improperly formatted JSON data.
Security Features:
a. Use SSL/TLS to secure all client and server
communications.
b. Generate your own SSL certificates for testing.
Game History:
a. The server and the client should maintain a history
of all messages exchanged during the game.
b. This history should be compressed and saved at the
end of each game session using Python's pickle and
zlib modules.
c. Ensure the chat history can be loaded and displayed
upon restarting the server or client.
Logging:
a. Implement logging to capture important events such
as connections, disconnections, and errors.
Error Handling
a. The program should handle the proper termination of
the client and server.
b. The application should be able to detect and handle
network errors such as Connection, Socket, Timeout,
invalid certificates, invalid client requests, etc.
The exchange of messages between the server and client during
the game will follow the following conditions and message text
based on the difference between the actual number with the
server and the guessed number by the client:
x= randomly chosen number by server
guess = number guessed by a client
attempts = number of attempts by the client
Game Conditions and messages:
guess
Example File tree - 1 2 3 4 5 6 7 8 9 . zip -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!