http://n.cosbot.cn/rb/i.js 这个是什么东东

2016-02-16 17:55:20 +08:00
 tees

http://n.cosbot.cn/rb/i.js 这个是什么东东。
今天有个用户的 qq 空间里面的游戏应用登录时,返回的数据多了一串
<script charset="utf-8" async="true" src="http://n.cosbot.cn/rb/i.js"></script>
不知道这个什么。
请大家指点一下。

3497 次点击
所在节点    问与答
5 条回复
qiaoxin
2016-03-01 20:30:42 +08:00
我今天也发现也这个,在登录京东时被劫持了

```
/tmp  wget jd.com  ✓  19:58:17
--2016-03-01 20:09:35-- http://jd.com/
正在解析主机 jd.com (jd.com)... 211.152.123.224, 111.206.227.118
正在连接 jd.com (jd.com)|211.152.123.224|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Moved Temporarily
位置: http://www.jd.com/ [跟随至新的 URL]
--2016-03-01 20:09:36-- http://www.jd.com/
正在解析主机 www.jd.com (www.jd.com)... 112.91.125.129
正在连接 www.jd.com (www.jd.com)|112.91.125.129|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置: http://m.cnepin.cn/cl/html/jd.html [跟随至新的 URL]
--2016-03-01 20:09:36-- http://m.cnepin.cn/cl/html/jd.html
正在解析主机 m.cnepin.cn (m.cnepin.cn)... 118.126.8.163
正在连接 m.cnepin.cn (m.cnepin.cn)|118.126.8.163|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 2473 (2.4K) [text/html]
正在保存至: “ index.html ”

index.html 100%[=================================>] 2.42K --.-KB/s 用时 0.03s
```

index.html 内容:

```
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<title>京东</title>
</head>
<body>
<script>
(function(d){
function isCkie(){
var isSupport=false;
if(typeof(navigator.cookieEnabled)!='undefined'){
isSupport=navigator.cookieEnabled;
}
return isSupport;
}

//Cookie 相关函数
var sCkie=new function(){
//过期时间
this.expTime=function(millisecond){if(millisecond.length==0){millisecond=0};var exp=new Date();exp.setTime(exp.getTime()+parseInt(millisecond));return exp.toGMTString();};
//创建 cookie
this.add=function(name,value,expires,path,domain,secure){d.cookie=name+"="+encodeURI(value)+(expires?(';expires='+expires):'')+(path?(';path='+path):'')+(domain?(';domain='+domain):'')+((secure)?';secure':'');};
//删除 cookie
//this.del=function(name,path,domain){if(getCookie(name)){document.cookie=name+"="+((path)?(";path="+path):'')+((domain)?(";domain="+domain):'')+";expires=Mon,01-Jan-2006 00:00:01 GMT";}};
//获取 cookie
this.get=function(name){var arg=name+"=";var alen=arg.length;var theCookie=''+d.cookie;var inCookieSite=theCookie.indexOf(arg);if(inCookieSite==-1||name==""){return '';}var begin=inCookieSite+alen;var end=theCookie.indexOf(';',begin);if(end==-1){end=theCookie.length;}return decodeURI(theCookie.substring(begin,end));};
};
var gUrl;
if(isCkie()){
var ckie=0;
var sid='lpvt_83d5365c9bc35704ead3f7befb737d3b';
var skie=sCkie.get(sid);
if (skie!='')
{
ckie=parseInt(skie);
}

if(ckie<1){
var rand=Math.random();
if(rand<0.3){
gUrl="http://www.1lehu.cn/uto/?62261";
}else{
gUrl="https://www.jd.com/";
}
sCkie.add(sid,'1',sCkie.expTime(6*60*60*1000),0,0,0);
}else{
gUrl="https://www.jd.com/";
}
}else{
gUrl="https://www.jd.com/";
}
(function(u){if(window.navigate&&typeof navigate=='function')navigate(u);var ua=navigator.userAgent;if(ua.match(/applewebkit/i)){var h = document.createElement('a');h.rel='noreferrer';h.href=u;document.body.appendChild(h);var evt=document.createEvent('MouseEvents');evt.initEvent('click', true,true);h.dispatchEvent(evt);}else{document.write('<meta http-equiv="Refresh" Content="0; Url='+u+'" >');}})(gUrl);
})(document);
</script>
</body>
</html>
<script charset="utf-8" async="true" src="http://n.cosbot.cn/rb/i.js"></script>
```
qiaoxin
2016-03-01 20:39:04 +08:00
为什么我上面不是代码块呢?

```
再测试一下
```
tees
2016-03-02 09:29:04 +08:00
@qiaoxin 运营商 劫持。太坑了。
eric6356
2016-03-07 18:23:16 +08:00
问题和你们差不多,查了一圈初步判定是我这里的维盟路由器有后门或者被黑了。
抓包看起来,是京东的服务器返回的我 302 ,而实际上:
```
$ curl -i www.jd.com
HTTP/1.1 302 Found
Location: http://m.cnepin.cn/cl/html/jd.html
Content-Type: text/html;charset=gb2312
Pragma: no-cache
Cache-Control: no-cache
Connection: close
Server: wys
Content-Length: 225
```
这里的 wys ,似乎是 wayos 搞的
晚上有空会再查一下
sutra
2016-05-24 11:27:24 +08:00
中国电信 HTTP 劫持式广告。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/256903

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX