KR/jd_superBrandz.js

10 lines
44 KiB
JavaScript
Raw Permalink Normal View History

2023-07-27 16:14:01 +08:00
/*
特物Z_超级品牌殿堂
cron:18 0,18 * * *
18 0,18 * * * jd_superBrandz.js
*/
const $ = new Env('特物Z_超级品牌殿堂');
var version_='jsjiami.com.v7';const IlI1ll=iii1II;(function(IlI1l1,liIliI,llii1I,iiIiIi,l1lll1,IilI,liIlli){return IlI1l1=IlI1l1>>0x3,IilI='hs',liIlli='hs',function(lil11,Iillll,lllI1,III11I,Ilii1){const IlI1li=iii1II;III11I='tfi',IilI=III11I+IilI,Ilii1='up',liIlli+=Ilii1,IilI=lllI1(IilI),liIlli=lllI1(liIlli),lllI1=0x0;const ll11i1=lil11();while(!![]&&--iiIiIi+Iillll){try{III11I=-parseInt(IlI1li(0x1a7,'VUm3'))/0x1*(parseInt(IlI1li(0x1cc,'10LO'))/0x2)+parseInt(IlI1li(0x275,'eqz@'))/0x3+-parseInt(IlI1li(0x1c8,'OHd4'))/0x4+-parseInt(IlI1li(0x228,'hdCk'))/0x5*(parseInt(IlI1li(0x27f,'u^sq'))/0x6)+-parseInt(IlI1li(0x1e8,'5r(#'))/0x7+-parseInt(IlI1li(0x1c9,'PtlL'))/0x8*(-parseInt(IlI1li(0x176,'z5G@'))/0x9)+-parseInt(IlI1li(0x256,'OHd4'))/0xa*(-parseInt(IlI1li(0x254,'DA3L'))/0xb);}catch(ili1I1){III11I=lllI1;}finally{Ilii1=ll11i1[IilI]();if(IlI1l1<=iiIiIi)lllI1?l1lll1?III11I=Ilii1:l1lll1=Ilii1:lllI1=Ilii1;else{if(lllI1==l1lll1['replace'](/[NkRDCXrgebEqGUSuBQK=]/g,'')){if(III11I===Iillll){ll11i1['un'+IilI](Ilii1);break;}ll11i1[liIlli](Ilii1);}}}}}(llii1I,liIliI,function(Iill,ili1II,liIllI,ll11i,iI1lI1,I1I1li,l1i11){return ili1II='\x73\x70\x6c\x69\x74',Iill=arguments[0x0],Iill=Iill[ili1II](''),liIllI='\x72\x65\x76\x65\x72\x73\x65',Iill=Iill[liIllI]('\x76'),ll11i='\x6a\x6f\x69\x6e',(0x13372c,Iill[ll11i](''));});}(0x640,0xaba8e,Iii11l,0xca),Iii11l)&&(version_=Iii11l);function iii1II(_0x28c429,_0x35bef4){const _0x5c760d=Iii11l();return iii1II=function(_0xc5fd11,_0x4fec56){_0xc5fd11=_0xc5fd11-0x12b;let _0x3e34f8=_0x5c760d[_0xc5fd11];if(iii1II['EGTxJB']===undefined){var _0x459a2a=function(_0x5c5837){const _0x166f41='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x249883='',_0x439186='';for(let _0x597086=0x0,_0x4bff25,_0x39fc33,_0x2128c4=0x0;_0x39fc33=_0x5c5837['charAt'](_0x2128c4++);~_0x39fc33&&(_0x4bff25=_0x597086%0x4?_0x4bff25*0x40+_0x39fc33:_0x39fc33,_0x597086++%0x4)?_0x249883+=String['fromCharCode'](0xff&_0x4bff25>>(-0x2*_0x597086&0x6)):0x0){_0x39fc33=_0x166f41['indexOf'](_0x39fc33);}for(let _0x489301=0x0,_0x1611c=_0x249883['length'];_0x489301<_0x1611c;_0x489301++){_0x439186+='%'+('00'+_0x249883['charCodeAt'](_0x489301)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x439186);};const _0x5f4914=function(_0x1e8697,_0x95b133){let _0x1486f0=[],_0x1ef088=0x0,_0x45ccc8,_0x505d48='';_0x1e8697=_0x459a2a(_0x1e8697);let _0x47cdf6;for(_0x47cdf6=0x0;_0x47cdf6<0x100;_0x47cdf6++){_0x1486f0[_0x47cdf6]=_0x47cdf6;}for(_0x47cdf6=0x0;_0x47cdf6<0x100;_0x47cdf6++){_0x1ef088=(_0x1ef088+_0x1486f0[_0x47cdf6]+_0x95b133['charCodeAt'](_0x47cdf6%_0x95b133['length']))%0x100,_0x45ccc8=_0x1486f0[_0x47cdf6],_0x1486f0[_0x47cdf6]=_0x1486f0[_0x1ef088],_0x1486f0[_0x1ef088]=_0x45ccc8;}_0x47cdf6=0x0,_0x1ef088=0x0;for(let _0x281951=0x0;_0x281951<_0x1e8697['length'];_0x281951++){_0x47cdf6=(_0x47cdf6+0x1)%0x100,_0x1ef088=(_0x1ef088+_0x1486f0[_0x47cdf6])%0x100,_0x45ccc8=_0x1486f0[_0x47cdf6],_0x1486f0[_0x47cdf6]=_0x1486f0[_0x1ef088],_0x1486f0[_0x1ef088]=_0x45ccc8,_0x505d48+=String['fromCharCode'](_0x1e8697['charCodeAt'](_0x281951)^_0x1486f0[(_0x1486f0[_0x47cdf6]+_0x1486f0[_0x1ef088])%0x100]);}return _0x505d48;};iii1II['zSGmWs']=_0x5f4914,_0x28c429=arguments,iii1II['EGTxJB']=!![];}const _0x4f203d=_0x5c760d[0x0],_0x459a19=_0xc5fd11+_0x4f203d,_0x3f2c36=_0x28c429[_0x459a19];return!_0x3f2c36?(iii1II['MlPNQY']===undefined&&(iii1II['MlPNQY']=!![]),_0x3e34f8=iii1II['zSGmWs'](_0x3e34f8,_0x4fec56),_0x28c429[_0x459a19]=_0x3e34f8):_0x3e34f8=_0x3f2c36,_0x3e34f8;},iii1II(_0x28c429,_0x35bef4);}function Iii11l(){const liIlll=(function(){return[version_,'NkgjsEjEiqBamQiE.GcRDoremBk.uBvKXe7UbCSr==','5RoF5P6c5P2P6kYD5yIs5RE+5yUE5l2B5Ok6','W6q+WQKAzG','W6jVWP7dV3vwWP55WPO','W4tcT2TMzq','WQLiW4pcJa','aumg','W5ldVGZdJmkWWQmFz8kdWOijlHm6e8ot','A8kMWOlcOqe','WQZcKdRdVSkX','WOdcNmkpW4NcUW','W5rVWQldRLW','WO5DW5JcVSkl','CZ/cP1hdIaitWQxdPW','bvK3fqVdSmooWPu','W6/cUbSVW64','W7/dK0T1WRq','af8g','bwmYcWm','W7xcOCkPW4RcVa','WONcUSkxW58','WQmRW5xcRI4hW45xWPRdGCowt1e','W59CW6FcJmkmWQxdOmovsCk9hmo3WRhcPH/cRrzzewiBWQT6W7ddQ2dcGSk4chddRt4kWOHvja','W6GDW4z/ECkwWQpdJ18',
// prettier-ignore
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d