Don't ouput secret, count by default. Don't prepend token with "Code: " by default.

This commit is contained in:
xBytez 2019-10-02 23:56:05 +02:00
parent 17348af064
commit 999157d60e
No known key found for this signature in database
GPG Key ID: AD7CA19F22991C0B
1 changed files with 8 additions and 4 deletions

View File

@ -13,12 +13,16 @@ secret = f.readline()[0:-1]
offset = f.tell()
count = int(f.readline())
print("secret", secret)
print("count", count)
debug = False
hotp = pyotp.HOTP(secret)
print("Code:", hotp.at(count))
if debug:
print("secret", secret)
print("count", count)
print("code:", hotp.at(count))
else:
print(hotp.at(count))
f.seek(offset)
f.write(str(count + 1))
f.close()
f.close()