Created
May 13, 2024 22:51
-
-
Save langheran/a0acbb89e8f2ad0af7cdae7375264ede to your computer and use it in GitHub Desktop.
C:\Users\NisimHurst\NDS\scripts\totp.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python totp.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %% | |
# | |
import pyotp | |
import time | |
import pyperclip | |
import os | |
from dotenv import ( | |
load_dotenv, | |
find_dotenv | |
) | |
DOTENV = os.environ.get('DOTENV', find_dotenv()) | |
load_dotenv(DOTENV, override=True) | |
XIGNUX_OTP = os.environ.get('XIGNUX_OTP') | |
totp = pyotp.TOTP(XIGNUX_OTP) | |
code = totp.now() | |
pyperclip.copy(code) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment