|
|
本帖最后由 pa001024 于 2011-2-14 11:14 编辑
JS跟C还真像
解压(解密)前的:(文件来源:http://toys.sunyanzi.cn/marisa/javascript.js)
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1 $={9:5,F:6(){2(G.H)1 a=s H();m{1 b=[\'t.o.5.0\',\'t.o.4.0\',\'t.o.3.0\',\'t.o\',\'T.o\'];U(1 n=0;n<b.V;++n)I{1 a=s W(b[n]);X}J(e){}}2(a.u==Y){a.u=0;1 c=6(){a.u=4;2(Z a.A=="6")a.A()};2(a.K)a.K("L",c,B);m a.10("L",c)}k a},v:6(b){1 c=p.w(\'q\');1 d=p.w(\'11\');1 f=p.w(\'12\');1 g=(\'q\'==b)?M:B;2(g&&\'\'==c.C){c.N();k}m 2(r.9<5)r.9=5;1 h=r.F();1 i=\'/13/14.15?\'+O.16();1 j=b+\'=\'+(\'q\'==b?17(c.C):(s P).18());2(g){f.l=\'l\';c.l=\'l\'}19(h){I{1a(\'1b\',i,M);1c(\'1d-1e\',\'1f/x-1g-1h-1i;1j=1k-8\');1l(j);A=6(){2(h.u==4&&h.1m==1n){1 7=1o(\'(\'+1p+\')\');1 a=\'白絲魔理沙:\'+7.1q;2(g){d.y+=\'<D /><z 1r="1s">1t:\'+7.1u+\'</z>\';c.C=\'\';c.l=\'\';f.l=\'\'}2(7.Q&&7.R)d.y+=\'<D /><z 1v="1w:#\'+7.R+\'">\'+7.Q+\'</z>\';2(\'S\'==b)d.y=a;m d.y+=\'<D />\'+a;d.1x=d.1y}}}J(e){1z(e)}}k},1A:6(){G.1B($.E,1C);r.v(\'S\');p.w(\'q\').N();p.1D(\'a\')[0].1E=\'1F\';k},E:6(a){2($.9>0)--$.9;m{1 b=s P();1 c=b.1G();c=O.1H(((c*1I+1J)%1K)/1L.0);$.9=c+5;$.v(\'E\')}k},1M:6(){r.v(\'q\');k B}};',62,111,'|var|if||||function|_||_0|||||||||||return|disabled|else||XMLHTTP|document|text|this|new|MSXML2|readyState|_1|getElementById||innerHTML|span|onreadystatechange|false|value|br|breath|_2|window|XMLHttpRequest|try|catch|addEventListener|load|true|focus|Math|Date|addtext|addcolor|init|Microsoft|for|length|ActiveXObject|break|null|typeof|attachEvent|result|btn|marisa|io|php|random|encodeURIComponent|getHours|with|open|POST|setRequestHeader|Content|Type|application|www|form|urlencoded|charset|utf|send|status|200|eval|responseText|message|class|you|You|echo|style|color|scrollTop|scrollHeight|alert|ready|setInterval|60000|getElementsByTagName|target|_blank|getTime|ceil|9301|49297|233280|11664|talk'.split('|'),0,{}))
复制代码
解压(解密)中的:(T T弄到一半不会了,.,.鹅鹅鹅?好像已经弄完了?)
- var $={
- _0:5,_2:function()
- {
- if(window.XMLHttpRequest)
- var a=new XMLHttpRequest();
- else
- {
- var b=['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'];
- for(var n=0;n<b.length;++n)
- try
- {
- var a=new ActiveXObject(b[n]);
- break;
- }
- catch(e)
- {
- }
- }
- if(a.readyState==null)
- {
- a.readyState=0;
- var c=function()
- {
- a.readyState=4;
- if(typeof a.onreadystatechange=="function")
- a.onreadystatechange()
- };
- if(a.addEventListener)
- a.addEventListener("load",c,false);
- else
- a.attachEvent("load",c)
- }
- return a
- },_1:function(b)
- {
- var c=document.getElementById('text');
- var d=document.getElementById('result');
- var f=document.getElementById('btn');
- var g=('text'==b)?true:false;
- if(g&&''==c.value)
- {
- c.focus();
- return
- }
- else if(this._0<5)
- this._0=5;
- var h=this._2();
- var i='/marisa/io.php?'+Math.random();
- var j=b+'='+('text'==b?encodeURIComponent(c.value):(new Date).getHours());
- if(g)
- {
- f.disabled='disabled';c.disabled='disabled'
- }
- with(h)
- {
- try
- {
- open('POST',i,true);
- setRequestHeader('Content-Type','application/x-www-form-urlencoded;charset=utf-8');
- send(j);
- onreadystatechange=function()
- {
- if(h.readyState==4&&h.status==200)
- {
- var _=eval('('+responseText+')');
- var a='白絲魔理沙:'+_.message;
- if(g)
- {
- d.innerHTML+='<br /><span class="you">You:'+_.echo+'</span>';
- c.value='';
- c.disabled='';
- f.disabled=''
- }
- if(_.addtext&&_.addcolor)
- d.innerHTML+='<br /><span style="color:#'+_.addcolor+'">'+_.addtext+'</span>';
- if('init'==b)
- d.innerHTML=a;
- else
- {
- d.innerHTML+='<br />'+a;
- d.scrollTop=d.scrollHeight
- }
- }
- }
- catch(e)
- {
- alert(e)
- }
- }
- return
- },ready:function()
- {
- window.setInterval($.breath,60000);
- this._1('init');
- document.getElementById('text').focus();
- document.getElementsByTagName('a')[0].target='_blank';
- return
- },breath:function(a)
- {
- if($._0>0)
- --$._0;
- else
- var b=new Date();
- var c=b.getTime();
- c=Math.ceil(((c*9301+49297)%233280)/11664.0);
- $._0=c+5;
- $._1('breath')
- }
- return
- },talk:function()
- {
- this._1('text');
- return false
- }
- };
复制代码
接下来是网页分析。
。
源代码就是这样:
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <!-- saved from url=(0031)http://toys.sunyanzi.cn/marisa/ -->
- <HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><META
- content="IE=7.0000" http-equiv="X-UA-Compatible">
- <TITLE>看蓝猫学蓝猫我有姿势我自豪!</TITLE>
- <META content="text/html; charset=utf-8" http-equiv=Content-Type><LINK
- rel=stylesheet type=text/css href="看蓝猫学蓝猫我有姿势我自豪!_files/stylesheet.css"
- media=screen>
- <SCRIPT type=text/javascript src="看蓝猫学蓝猫我有姿势我自豪!_files/javascript.js"></SCRIPT>
- <META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
- <BODY onload=$.ready();>
- <DIV class=container>
- <DIV class=main>
- <DIV class=title>うるさい!うるさい!うるさい!!</DIV>
- <DIV id=result><SPAN class=loading><!--少女祈祷中-->正在建立和白絲魔理沙的连接 ...</SPAN></DIV>
- <DIV>
- <FORM onsubmit="return $.talk();" method=post action="">
- <P><INPUT id=text name=message>
- <INPUT id=btn value=发送 type=submit></P></FORM></DIV></DIV>
- <DIV class=right>
- <DIV class=avatar><IMG alt=marisa
- src="看蓝猫学蓝猫我有姿势我自豪!_files/75_48029_2d0cfdf1de68ef0.jpg"></DIV>
- <DIV class=notice>系统级指令快速说明——
- <P><B>teach</B> 进入内容教学模式<BR><B>forget</B> 忘记最后所说的内容<BR><B>application</B>
- 管理外部应用接口<BR><B>status</B> 查看目前知识掌握情况</P>另外你也可以通过输入 <B>hint</B>
- 查看其他人自定义的内容提示或小小线索。<BR><BR>魔理沙无条件的相信你,她把你教给她的所有知识视作珍宝并会很认真的将其牢牢记住,不要让她学坏哦。</DIV></DIV>
- <DIV class=about>※ 白絲魔理沙这个名字只是一个捏他,和东方系列几乎没有关系。 // <A
- href="http://t.qq.com/shiromuku">Version 1.1.7</A></DIV></DIV></BODY></HTML>
复制代码 分析:
- 文本框 数量 = 1
- 文本框 001 message text
- SPAN 数量 = 2
- SPAN 001 You:www
- SPAN 002 You:哦?
- 超级链接 数量 = 1
- 超级链接 001 Version 1.1.7 http://t.qq.com/shiromuku
- 图片 数量 = 1
- 图片 001【218 × 270】 http://220.196.42.172/attachments/Mon_1012/75_48029_2d0cfdf1de68ef0.jpg
- 按钮 数量 = 1
- 按钮 001 发送 btn
- DIV 数量 = 9
- div 001 うるさい!うるさい!うるさい!!
- 白絲魔理沙:上午好 ... 新的一天 ... 要努力哦 ...
- You:www
- 白絲魔理沙:哦? @w@
- You:哦?
- 白絲魔理沙:嗯嗯>_<
- 系统级指令快速说明——
- teach 进入内容教学模式
- forget 忘记最后所说的内容
- application 管理外部应用接口
- status 查看目前知识掌握情况
- 另外你也可以通过输入 hint 查看其他人自定义的内容提示或小小线索。
- 魔理沙无条件的相信你,她把你教给她的所有知识视作珍宝并会很认真的将其牢牢记住,不要让她学坏哦。※ 白絲魔理沙这个名字只是一个捏他,和东方系列几乎没有关系。 // Version 1.1.7
- div 002 うるさい!うるさい!うるさい!!
- 白絲魔理沙:上午好 ... 新的一天 ... 要努力哦 ...
- You:www
- 白絲魔理沙:哦? @w@
- You:哦?
- 白絲魔理沙:嗯嗯>_<
- div 003 うるさい!うるさい!うるさい!!
- div 004 白絲魔理沙:上午好 ... 新的一天 ... 要努力哦 ...
- You:www
- 白絲魔理沙:哦? @w@
- You:哦?
- 白絲魔理沙:嗯嗯>_< result
- div 005
- div 006 系统级指令快速说明——
- teach 进入内容教学模式
- forget 忘记最后所说的内容
- application 管理外部应用接口
- status 查看目前知识掌握情况
- 另外你也可以通过输入 hint 查看其他人自定义的内容提示或小小线索。
- 魔理沙无条件的相信你,她把你教给她的所有知识视作珍宝并会很认真的将其牢牢记住,不要让她学坏哦。
- div 007
- div 008 系统级指令快速说明——
- teach 进入内容教学模式
- forget 忘记最后所说的内容
- application 管理外部应用接口
- status 查看目前知识掌握情况
- 另外你也可以通过输入 hint 查看其他人自定义的内容提示或小小线索。
- 魔理沙无条件的相信你,她把你教给她的所有知识视作珍宝并会很认真的将其牢牢记住,不要让她学坏哦。
- div 009 ※ 白絲魔理沙这个名字只是一个捏他,和东方系列几乎没有关系。 // Version 1.1.7
- 表单 数量 = 1
- 表单 001 提交方式:post
复制代码 封包:
- POST /marisa/io.php?0.XXXXXXXXXXXXXXXX //(这里的数字是可变的。具体含义我不知道T T)
- //发送数据之前就会出现
- 例:
- POST /marisa/io.php?0.2895200437228579 HTTP/1.1
- Accept: */*
- Accept-Language: zh-cn
- Referer: http://toys.sunyanzi.cn/marisa/
- Content-Type: application/x-www-form-urlencoded;charset=utf-8
- Accept-Encoding: gzip, deflate
- User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
- Host: toys.sunyanzi.cn
- Content-Length: 8
- Connection: Keep-Alive
- Cache-Control: no-cache
- Cookie: PHPSESSID=5cb2otemikvc6bfsptphft5ih5
- 提交数据:
- HTTP/1.1 200 OK
- Date: Mon, 14 Feb 2011 02:26:35 GMT
- Server: Apache
- Expires: Thu, 19 Nov 1981 08:52:00 GMT
- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
- Pragma: no-cache
- Keep-Alive: timeout=15, max=100
- Connection: Keep-Alive
- Transfer-Encoding: chunked
- Content-Type: text/html
- 4a
- {"echo":"www","message":"\u54e6\uff1f @w@","addcolor":null,"addtext":null}
- 0
复制代码- SEND类型 POST方式
- 封包:
- text=%E5%93%A6%EF%BC%9F //这里是发送出去的文字的HTML代码,.用百度就可以转换
- 提交数据:
- HTTP/1.1 200 OK
- Date: Mon, 14 Feb 2011 02:27:34 GMT
- Server: Apache
- Expires: Thu, 19 Nov 1981 08:52:00 GMT
- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
- Pragma: no-cache
- Keep-Alive: timeout=15, max=100
- Connection: Keep-Alive
- Transfer-Encoding: chunked
- Content-Type: text/html
- 58
- {"echo":"\u54e6\uff1f","message":"\u55ef\u55ef>_<","addcolor":null,"addtext":null}
- 0
复制代码 返回包:
- HTTP/1.1 200 OK
- Date: Mon, 14 Feb 2011 02:26:35 GMT
- Server: Apache
- Expires: Thu, 19 Nov 1981 08:52:00 GMT
- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
- Pragma: no-cache
- Keep-Alive: timeout=15, max=100
- Connection: Keep-Alive
- Transfer-Encoding: chunked
- Content-Type: text/html
- 4a
- {"echo":"www","message":"\u54e6\uff1f @w@","addcolor":null,"addtext":null}
- 0
- 对应的提交数据:
-
- POST /marisa/io.php?0.7800735880673347 HTTP/1.1
- Accept: */*
- Accept-Language: zh-cn
- Referer: http://toys.sunyanzi.cn/marisa/
- Content-Type: application/x-www-form-urlencoded;charset=utf-8
- Accept-Encoding: gzip, deflate
- User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
- Host: toys.sunyanzi.cn
- Content-Length: 23
- Connection: Keep-Alive
- Cache-Control: no-cache
- Cookie: PHPSESSID=5cb2otemikvc6bfsptphft5ih5
复制代码
|
|