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 - ."

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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>." 

Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Network Protocols
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education