Numberstation is built around
pyotp, which is a <50KB Python library with no other dependencies.
Thus, after doing "
apt install python3-pyotp", one can write some trivial Python:
Code:
#!/usr/bin/env python3
import sys,pyopt,datetime
for a in sys.argv[1:]:
totp = pyotp.parse_uri(a) if a.startswith('otpauth:') else pyotp.totp.TOTP(a)
print (f'''
Name: {totp.name}
Issuer: {totp.issuer}
Secret: {totp.secret}
Password: {totp.now()}
Expires: {int(totp.interval - datetime.datetime.now().timestamp() % totp.interval)} seconds
''')
And then execute it like so:
Code:
$ ./test-totp.py I65VU7K5ZQL7WB4E otpauth://totp/totp@authenticationtest.com?secret=I65VU7K5ZQL7WB4E
Name: Secret
Issuer: None
Secret: I65VU7K5ZQL7WB4E
Password: 458681
Expires: 28 seconds
Name: totp@authenticationtest.com
Issuer: None
Secret: I65VU7K5ZQL7WB4E
Password: 458681
Expires: 28 seconds
Shouldn't be hard to add a QR decoder onto the front of that, and/or something to read secret(s) from somewhere suitably protected.