Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2 Introduction
- You will write a program that will try to crack a password based on some hints. The
- problem consists of parts A and B, each worth 5 points.
- 1. Each password character is going to be one of these 9 uppercase letters, from A to I:
- ABCDEFGHI
- 2. No other characters will appear in the password.
- 3. The password is N characters long.
- If you knew nothing else about the password, the number of valid password combi-
- nations would be 9N. However, if you know more about the password, you can eliminate
- some combinations.
- Your program will \attempt" passwords by printing them out to screen.
- 3 Part A (5 points)
- Assume the password is 4 characters long.
- Without hints, you would have to try 94 = 6561 passwords, everything from AAAA, AAAB
- all the way to IIII.
- Thankfully, you have additional information on these passwords:
- - The first letter of the password is either 'B' or 'C'.
- - Unless you are looking at the last letter of the password:
- If a letter 'E' occurs in the password,
- the following letter will be either 'B' or 'H'.
- - The letter 'I' can occur at most 1 time in the password.
- 1. Write a program that prints out all of the combinations that are possible using the
- hints above.
- 2. Each password needs to be printed on a separate line. No other text should be
- printed.
Add Comment
Please, Sign In to add comment