Skip to content

Instantly share code, notes, and snippets.

@jpruiz114
Forked from jpatters/HeidiDecode.js
Last active September 15, 2015 20:13
Show Gist options
  • Save jpruiz114/afe5c7da9ae641eac9cc to your computer and use it in GitHub Desktop.
Save jpruiz114/afe5c7da9ae641eac9cc 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.
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'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment