您的位置:首页 > Web前端 > JavaScript

也谈*.Encode(JScript, VBScript等)的解密

2004-09-20 19:18 465 查看
1、加密程序获得地址:
繁體中文 http://download.microsoft.com/download/winscript56/Install/1.0/W98NT42KMeXP/TW/sce10cht.exe English http://download.microsoft.com/download/0/0/7/0073477f-bbf9-4510-86f9-ba51282531e3/sce10en.exe 2、解密原理(以下代码在 IE6 sp1下测试通过).[下载解密完整包]


// 打开一空白窗口; top = 6000, left = 7000设置是为了不让窗口可见.
var win = window.open("about:blank", "SunflowerJM", "top = 6000, left = 7000, width = 100, height = 30");
if( null != win )
{
    var obj = window.document.getElementById('jjstr'); // jjstr 是我让别人填写待解密串输入框的ID号:<TEXTAREA id='jjstr' name='jjstr' rows='18'></TEXTAREA >
   
    win.document.writeln( "<html><body><scr" + "ipt language=javascript>window.onerror = new Function(';return true;');</sc" + "ript>" );
    win.document.writeln( obj.value );
    win.document.writeln( "</body></html>" );
    win.document.close();
   
    if( !win .closed )
    {
       var objScpt = win.document.getElementsByTagName("script"); // 取加密的串。这个时候取处的串是内存中的串,所以已经是解密的了。
      
       if( 50 < objScpt[ objScpt.length - 1] .innerHTML.length ) // 如果长度小余50就没有解密的意义了
           obj.value = objScpt[objScpt.length - 1 ].innerHTML;
       else
           alert("解密失败:可能十您拷贝代码的过程中是已经改变原来的代码了?!/n/n或者代码长度小于50了。");
    }
}
win.close();

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息