mirror of https://github.com/xBytez/duo-cli
Merge pull request #2 from xBytez/feature/quiet-generation
Silence generate script
This commit is contained in:
commit
fb57239727
12
duo_gen.py
12
duo_gen.py
|
@ -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()
|
Loading…
Reference in New Issue