Skip to content

Instantly share code, notes, and snippets.

@Kcko
Created March 18, 2024 15:41
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 Kcko/72fbe67d1acf8b10c6da5524e82bd0c5 to your computer and use it in GitHub Desktop.
Save Kcko/72fbe67d1acf8b10c6da5524e82bd0c5 to your computer and use it in GitHub Desktop.
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;
}
heidiDecode('pwd ...')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment