Hacked Game is a Python Terminal Application that is intended to educate people on the importance of strong passwords It is comprised of
- A password strength checking tool
- An option to check if the users password is on the most hacked password list of 2022 Source
- A password guessing game that uses the list of most hacked passwords in 2022
- An option to create strong passwords (and check the password strength simultaneously)
- As a user I want a site where I can check the strength of my password
- As a user I want a site where I can verify my password against common passwords
- As a user I want to play a game to educate me on using weak passwords
- As a user I want to play a game to educate me on common passwords
- As a user I want to be able to create strong passwords and verify the strength of the new password generated
- Go to https://pp3-hacked-game-932b8166abb0.herokuapp.com/
- Wait for application to load
- From the main menu enter option "1" and press Enter
- Type out your password (this field does not display the password typed) and press Enter
- The application will then output "At a rate of 100 guesses per hour your password would take {time} to crack"
- Passwords will then be deleted from memory
- Press Enter to return to the main menu
-
From the main menu enter option "2" and press Enter
-
Type out your password (this field does not display the password typed) and press Enter
-
Press Enter to return to the main menu
-
From the main menu enter option "3" and press Enter
- The menu will display 5 options
- The game modes
- View Leader Board
- Exit to main menu
-
Enter the difficulty you wish the try:
- "Easy"
- "Difficult"
- "Hard"
-
The game instructions will then print
-
Press Enter to continue to the game
-
The game will tell you the length of the password
-
Input your guess into the game and await feedback
-
Yellow feedback indicates that the characters are in the password but in the wrong location
-
White feedback indicates that the characters are not in the password
-
Green feedback (u in the bellow screenshot) indicates that the characters are in the password and the correct location
-
If you guessed all the characters in the correct location you will win the game
-
Enter your name to add your name to the leader-board, or select q to exit
-
If you get stuck you can enter help as an option to reveal the password character types
-
From the main menu enter option "3" and press Enter
- The menu will display 5 options
- The game modes
- View Leader Board
- Exit to main menu
-
Input 4 and press enter
-
You will then need to decide on the difficulty leader board to view
-
The desired leader board table will print (sorted lowest guesses to highest)
- From the main menu enter option "4" and press Enter
- Enter the length of the password greater than 1
- 0 length passwords
- Negative integer passwords
- 1 length passwords will display an error
- Copy the password from terminal
- Press Enter to return to the main menu
Example Output:
- Python The main language used in the terminal application
- JavaScript Used in the template to run the terminal
- HTML used in the template to present the terminal
- gspread Google API for GoogleSheets
- google.oauth2.service_account Account used to share the worksheets with
- colorama used to add color for visual feedback
- zxcvbn used for password strength
- getpass used to hide the password input
- tabulate Used to create the leader board tables
- random password generator used to generate random passwords
- GitHub: Used to host the application source code.
- VSCode Visual Studio Code: used to edit the application source code.
- Heroku: Used to host the application
- LucidChart Used for diagrams
No errors found
- run.py module
- password_on_list.py module
- password_checker_zxcvbn.py module
Command Prompt was used to run the application locally, and updates were tested again after deployment to Heroku
Testing Description | Expected Action | Actual Output | Result |
---|---|---|---|
Main Menu Loads | User is presented with menu | User is presented with menu | Confirmed |
Main Menu Option 1 | User is presented with password strength checking tool | User is presented with password strength checking tool | Confirmed |
Main Menu Option 2 | User is presented with checking password against password list | User is presented with checking password against password list | Confirmed |
Main Menu Option 3 | User is presented with a game | User is presented with a game | Confirmed |
Main Menu Option 4 | User can create a new password | User can create a new password | Confirmed |
Main Menu Option Q | Application ends | Application ends | Confirmed |
All other input | Presents error and presents menu | Presents error and presents menu | Confirmed |
Password Strength | User inputs a correct password to verify | Password is verified with time to crack | Confirmed |
Password Strength | User inputs a 0 length password | User is presented with error and asked to enter a correct password | Confirmed |
Password List | User inputs a correct on the list | User is informed password is on the list | Confirmed |
Password List | User inputs a password not on the list | User is informed password is not on the list | Confirmed |
Password List | User inputs a 0 length password | User is presented with error and asked to enter a correct password | Confirmed |
Password Game | User is presented with Difficulty menu | User is presented with Difficulty menu | Confirmed |
Password Game | user inputs easy | Easy mode loads | Confirmed |
Password Game | user inputs difficult | Difficult mode loads | Confirmed |
Password Game | user inputs hard | Hard mode loads | Confirmed |
Password Game | user inputs 4 | user is presented with leader board options | Confirmed |
Password Game Menu | User inputs invalid option | User presented with error and menu options | Confirmed |
Password Game leader board | user inputs 1 | Easy Leader board is presented | Confirmed |
Password Game leader board | user inputs 2 | Difficult Leader board is presented | Confirmed |
Password Game leader board | user inputs 3 | Hard Leader board is presented | Confirmed |
Password Game leader board | user inputs q | User exists current menu | Confirmed |
Password Game Easy | User is presented with game instructions | User is presented with game instructions | Confirmed |
Password Game Difficult | User is presented with game instructions | User is presented with game instructions | Confirmed |
Password Game Hard | User is presented with game instructions | User is presented with game instructions | Confirmed |
Password Game Easy | User inputs guess q | Game ends | Confirmed |
Password Game Difficult | User inputs guess q | Game ends | Confirmed |
Password Game Hard | User inputs guess q | Game ends | Confirmed |
Password Game Easy | User inputs guess help | User is presented with help options (as above) | Confirmed |
Password Game Difficult | User inputs guess help | User is presented with help options (as above) | Confirmed |
Password Game Hard | User inputs guess help | User is presented with help options (as above) | Confirmed |
Password Game Easy | User inputs a guess too short | Error to inform user of this appears | Confirmed |
Password Game Easy | User inputs a guess too long | Error to inform user of this appears | Confirmed |
Password Game Easy | Guess is the correct length with incorrect characters | Printed guess characters in default white | Confirmed |
Password Game Easy | Guess is the correct length with correct letters in wrong place | Printed guess characters in yellow | Confirmed |
Password Game Easy | Guess is the correct length with correct letters in correct place | Printed guess characters in green | Confirmed |
Password Game Difficult | User inputs a guess too short | Error to inform user of this appears | Confirmed |
Password Game Difficult | User inputs a guess too long | Error to inform user of this appears | Confirmed |
Password Game Difficult | Guess is the correct length with incorrect characters | Printed guess characters in default white | Confirmed |
Password Game Difficult | Guess is the correct length with correct letters in wrong place | Printed guess characters in yellow | Confirmed |
Password Game Difficult | Guess is the correct length with correct letters in correct place | Printed guess characters in green | Confirmed |
Password Game Hard | User inputs a guess too short | Error to inform user of this appears | Confirmed |
Password Game Hard | User inputs a guess too long | Error to inform user of this appears | Confirmed |
Password Game Hard | Guess is the correct length with incorrect characters | Printed guess characters in default white | Confirmed |
Password Game Hard | Guess is the correct length with correct letters in wrong place | Printed guess characters in yellow | Confirmed |
Password Game Hard | Guess is the correct length with correct letters in correct place | Printed guess characters in green | Confirmed |
Password Game User wins Easy | User has guessed the correct word | Whole word appears in green | Confirmed |
Password Game User wins Difficult | User has guessed the correct word | Whole word appears in green | Confirmed |
Password Game User wins Hard | User has guessed the correct word | Whole word appears in green | Confirmed |
Password Game User Wins Easy | User is asked to enter name | User is asked to enter name | Confirmed |
Password Game User Wins Easy | User enters a 0 length name | Error message is displayed and asked for a name | Confirmed |
Password Game User Wins Easy | User enters q as name | User returns to menu skipping leader board | Confirmed |
Password Game User Wins Easy | User enters a legitimate name not already on list | leader board is updated | Confirmed |
Password Game User Wins Easy | User enters a legitimate name already on list | error stating name is already on list appears and asked for a new name | Confirmed |
Password Game User Wins Difficult | User is asked to enter name | User is asked to enter name | Confirmed |
Password Game User Wins Difficult | User enters a 0 length name | Error message is displayed and asked for a name | Confirmed |
Password Game User Wins Difficult | User enters q as name | User returns to menu skipping leader board | Confirmed |
Password Game User Wins Difficult | User enters a legitimate name not already on list | leader board is updated | Confirmed |
Password Game User Wins Difficult | User enters a legitimate name already on list | error stating name is already on list appears and asked for a new name | Confirmed |
Password Game User Wins Hard | User is asked to enter name | User is asked to enter name | Confirmed |
Password Game User Wins Hard | User enters q as name | User returns to menu skipping leader board | Confirmed |
Password Game User Wins Hard | User enters a legitimate name not already on list | leader board is updated | Confirmed |
Password Game User Wins Hard | User enters a 0 length name | Error message is displayed and asked for a name | Confirmed |
Password Game User Wins Hard | User enters a legitimate name already on list | error stating name is already on list appears and asked for a new name | Confirmed |
Password Generator | User enters a positive integer between 2 and 40 | User is presented with password and password strength | Confirmed |
Password Generator | User enters negative integer | User is presented with error and instructions | Confirmed |
Password Generator | User enters any number above 40 | User is presented with error and instructions | Confirmed |
Password Generator | User enters a 0 or 1 length password | User is presented with error and instructions | Confirmed |
Google Sheets data reads | Password List reads from Google Sheets | Password options are in the game | Confirmed |
Google Sheets data writes | Leader board stats updates | Leader board stats updates | Confirmed |
- Printing on same line python
- Hacked Password List
- Wordle - Main inspiration for the game
- Commit messages: usually feat add style add etc.. is added as a preface to the commit messages, but since it is only python style add etc.. did not make sense to preface every commit with "Pyhon" for an entirely python project.
- Wildcard imports as the functions are bespoke built by me I used a wildcard import "*" to import the modules, if this wasn't the case I would import selected modules only / functions only
This application is deployed on Heroku using the below instructions
3.Complete App Name form
-
Deploy using github
-
Connected to main brach (this was connected to a testing branch for testing purposes)
-
Added CREDS to the Config Vars (the value is hidden intentionally)
-
Set port to 8000 as required for the terminal to run correctly
-
Enable automatic deployments from Branch Main
-
Deploy Manually
- When resizing the terminal screen the text vanishes from the terminal, this is from the Template used and is not due to my code
No other bugs noted during testing