2023-09-18 11:58:46 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lIlil111=illil1l;(function(IIlI1lIi,l1i1llIi,ill111l1,IllliiIi,i111ii1l,il1li,IIIIlIl){return IIlI1lIi=IIlI1lIi>>0x3,il1li='hs',IIIIlIl='hs',function(i1il1I1,IilI11i,IliiiII,iI1lIil1,lIIIiili){const IIII1II1=illil1l;iI1lIil1='tfi',il1li=iI1lIil1+il1li,lIIIiili='up',IIIIlIl+=lIIIiili,il1li=IliiiII(il1li),IIIIlIl=IliiiII(IIIIlIl),IliiiII=0x0;const iI111llI=i1il1I1();while(!![]&&--IllliiIi+IilI11i){try{iI1lIil1=parseInt(IIII1II1(0x19a,'CoIp'))/0x1+parseInt(IIII1II1(0x3e2,'XaiO'))/0x2+-parseInt(IIII1II1(0x2b9,'bC[@'))/0x3*(parseInt(IIII1II1(0x29f,'qMkq'))/0x4)+parseInt(IIII1II1(0x37a,'kLZR'))/0x5*(-parseInt(IIII1II1(0x36b,'qMkq'))/0x6)+-parseInt(IIII1II1(0x1c1,'mwk('))/0x7*(-parseInt(IIII1II1(0x2f5,'iEhE'))/0x8)+parseInt(IIII1II1(0x2cf,'RlK$'))/0x9*(-parseInt(IIII1II1(0x189,'BbaZ'))/0xa)+-parseInt(IIII1II1(0x392,'f1uy'))/0xb;}catch(ililli11){iI1lIil1=IliiiII;}finally{lIIIiili=iI111llI[il1li]();if(IIlI1lIi<=IllliiIi)IliiiII?i111ii1l?iI1lIil1=lIIIiili:i111ii1l=lIIIiili:IliiiII=lIIIiili;else{if(IliiiII==i111ii1l['replace'](/[OVdxTMJhDyUXeCtpwPnBqG=]/g,'')){if(iI1lIil1===IilI11i){iI111llI['un'+il1li](lIIIiili);break;}iI111llI[IIIIlIl](lIIIiili);}}}}}(ill111l1,l1i1llIi,function(ii11ilI1,IiIi1Il1,lIl1l1il,l1il11ii,iIIIIII1,l1l1lII,Iili1il){return IiIi1Il1='\x73\x70\x6c\x69\x74',ii11ilI1=arguments[0x0],ii11ilI1=ii11ilI1[IiIi1Il1](''),lIl1l1il=`\x72\x65\x76\x65\x72\x73\x65`,ii11ilI1=ii11ilI1[lIl1l1il]('\x76'),l1il11ii=`\x6a\x6f\x69\x6e`,(0x13ec2b,ii11ilI1[l1il11ii](''));});}(0x5f8,0xa8b18,lllliiII,0xc1),lllliiII)&&(version_=lllliiII);const I1111Iil=$['isNode']()?require('./jdCookie.js'):'',I1iIIiil=$[lIlil111(0x17b,'*0P)')]()?require('./sendNotify'):'',l1llllIl=require(lIlil111(0x198,'UU$s')),il11Ii=require(lIlil111(0x458,'UU$s')),lll1ll=require('./function/jdCommon'),l1lII1li=require(lIlil111(0x536,'#@PX'));let lII1IIII=lIlil111(0x3ab,'DRaK'),i1l1i1=[],I11lil1='';if($['isNode']()){Object[lIlil111(0x221,'RlK$')](I1111Iil)['forEach'](illIi11=>{const iI1I1iil=lIlil111;i1l1i1[iI1I1iil(0x22d,'fV7H')](I1111Iil[illIi11]);});if(process[lIlil111(0x4c4,'*0P)')][lIlil111(0x2f0,'[K7M')]&&process[lIlil111(0x3ca,'3Mn6')]['JD_DEBUG']===lIlil111(0x4c7,'tXd5'))console['log']=()=>{};}else i1l1i1=[$[lIlil111(0x227,'SoLM')]('CookieJD'),$[lIlil111(0x301,'mRkZ')](lIlil111(0x2b3,'2pIn')),...IiIi1il($[lIlil111(0x51e,'i@i2')](lIlil111(0x1a7,'CoIp'))||'[]')[lIlil111(0x34b,'qMkq')](liil1l1i=>liil1l1i[lIlil111(0x29a,'E^Ji')])]['filter'](il1ll1l=>!!il1ll1l);let i1IlIl1=process[lIlil111(0x186,'bq4j')][lIlil111(0x293,'uP7D')]?process[lIlil111(0x1c8,'FJH5')]['JD_OPENCARD']:'false',I1Il11I1=process[lIlil111(0x21f,'20cu')][lIlil111(0x15f,'kLZR')]||'';const IliIiiii=process[lIlil111(0x3fc,'R)0(')][lIlil111(0x39e,'20cu')],lI11il1l=process[lIlil111(0x20a,'S6jN')][lIlil111(0x2a1,'qMkq')]||'1';let l1i1Il1I=parseInt(lI11il1l)*0x3e8;IliIiiii&&(l1i1Il1I=0x64);let l111IiI1={};allMessage='',message='',$['hotFlag']=![],$[lIlil111(0x18a,'pvlr')]=![],$[lIlil111(0x50a,'bq4j')]=![];let iIliIliI='',Illl1I1='';!(async()=>{const liIli=lIlil111,iilI1l1I={'MAJXQ':function(II1lil1l,lill1il1){return II1lil1l==lill1il1;},'gEqVD':function(IllI1I1,II1lii1i){return IllI1I1*II1lii1i;},'iDTqJ':liIli(0x220,'mIXO'),'rKDHH':liIli(0x21d,'@)5H'),'DoqnG':liIli(0x3a4,'CoIp'),'hUBsW':function(iiiIii,illIl1i1){return iiiIii>illIl1i1;},'Fuydf':function(I111I1ii,i1Ii1l1i){return I111I1ii===i1Ii1l1i;},'UiWch':liIli(0x53f,'mIXO'),'KfwJK':liIli(0x525,'hWG5'),'XpxbW':liIli(0x3d6,'R)0('),'VIZAL':liIli(0x2a4,'#RbV'),'ezlWb':liIli(0x3bc,'DRaK'),'RYwki':function(lll1l1I1,I11Ii1II,llIIlili){return lll1l1I1(I11Ii1II,llIIlili);},'UIBit':liIli(0x25d,'2pIn'),'YjvLm':function(iIIIiIiI,l1llIiI1,liIliIi1){return iIIIiIiI(l1llIiI1,liIliIi1);},'jXLEl':'❖\x20准备就绪...\x0a','ibQke':'未填写活动ID','SWnep':function(l1iI1i1l,ll1iI11l){return l1iI1i1l<ll1iI11l;},'LQnZM':function(I1lilIil,liIli11l){return I1lilIil(liIli11l);},'IfDVE':function(II1Iil1l,Il1i1l1i){return II1Iil1l+Il1i1l1i;},'FGigE':function(ili1IiII){return ili1IiII();},'lFwsK':liIli(0x37f,'fV7H')};if(!i1l1i1[0x0])
|
|
|
|
|
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
|