added read password for admin
This commit is contained in:
parent
153c4d282d
commit
9f5ce4ce35
1 changed files with 7 additions and 0 deletions
|
@ -58,6 +58,7 @@ class libexam:
|
||||||
|
|
||||||
username = ""
|
username = ""
|
||||||
questions = []
|
questions = []
|
||||||
|
password = -1
|
||||||
|
|
||||||
def setmode(modein):
|
def setmode(modein):
|
||||||
mode=modein
|
mode=modein
|
||||||
|
@ -75,6 +76,12 @@ class libexam:
|
||||||
print(f"Username set to: {user}\n")
|
print(f"Username set to: {user}\n")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def setadmin():
|
||||||
|
passwordf = open("password.txt", "r")
|
||||||
|
password = passwordf.readline()
|
||||||
|
print(f"Read password: {password}\n")
|
||||||
|
return 0
|
||||||
|
|
||||||
def readquestions():
|
def readquestions():
|
||||||
sha256=hashlib.sha256()
|
sha256=hashlib.sha256()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue