对* .ste文件中的Adobe Dreamweaver密码进行编码和解码 [英] Encode and decode an Adobe Dreamweaver password in *.ste file

查看:104
本文介绍了对* .ste文件中的Adobe Dreamweaver密码进行编码和解码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何对密码进行编码或解码,以从Adobe Dreamweaver * .ste文件检索密码,还是动态创建旨在导入Dreamweaver的* .ste文件?

How is a password encoded or decoded in order to retrieve a password from an Adobe Dreamweaver *.ste file, or to dynamically create a *.ste file designed to be imported into Dreamweaver?

推荐答案

此Javascript函数可用于编码密码:

This Javascript function can be used to encode the password:

function encodePassword(input)
{
    var top = 0;
    var output = '';

    for(var i = 0; i < input.length; i++){
        var currentChar = input.charCodeAt(i);
        if(currentChar < 0 || currentChar > 0xFFFF){return(false);}
        if(top != 0){
            if(0xDC00 <= currentChar && currentChar <= 0xDFFF){
                output += dec2hex(0x10000 + ((top - 0xD800) << 10) + (currentChar - 0xDC00) + i) + '';
                top = 0;
                continue;
                // Insert alert for below failure
            }else{return(false);}
        }
        if(0xD800 <= currentChar && currentChar <= 0xDBFF){top = currentChar;}
        else{output += dec2hex(currentChar + i) + '';}
    }

    return(output);
}

function dec2hex(input){return(input+0).toString(16).toUpperCase();}

此功能可用于解码密码:

And this function can be used to decode the password:

function decodePassword(input)
{
    var output = "";

    if(input.length == 0){return("");}

    for(var i = 0; i < input.length / 2; i++){
        var currentHex = parseInt(input.substr(i * 2, 2), 16);
            if(currentHex <= 0xFFFF){
                output += String.fromCharCode(currentHex - i);
            }else if(currentHex <= 0x10FFFF){
                currentHex -= 0x10000
                output += String.fromCharCode(0xD800 | (currentHex >> 10)) + String.fromCharCode(0xDC00 | (currentHex & 0x3FF) - i);
            }else{
                //Insert alert for below failure
                return(false);
        }
    }

    return(output);
}

您也可以使用此工具在线执行此操作,而无需任何代码: http://blog.affirmix.com/2009 / 05/05 / live-ste-dreamweaver-password-encoder-and-decoder /

You can also do this online without any code using this tool: http://blog.affirmix.com/2009/05/05/live-ste-dreamweaver-password-encoder-and-decoder/

这篇关于对* .ste文件中的Adobe Dreamweaver密码进行编码和解码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆