Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a server that will wait for a client to connect to it and do the following in order: a.Wait for a password (string) from

 

Create a server that will wait for a client to connect to it and do the following in order: a.Wait for a password (string) from the client b.Evaluate the string sent by the client according to the following criteria (in order): 1. If the password is less than 6 characters, return the string "too short" (e.g. civic, a..a@11) 2. If the password is more than 12 characters, return the string "too long" 3. If the password has 6-12 characters (comprised of letters and digits only), but contains a non-letter and a non-digit character(s), return the string "it includes different characters" (e.g. C#1vIc, m adam, aa 1..1@aa) 4.If the password has 6-12 characters (comprised of letters and digits only), but the number of letters is greater than the number of digits, return the string "too many letters" (e.g. abcde123) 5. If the password has 6-12 characters (comprised of letters and digits only), but the number of letters is less than the number of digits, return the string "too many digits" (e.g. abc1234) 6. If the password has 6-12 characters (comprised of letters and digits only), and the number of letters is equal to the number of digits, return the string "accepted" (e.g. abc123) Repeat the whole process until the client sends a password that evaluates to "Accepted" AND IT IS A PALINDROME. Before totally exiting, the text "Bye" should be sent to the client.

Notes: The server program must cater to a single client only You may either use telnet or a separate program to serve as a client. Your server program should use port number 5000.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Below is a Python server program that fulfills the requirements you specified python import socket d... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Networks

Authors: Andrew S. Tanenbaum, David J. Wetherall

5th edition

132126958, 978-0132126953

More Books

Students also viewed these Programming questions

Question

Where do you see yourself in the future?

Answered: 1 week ago

Question

1. What type of outfits are you expected to wear at work?

Answered: 1 week ago