Skip to content

Instantly share code, notes, and snippets.

@ahmad-511
Created July 31, 2023 18:37
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 ahmad-511/3811cf49193a1dce2b299c324a388d8b to your computer and use it in GitHub Desktop.
Save ahmad-511/3811cf49193a1dce2b299c324a388d8b to your computer and use it in GitHub Desktop.
Decrypting HeidiSQL Password
1 ' Get your encrypted password from your registry Computer\HKEY_CURRENT_USER\SOFTWARE\HeidiSQL\Servers\
2 ' Open your connection node and find the Password key
3 ' You can try this on https://msxpen.com/
4 ' Credit to https://gist.github.com/jpatters/4553139 for the original version
10 CLS: COLOR 12, 1: KEY OFF
20 PRINT "Enter your encrypted password:"
30 LINE INPUT h$
40 st$ = ""
50 sh = VAL(RIGHT$(h$, 1))
60 h$ = LEFT$(h$, LEN(h$) -1)
70 FOR i = 1 TO LEN(h$) STEP 2
80 st$ = st$ + CHR$(VAL("&h" + MID$(h$, i, 2)) - sh)
90 NEXT i
100 PRINT:PRINT "Your password is:"
110 PRINT st$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment