Skip to content

Instantly share code, notes, and snippets.

View an1creator's full-sized avatar
:bowtie:
Working from home

Ivan Dyumin an1creator

:bowtie:
Working from home
View GitHub Profile
@an1creator
an1creator / heidisql-ini-decoder.js
Last active April 13, 2023 21:02
Decodes a ini file from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Output to file: host, port, user, password
const fs = require("fs");
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;
}