Question
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started