在* .ste文件中编码和解码Adobe Dreamweaver密码

时间:2012-06-12 00:02:10

标签: dreamweaver

如何为retrieve a password from an Adobe Dreamweaver *.ste file编码或解码密码,或动态创建旨在导入Dreamweaver的* .ste文件?

5 个答案:

答案 0 :(得分:1)

此Javascript函数可用于对密码进行编码:

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

此功能可用于解码密码:

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/

答案 1 :(得分:1)

要解码Dreamweaver密码,请将密码分成十六进制(0-9,AF)对,然后根据字符串中的位置从0开始,从每个十六进制数字中减去,然后转换回ASCII。

加密密码5470714865787F将是......

54-0 = 54 => T  
70-1 = 6F => o  
71-2 = 6F => o  
48-3 = 45 => E  
65-4 = 61 => a  
78-5 = 73 => s  
7F-6 = 79 => y

所以5470714865787F =&gt; &#39; TooEasy&#39;

  

我们在我们的网站上有一个这样的工作示例,它允许您解码密码。您还可以复制/粘贴整个.ste文件,它将输出所需的FTP详细信息以进行连接,节省一些时间......

     

http://www.mywebsitespot.com/dreamweaver-password-decode

答案 2 :(得分:0)

很抱歉醒来一个旧线程,但我想我会发布我的解决方案。它是一个单独的HTML5页面,可以加载和解析Dreamweaver STE文件,将密码解码为其中的一部分。我想要一些简单的,离线/本地的(因此解码时不会传输细节)我可以只加载一个STE文件,它会给我所有的FTP细节:

博客文章: http://bobmckay.com/web/dreamweaver-password-ste-file-decoder

解码器页面: http://bobmckay.com/dreamweaver-password-decoder/

希望它对某人有用!

鲍勃

答案 3 :(得分:0)

唤醒旧线程,但除了接受的JavaScript答案之外,我只想为任何感兴趣的人留下两个PHP函数:

编码密码:

function dwste_encode( $pw ){
    $output = '';
    $split = str_split( $pw );
    foreach( $split as $key => $value ){
        $char = ord( $value );
        $char = ( $char + $key );
        $char = dechex( $char );
        $output .= strtoupper( $char );
    }
    return $output;
}

解码密码:

function dwste_decode( $pw ){
    $output = '';
    $split = str_split( $pw, 2 );
    foreach( $split as $key => $value ){
        $char = hexdec( $value );
        $char = ( $char - $key );
        $char = chr( $char );
        $output .= $char;
    }
    return $output;
}

答案 4 :(得分:0)

我今天需要为一个客户端创建许多DW ste文件。我使用以下VBA直接从Excel进行操作。我以@ andrew-odri中的代码为基础。

Function decodeDreamWeaverPass(sHash$)
    Dim sPass$, i&, lHash&, lChar&, sChars$
    lHash = Len(sHash) - 1
    For i = 0 To lHash Step 2
        sChars = Mid(sHash, i + 1, 2)
        lChar = CLng("&H" & sChars)
        lChar = lChar - (i / 2)
        sPass = sPass & Chr(CLng(lChar))
    Next
    decodeDreamWeaverPass = sPass
End Function


Function encodeDreamWeaverPass(sPassword$)
    Dim lTop&, i&, sOutput$
    Dim lPassword&, sChar$, lChar&
    lTop = 0

    lPassword = Len(sPassword) - 1
    For i = 0 To lPassword
        lChar = Asc(Mid(sPassword, i + 1, 1))
        sChar = Chr(lChar)

        If ((lChar < 0) Or (lChar > 65535)) Then
          encodeDreamWeaverPass = ""
        End If

        If lTop > 0 Then
            If (lChar >= 56320) And (lChar <= 57343) Then
                sOutput = sOutput & Hex(65536 + ((lTop - 55296) Xor 10) + (lChar - 56320) + i)
                lTop = 0
            Else
              encodeDreamWeaverPass = ""
            End If
        End If

        If (lChar >= 55296) And (lChar <= 56319) Then
          lTop = lChar
        Else
          sOutput = sOutput & Hex(lChar + i)
        End If
    Next

    encodeDreamWeaverPass = sOutput
End Function