Description: In this assignment, you'll write two clients (Agents) that will communicate with a server that you will also write. On start-up, the client should be prompted to enter their connection code. Your client (Agent) will then open a TCP socket to your server and send a message (a string of characters) to your server containing their . The first five characters of the connection code is a predefined set, while the last four is the . = + Below are the list of the predefined characters and agent code numbers you should use in your project: Predefined Characters: [AJK78, KTV90, NEL55, DFG28] Agent Code Numbers: 1. Agent A-(2975) 2. Agent B-(6144) Possible Connection Codes for Agent B: 1. AJK786144 2. KTV906144 3. NELS56144 4. DFG286144 Anyone of these codes should successfully identify Agent B. If the connection code is unknow to the server, it should close the connection to that client (Agent) immediately. If the connection code is correct, then the Server should move to the second layer of security. This is where the server sends the agent one of five secret questions (as a string). If the agent produces the correct answer to the secret question given, the server should send this message to the Agent: "Welcome Agent X Time Logged - " where X is A or BIf the answer is incorrect the server should send no further response and close the connection to that client immediately. Secret Questions and Answers: What was your high school mascot? Birdie the Peacock What are the three scents you like?< Vanilla, Spice, Marshmallow Would you rather have intelligence over looks? <- Intelligence What's the best type of cheese for you?< BrieServer Implementation Your server should keep track of all possible connection codes for each agent. The sever should also store the secret questions and answers. The Agent will initialize the communication with their connection code. The server will check if the connection code supplied matches any of the possible connection codes. If the connection code is incorrect the server must close the connection with that client. After the server checks the connection code received and finds it to be legitimate it should randomly select a secret question and send it to the client. The server will then wait for an answer from the client. Upon receiving the answer from the client, the server must check it against the answer to the specific question given. If the answer is correct the server must send the welcome string with the time and date the Agent checked in: "Welcome Agent X Time Logged - ."
Description:
In this assignment, you'll write two clients (Agents) that will communicate with a server that you will also write. On start-up, the client should be prompted to enter their connection code.
Your client (Agent) will then open a TCP socket to your server and send a message (a string of characters) to your server containing their <Connection Code>. The first five characters of the connection code is a predefined set, while the last four is the <Agent Code#!>.
<Connection Code>=<Predefined Charterers> + <Agent Code#>
Below are the list of the predefined characters and agent code numbers you should use in your project:
Predefined Characters: [AJK78, KTV90, NEL55, DFG28]
Agent Code Numbers:
1. Agent A-(2975)
2. Agent B-(6144)
Possible Connection Codes for Agent B:
1. AJK786144
2. KTV906144
3. NELS56144
4. DFG286144
Anyone of these codes should successfully identify Agent B.
If the connection code is unknow to the server, it should close the connection to that client (Agent) immediately. If the connection code is correct, then the Server should move to the second layer of security. This is where the server sends the agent one of five secret questions (as a string). If the agent produces the correct answer to the secret question given, the server should send this message to the Agent: "Welcome Agent X Time Logged - <Date and Time>" where X is A or BIf the answer is incorrect the server should send no further response and close the connection to that client immediately.
Secret Questions and Answers:
What was your high school mascot? Birdie the Peacock
What are the three scents you like?< Vanilla, Spice, Marshmallow
Would you rather have intelligence over looks? <- Intelligence
What's the best type of cheese for you?< BrieServer Implementation
Your server should keep track of all possible connection codes for each agent. The sever should also store the secret questions and answers.
The Agent will initialize the communication with their connection code. The server will check if the connection code supplied matches any of the possible connection codes. If the connection code is incorrect the server must close the connection with that client.
After the server checks the connection code received and finds it to be legitimate it should randomly select a secret question and send it to the client. The server will then wait for an answer from the client. Upon receiving the answer from the client, the server must check it against the answer to the specific question given. If the answer is correct the server must send the welcome string with the time and date the Agent checked in: "Welcome Agent X Time Logged - <Date and Time>."
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 5 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)