Skip to content

Instantly share code, notes, and snippets.

@paulofreitas
Last active September 25, 2018 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulofreitas/b3a56cfe605a2ccca8bb43e6009dcf3d to your computer and use it in GitHub Desktop.
Save paulofreitas/b3a56cfe605a2ccca8bb43e6009dcf3d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import argparse
from pyotp import totp # pip3 install pytotp
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('key')
args = parser.parse_args()
print(totp.TOTP(args.key).now())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment