运营狗 - 跳转JS 2020-10-10T17:38:00+08:00 Typecho https://blog.seo135.com/feed/atom/tag/%E8%B7%B3%E8%BD%ACJS/ <![CDATA[黑帽SEO常用PHP+ASP页面劫持JS跳转代码]]> https://blog.seo135.com/1031.html 2020-10-10T17:38:00+08:00 2020-10-10T17:38:00+08:00 运营狗 https://www.seogo.me 分享几个简单的黑帽SEO常用JS跳转代码,做过织梦网站应该对这个几个代码比较熟悉(毕竟经常被黑),只用于黑帽SEO交流学习使用,请勿用于违法行为。

JS判断来路代码

此段代码主要用于百度谷歌点击进入跳转,直接打开网站不跳转:

<script language="Javascript">
var s=document.referrer
if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 )
location.href="https://www.xxx.cn/";
</script>

2、JS直接跳转代码

<script language="Javascript">
location.href="https://www.xxx.cn/";
</script>

3、ASP跳转代码判断来路

<%
if instr(Request.ServerVariables("http_referer"),"www.baidu.com")>0 then
response.redirect("https://www.xxx.cn/")
end if
%>

4、ASP直接跳转

<%
response.redirect("https://www.xxx.cn/")
%>
]]>