-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassword_manager.py
executable file
·43 lines (37 loc) · 1.04 KB
/
password_manager.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
39
40
41
42
43
import os
import time
import definedFunc as df
# main program
def exit_program():
print("Thank you for using the password manager")
time.sleep(1)
print("Exiting...")
exit()
def main():
os.system('clear||cls')
print("Welcome to the password manager")
user_login= input( 'Do you have an existing master key? \n (q) for quit \n choose (y/n/q): ').lower()
if user_login == 'q':
exit_program()
elif user_login=="y":
if df.verify() == False:
main()
True
elif user_login=="n":
df.newMasterKey()
main()
else:
print("Invalid options, choose the correct one \n reloading...")
time.sleep(1)
main()
main()
while True:
mode = input("Would you like to add a new password or view existing ones (view, add)? Press q to quit.: ")
if mode == "q": exit_program()
elif mode == "view":
df.view()
elif mode == "add":
if df.add() == False:
break
else:
print("Invalid mode")