Last active
August 29, 2024 21:01
-
-
Save Informatic/d9661fd4959bb1a551e3ee6cfc2e399c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from hashlib import sha1 | |
import hmac | |
import binascii | |
import time | |
import struct | |
ploy = "..." | |
secret = binascii.unhexlify(b"...") | |
now = struct.pack(">Q", round(time.time() / 30)) | |
hashed = hmac.new(secret, now, sha1) | |
out = hashed.digest() | |
idx = out[-1] & 15 | |
totp = (struct.unpack(">i", out[idx : idx + 4])[0] & (2**31 - 1)) % (10**6) | |
print("https://zlgn.pl/view/dashboard?ploy=%s&loyal=%06d" % (ploy, totp)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment