资料只看看,不能copy/paste。

http://blog.itpub.net/rss/137/288
昨天有朋友要我帮她拷贝几个资料网页下来,但是那个网站做了很多手脚,资料只看看,不能copy/paste。我还是比较鄙视这种网站的,只能看不能摸,多无聊啊。

昨天快下班了,所以也没怎么搞,今天上午就看了一下



首先页面的那个iframe转向encrypt.asp?act=BODY&id=740,拿下来看看,这个源文件中的关键部分是这么写的

<script LANGUAGE="Javascript">

document.write(unescape("%0D%0A%3C%21DOCTYPE%20Hx54ML%20PUBLIC%20%22-..............."));

</SCRIPT>

转吧,呵呵,javascript我就会用alert,可是alert出来的东西不能保存啊,好在escape编码很简单,就是一个%和%u的转换处理,所以,就手写了一个c程序,来做这个转换,出来的东西再看,倒,居然还是继续用JScript.Encode编码过的

<script LANGUAGE="JScript.Encode"> #@~^LAcAAA==[Km;sYRSDbO+vB@!C:HJ@*@!C2z9@*@!Kq:....................

</script>

那就继续解码吧,这个我不写程序了,网上找了一个网站 http://www.vvss.net/tools/encode.htm,解开一看,呵呵,豁然开朗啊。

document.write('<HTML><HEAD><TITLE>blah blah blah loading...</TITLE><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></HEAD> <body> ');

document.write("正在加载...");

function doit(){

document.write('<HTML><HEAD><TITLE>blah blah blah</TITLE><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></HEAD>');

document.write('<FRAMESET ROWS="0,100%" framespacing="0" border="0" frameborder="0">');

document.write(' <FRAME SRC="about:blank" border=0 NAME="fTop">');

document.write(' <FRAME SRC="about:blank" border=0 NAME="fBottom">');

document.write('</FRAMESET></HTML>');

setTimeout("top.fBottom.location.replace('encrypt.asp?id="+request("id")+"')", 100);

}

function start()

{

 setTimeout("doit();", 200);

}

var _RequestArray;

function requestReset(){

 var i,j;

 var urlrequest="";

 if (document.location.href.indexOf("?")>0) urlrequest=document.location.href.substr(document.location.href.indexOf("?")+1);

 try{

  _RequestArray=urlrequest.split('&');

  if (_RequestArray[0]=='')_RequestArray=new Array();

  for (i=0;i<_RequestArray.length;i++){

   if (_RequestArray[i].indexOf('=')>=0){

    varname=unescape(_RequestArray[i].substr(0,_RequestArray[i].indexOf('=')));

    value=unescape(_RequestArray[i].substr(_RequestArray[i].indexOf('=')+1));

   }

   else{

    varname=unescape(_RequestArray[i]);

    value='';

   }

   _RequestArray[i]=new Array(varname,value);

  }

 }catch(e){}

}

function request(varname){

 var i,lname=varname.toLowerCase();

 

 for (i=0;i<_RequestArray.length;i++){

  try{

   if (_RequestArray[i][0].toLowerCase()==lname)return _RequestArray[i][1];

  }catch(e){}

 }

 return '';

}

requestReset();

start();

显然关键地方就一行:

setTimeout("top.fBottom.location.replace('encrypt.asp?id="+request("id")+"')", 100);

祭出flashget,让我们下载吧

下载目标:encrypt.asp?id=740,

引用页面:encrypt.asp?act=BODY&id=740

哈哈,接着看下载到的这个东西,家伙很鬼的,文件看上去很短,</html>结束标签后,搞了无数的空白行,让你以为文件就是这么小了,多亏我目光如矩,看到了滚动条,哈哈,狂拖到底,代码出现了。

                            <script LANGUAGE="JScript.Encode">#@~^pAAAAA==[Km;s+ YRSDbO+vJw62Zd^'6GyrwD-!WTJbg-Xv{j)!A-a&Gv9UmwaF k2O'6+2AU1W[B'!cZ/M^-X&9+ mwaF XaO-X 2md2gmmD'$!9eLk['rQNKm;hxY C^V k9(GRr xDK6DQJ@*-a&;-&d1-6F+kaY@*rbIeTYAAA==^#~@</SCRIPT>

再解码,看

document.write("x3Cscx72ipt40LANx67UAGEx3D'JScx72iptx2EEncode'40srcx3Dencx72yptx2Easp?act=B0DY&id="+document.all.idID.innerText+">x3C/scx72ipt>");

哈哈,这么多编码,累不累啊,我解

<script LANgUAGE='JScript.Encode' src=encrypt.asp?act=B0DY&id=740></script>

hoho,狐狸尾巴出来了,encrypt.asp?act=B0DY&id=740,呵呵,注意了,act那里写的是b0dy,不是body啊,看来好像是找到最终目标链接了,乐。

下载好像不行,不过问题不大,在ie的缓存里很轻松的就找到这个链接文件了,倒,小伙子还真能蒙人啊,居然是个.gif文件,看来心思没少花啊,找个文本编辑器把这个.gif文件打开,里面果然就是JScript.Encode过的东西,再解码,哈哈哈哈哈,看看是什么:

function draw(doc,s){doc.all.iDB0DY.innerHTML=s;}

s="%3CDIV%3E%u3000%u3000%3C/DIV%3E%20%3CDIV%3E%3CSTRONG%3E%u3000%u3000%u4E00%u3001%

............

window.onload=new Function("draw(document,unescape(s));");

window.status='完成!';

bingo,就是你了,哈哈,把这个东西,加个头尾,做成一个html文件

<html>

<script language="JavaScript">

function draw(doc,s){doc.all.iDB0DY.innerHTML=s;}

s="...........";

window.status='完成!';

</script>

<body>

<div id=iDB0DY></div>

</body>

</html>

哈哈,呵呵,看看时间,2个小时不到,主要是在写程序unescape上了,不过还算满意。哈哈哈



为避免纠纷,网站的名字已经隐去。

http://blog.itpub.net/post/137/30955 Thu, 26 May 2005 11:21:34 +0000
原文地址:https://www.cnblogs.com/cy163/p/278625.html