Last active
March 7, 2025 03:33
-
Star
(152)
You must be signed in to star a gist -
Fork
(35)
You must be signed in to fork a gist
-
-
Save jpatters/4553139 to your computer and use it in GitHub Desktop.
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
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
function heidiDecode(hex) { | |
var str = ''; | |
var shift = parseInt(hex.substr(-1)); | |
hex = hex.substr(0, hex.length - 1); | |
for (var i = 0; i < hex.length; i += 2) | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift); | |
return str; | |
} | |
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393')); |
@IsraelIglesiasBIT not sure if you still need it considering this comment was two years ago, but here's a PowerShell solution for encoding passwords for Heidi:
$heidiPass = "password" $obfuscatedPass = '' $shift = Get-Random -Minimum 1 -Maximum 10 for ($i = 0; $i -lt $heidiPass.Length; $i++) { $char = [int][char]$heidiPass[$i] + $shift $hex = $char.ToString("X") $obfuscatedPass += $hex } $obfuscatedPass += $shift.ToString()
π π
Genius. This saved me big time. Thank you!
for nodejs and extract host,port,user,password and save to file
https://gist.github.com/an1creator/c1ea0ca5da38253d2e883bc631e4cc64
Nice, this saved me a few hours to find my old password backup
just in case, here is a MSX BASIC version of the code ππ
10 LINE INPUT h$
20 st$ = ""
30 sh = VAL(RIGHT$(h$, 1))
40 h$ = LEFT$(h$, LEN(h$) -1)
50 FOR i = 1 TO LEN(h$) STEP 2
60 st$ = st$ + CHR$(VAL("&h" + MID$(h$, i, 2)) - sh)
70 NEXT i
80 PRINT st$
If you don't believe me, try it on https://msxpen.com/
Here's an online tool version: heidisql password decoder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a javascript snippet to encode a password: