今天处理问题遇到一个挂马的问题很是奇怪,模拟蜘蛛访问会显示挂马信息,但再次刷新就没有了,多次测试都这样,于是坚定认为是挂马代码中判断了cookie,通过多方排查,终于在网站根目录下的公共文件中找到了此代码了。
代码如下:
<script language="vbscript" runat="server">
'by * blog.mydns.vip
sub Application_OnStart
end sub
sub Application_OnEnd
end sub
sub Session_OnStart
user_agent=Request.ServerVariables("HTTP_USER_AGENT")
If check(user_agent)=true then
response.write("<html><body>"&vbcrlf)
response.write("<p><a href=""http://xxxxx/"">非法关键字</b></a></p>"&vbcrlf)
response.write("<p><a href=""http://xxxxx"">非法关键字</a></p>"&vbcrlf)
response.write("</body></html>")
end if
end sub
'sub Session_OnEnd
'end sub
Public Function check(user_agent)
allow_agent=split("spider,robot,Baidu,Google,360spider,sogou,soso",",")
check_agent=false
For agents=lbound(allow_agent) to ubound(allow_agent)
If instr(1,user_agent,allow_agent(agents),1)>0 then
check_agent=true
exit for
end if
Next
check=check_agent
End function
</script>
删除该代码后恢复正常,记录一下,觉得这个代码非常不错,虽然看不懂,哈哈哈
» 本文链接地址:https://blog.mydns.vip/504.html
最新评论
支持下
学习一下
是否是