generated from Code-Institute-Org/p3-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
38 lines (33 loc) · 1.13 KB
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Main file to be used"""
from packages_global_vars import *
from game import *
from generating_password import *
from password_on_list import *
from password_checker_zxcvbn import *
def main():
"""Calls main menu and all module functions"""
while True:
print("")
print("Welcome")
print("Press 1 to check your password strength")
print(
"Press 2 to check your password against the hacked password list")
print("Press 3 to play the password hacking game")
print("Press 4 to create a new password")
print("Press q to exit.")
response = input("\n").lower().strip()
if response == "1":
password_checker(getpass("Enter the password to check: "))
elif response == "2":
password_in_list(getpass("Enter the password to check: "))
elif response == "3":
game()
elif response == "4":
password_generator()
elif response == "q":
print("Exiting...")
return False
else:
print("You have selected an incorrect option")
if __name__ == "__main__":
main()