-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpasswordBank2.py
32 lines (23 loc) · 886 Bytes
/
passwordBank2.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
from CLI import createMasterAccount, authentication, mainmenue
from CLI.mock_api.api import ConnectToDatabase, MasterAccountCheck
connection = None
authenticated = False
while True:
# Check database exists with correct credentials
connection, response = ConnectToDatabase()
if connection == None:
print(80 * "=")
print("\nDabase does not exist or settings not configured correctly")
print("Please configure Environment Variables correctly, and try again\n")
print(80 * "=")
break
# Check that Master Account has been created
masterAccountExists, response = MasterAccountCheck()
if masterAccountExists:
authenticated = authentication.Authentication()
break
else:
createMasterAccount.CreateMasterAccount()
break
if connection != None and authenticated:
mainmenue.MainMenue()