Lab0 ==== Part A ------- rndpassword is a command-line front-end to a random password generator. rndpassword's man page is given in the Normal Behaviour section below. Your task is to implement the normal behaviour component of rndpassword using passClient.pl as a starting point. rndpassword (version 0.1) Normal Behaviour ++++++++++++++++ Usage: rndpassword [-v] [-t ] [-n ] Options: -v version -t set character type (default: num) -n set length (default: 8 byte) Types: (output sample) alnum 0xaVbi3O2Lz8E69s # 0..9 a..z A..Z num 12378654 # 0..9 Examples: shell> rndpassword Password: 01234567 shell> shell> rndpassword -n 16 Password: 0123456789012345 shell> shell> rndpassword -t alnum -n 4 Password: abcd shell> shell> rndpassword -v Version: 0.1 Password: 01234567 shell> shell> rndpassword -n 3 -v Version: 0.1 Password: 012 shell> shell> rndpassword -n 3 -v -n 4 Version: 0.1 Password: 0123 shell> Assumptions +++++++++++ Command line arguments are separated into tokens by white space. Command line arguments are processed left to right. Switch parameters are found immediately following the switch. Switches may appear multiple times on the command line. Passwords are generated by a password server (see passServer.pl for programmer interface). The -v switch results in the immediate output of the version number. All the -n and -l switches (processed left to right) are used to determine the parameters sent to the password server (assuming no exception). An exception results in the immediate output of an error message and the termination of rndpassword. Exceptions ++++++++++ If a connection to the password server is refused then output (on a new line) "Error: Unable to Connect To Password Server\n". If a switch is provided on the command line then its value must be an element of {-v, -t, -n} else output (on a new line) "Error: Invalid Switch\n". If -t is provided on the command line then the next token must be an element of {num, alnum} else output (on a new line) "Error: Invalid Type\n". If -n is provided on the command line then the next token must be an integer in the range [2..64] else output (on a new line) "Error: Invalid Length\n". Part B ------ With regard to the specification trichotomy, develop a specification for passServer.pl (either version). Deliverables ------------ 1. Demonstrate the execution of rndpassword from the command line. 2. A print-out of your specification of passServer.pl.