LFF'S

A programmer programs for problems

2010-10-25 14:30

无耻的中国电信

进来经常在浏览网页的时候发现右下角有弹出的广告窗口,是中国电信的各种产品。
但是我没有访问带有广告的页面,这个广告从哪来的呢。
后来一次访问google首页的时候广告又出来了,查看了下源代码,真相大白了:

电信的ADSL设备在处理http请求的时候没有返回正常的google的页面,而是返回了另外一个页面。源代码见下。里面的

m_u="http://hi.sh.ct10000.com/ad/20101020dongxin/kg.html?Param=FxgpTC+Ls2hNwLgPkZNMd42aD4D9"

这个就是我看到的广告的地址。
整个页面被替换后,新的页面是两个iframe,广告页面首先在一个iframe中弹出,然后原始请求的页面在另一个iframe中显示出来 (最后的 <iframe id="frm" src="http://www.google.com" scrolling=auto width="100%" height="100%" frameborder="no" onload="tit();" style="position:fixed;z-index:-1;"></iframe>)。

不知道是电信的人SB还是什么,有广告窗口的时候,在另一个iframe中显示的要请求的页面没法获取焦点,也就是任何东西都点不了。我用的是Chrome,没测试IE。可能在IE里是好的。


<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title></title><script type="text/javascript">







var ct=0, m_u="http://hi.sh.ct10000.com/ad/20101020dongxin/kg.html?Param=FxgpTC+Ls2hNwLgPkZNMd42aD4D9", l="", p_w=300, p_h=205, p_l=0, p_t=0, pt=4, xyz="5-000000";







var pd=500,cd=0,h="",mb,mc,ml,mt,mp,my=0,ie=document.all?true:false,op=0;if(ie)var location="";setTimeout("i()",pd); function i(){l="http://"+l;mp=gp();bh();if(pt!=5){document.getElementById("temp_box").innerHTML=h;mb=document.getElementById("box");mb.style.width=p_w+"px";if(ct==0)mc=document.getElementById("ai");else{mc=document.getElementById("is");mc.setAttribute("src",m_u);document.getElementById("il").setAttribute("href",l);mc.onclick="gu('"+l+"');"}mc.style.width=p_w+"px";mc.style.height=p_h+"px";ml=p_l!=0?p_l:(mp[0]-p_w)/2;mt=p_t!=0?p_t:(mp[1]-p_h)/2;mb.style.left=ml+"px";mb.style.top=mt+"px";ct==2&&pp()}} function pp(){if(pt==1)mb.style.display="block";else if(pt==2){mb.style.left=mp[0]-p_w-2+"px";mb.style.top=mp[1]+"px";mb.style.display="block";bub()}else if(pt==3){mb.style.left=mp[0]-p_w-2+"px";mb.style.top=mp[1]+"px";mb.style.display="block";tdb()}else if(pt==4){mb.style.left=mp[0]-p_w-2+"px";mb.style.top=mp[1]-p_h-22+"px";mb.style.display="";mc.onload=co}else mb.style.display="block";cd!=0&&setTimeout("cpp()",cd)} function tit(){try{document.title=window.frames.frm.document.title}catch(a){}}function bub(){if(my>=p_h){mc.style.height=p_h;clearTimeout(mm);return false}my+=7;mb.style.top=mp[1]-my-20+"px";if(ct==0)mc.style.height=my+"px";mm=setTimeout("bub()",50)}function tdb(){if(my>=p_h){clearTimeout(mm);return false}my+=7;mb.style.top=my-p_h+"px";mm=setTimeout("tdb()",50)} function co(){if(op<100)op+=4;else{clearTimeout(mm);return false}if(ie)mb.style.filter="alpha(opacity:"+op+")";else mb.style.opacity=op/100;mm=setTimeout("co()",100)} function bh(){if(pt==5){if(ct==0)document.getElementById("top_box").innerHTML='<div id="box" style="width:100%;text-align:center;"><iframe id="ai" name="ai" src="'+m_u+'" scrolling="no" frameborder="no" width="100%" height="'+p_h+'" style="overflow-x:hidden;" ></iframe>';else{document.getElementById("top_box").innerHTML='<div id="box" style="width:100%;text-align:center;"><a id="il" href="#" target="_blank"><img src="'+m_u+'" style="border:none;" /></a><div>';document.getElementById("il").setAttribute("href", l)}setTimeout("cpp()",15E3)}else{h+='<div id="box" style="display:none;background:#1a5990;border:1px solid #1a5990;position:absolute;z-index:10001;font-size:12px;"><style>* html #menu {position:absolute;}</style>';h+='<span style="width:100%;float:left;height:20px;text-align:right;"><a id="close_bnt" href="#" onClick="cpp();return false;" style="line-height:20px;color:#fff;text-decoration:none;">&nbsp;\u5173\u95ed&nbsp;</a></span>';if(ct==0)h+='<iframe id="ai" name="ai" src="'+m_u+'" onload="pp()" scrolling="auto" frameborder="no" width="100%" height="0" style="overflow-x:hidden;"></iframe></div>'; else{h+='<a id="il" href="#" target="_blank" style="float:left;display:block;">';h+='<img id="is" src="#" style="border:none;background:#ccc;vertical-align:bottom;"></a></div>'}}}function gu(a){window.open("http://"+a)}function cpp(){document.getElementById("top_box").style.display="none";document.getElementById("box").style.display="none"} function gp(){var a=document.documentElement;return s=[window.innerWidth||self.innerWidth||a&&a.clientWidth||document.body.clientWidth,window.innerHeight||self.innerHeight||a&&a.clientHeight||document.body.clientHeight]};</script></head><body style="margin:0px;overflow-x:hidden;overflow-y:hidden;"><div id="top_box"></div><iframe id="frm" src="http://www.google.com" scrolling=auto width="100%" height="100%" frameborder="no" onload="tit();" style="position:fixed;z-index:-1;"></iframe><div id="temp_box"></div></body></html>







现在,基本上可以知道整个过程了。
1. 电信在局端有个设置,如果满足了某个条件,那么执行以下动作;
2. 将请求的HTTP页面替换成上面的内容,其中包含了要真正显示的页面;
3. 浏览器收到伪造的页面后,广告的iframe显示出来,然后要请求的页面在iframe中显示出来。
电信通过这种方法来强制用户看广告。
不扯了,直接上工信部的投诉页面来投诉,虽然知道没什么用。另外说一句,工信部的网站集成了政府部门网站的一贯特色:难看,难用,只支持IE。
果然,今早得到了响应:事实不清。
我不知道这帮SB怎么混到工信部这个位置的,这么简单的事情事实不清?你电信把正常的东西替换成广告事实不清?
不愧是某个邪教土匪组织,一贯特色就是黑白不分啊。
继续想办法。

评论