解码heidiSql的密码

先导出heidisql的设置到文本文件. 然后找出密码字段,放到以下的js 去解码.

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;
}

来源: http://www.chasewoodford.com/blog/how-to-recover-a-stored-password-from-heidisql/