Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHA1 and TOTP
#18
(08-23-2024, 12:43 AM)Ra7eN Wrote: It produced codes but not the correct one. I put my secretkey in FFXIV for example, and kept failing, went back to the python/qb64 worked perfect

I switched the following:
Code: (Select All)

key$ = "Hello!" + CHR$(&HDE) + CHR$(&HAD) + CHR$(&HBE) + CHR$(&HEF)

to
Code: (Select All)

key$ = "1234MYSECRETKEY567890" + CHR$(&HDE) + CHR$(&HAD) + CHR$(&HBE) + CHR$(&HEF)

again, codes kept popping up like normal. but they were not correct

Sorry, it's not super clear from your example, is `1234MYSECRETKEY567890` the base32 version or the binary version of your key? The C code does not do the decoding, so you have to provide it the decoded binary key.

Ex. The actual key for my test was `JBSWY3DPEHPK3PXP`, which when decoded as base32 produces the "Hello!" plus DEADBEEF string that I put in `key$`. The chances are high that your key will not be ASCII like my example one when decoded, so your key will just be a series of `CHR$()`s.
Reply


Messages In This Thread
SHA1 and TOTP - by Ra7eN - 08-21-2024, 01:35 AM
RE: SHA1 and TOTP - by TerryRitchie - 08-21-2024, 01:48 AM
RE: SHA1 and TOTP - by Ra7eN - 08-21-2024, 02:13 AM
RE: SHA1 and TOTP - by SMcNeill - 08-21-2024, 03:47 AM
RE: SHA1 and TOTP - by RhoSigma - 08-21-2024, 10:44 AM
RE: SHA1 and TOTP - by DSMan195276 - 08-21-2024, 04:19 AM
RE: SHA1 and TOTP - by Ra7eN - 08-21-2024, 05:14 PM
RE: SHA1 and TOTP - by Ra7eN - 08-21-2024, 09:44 PM
RE: SHA1 and TOTP - by Ra7eN - 08-22-2024, 12:01 AM
RE: SHA1 and TOTP - by Ra7eN - 08-22-2024, 12:09 AM
RE: SHA1 and TOTP - by Ra7eN - 08-22-2024, 12:25 AM
RE: SHA1 and TOTP - by SpriggsySpriggs - 08-22-2024, 11:29 AM
RE: SHA1 and TOTP - by Ra7eN - 08-22-2024, 11:37 AM
RE: SHA1 and TOTP - by DSMan195276 - 08-22-2024, 12:13 PM
RE: SHA1 and TOTP - by Ra7eN - 08-22-2024, 11:41 PM
RE: SHA1 and TOTP - by DSMan195276 - 08-23-2024, 12:32 AM
RE: SHA1 and TOTP - by Ra7eN - 08-23-2024, 12:43 AM
RE: SHA1 and TOTP - by DSMan195276 - 08-23-2024, 06:30 AM
RE: SHA1 and TOTP - by Ra7eN - 08-24-2024, 12:38 AM
RE: SHA1 and TOTP - by Kernelpanic - 08-24-2024, 08:37 PM



Users browsing this thread: 1 Guest(s)