Skip to content
Snippets Groups Projects
Verified Commit 6d07e94c authored by Jakob Moser's avatar Jakob Moser
Browse files

Add initial version of script

parents
No related branches found
No related tags found
No related merge requests found
__pycache__
main.py 0 → 100755
#!/usr/bin/env python3
import pyotp
import keyring
def enroll_token(token_uri: str) -> None:
keyring.set_password("unihd", "2fa", token_uri)
def get_otp() -> str:
mfa_uri = keyring.get_password("unihd", "2fa")
otp = pyotp.parse_uri(mfa_uri)
return otp.now()
if __name__ == "__main__":
print(get_otp())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment