updating configuration

This commit is contained in:
Your Name
2021-03-30 23:14:12 +00:00
parent cc9b359203
commit e2aef994e1
7 changed files with 35 additions and 9 deletions
+7 -7
View File
@@ -5,17 +5,17 @@ user = os.getenv('USERNAME')
password = os.getenv('PASSWORD')
secret = os.getenv('SECRET')
if user == "":
if user == None:
print("USERNAME not specified")
os.exit(-1)
os._exit(-1)
if password == "":
if password == None:
print("PASSWORD not specified")
os.exit(-1)
os._exit(-1)
if secret == "":
if secret == None:
print("SECRET not specified")
os.exit(-1)
os._exit(-1)
totp = pyotp.TOTP(secret)
token = totp.now()
@@ -25,4 +25,4 @@ f.write("{}\n".format(user))
f.write('{}{}\n'.format(password, token))
f.close()
print("Generated OTP token for user ({}): {}".format(user,token))
print("Generated OTP token for user ({}): {}".format(user,token))