2023-09-27 23:07:18 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const illilI1=l1Iii1Il;(function(liIIiIii,Ii1IlIi1,lI11ll,iil1iIl1,iiiIl1Il,ll11iII1,lliii1il){return liIIiIii=liIIiIii>>0x4,ll11iII1='hs',lliii1il='hs',function(l1I1I1lI,il1lII1,liIi1li,ililil11,IIli1ilI){const i1Iil1li=l1Iii1Il;ililil11='tfi',ll11iII1=ililil11+ll11iII1,IIli1ilI='up',lliii1il+=IIli1ilI,ll11iII1=liIi1li(ll11iII1),lliii1il=liIi1li(lliii1il),liIi1li=0x0;const IilI1lii=l1I1I1lI();while(!![]&&--iil1iIl1+il1lII1){try{ililil11=-parseInt(i1Iil1li(0x553,'hUb$'))/0x1*(-parseInt(i1Iil1li(0x4c4,'@BGz'))/0x2)+-parseInt(i1Iil1li(0x1f8,'j!aq'))/0x3+-parseInt(i1Iil1li(0x3a3,'bMsV'))/0x4+-parseInt(i1Iil1li(0x50e,'hUb$'))/0x5*(-parseInt(i1Iil1li(0x4a7,'CbFu'))/0x6)+-parseInt(i1Iil1li(0x4b8,'2VP$'))/0x7+parseInt(i1Iil1li(0x39b,'2Vj%'))/0x8+-parseInt(i1Iil1li(0x3cc,'qdWv'))/0x9*(parseInt(i1Iil1li(0x540,'4p@t'))/0xa);}catch(lIlIII11){ililil11=liIi1li;}finally{IIli1ilI=IilI1lii[ll11iII1]();if(liIIiIii<=iil1iIl1)liIi1li?iiiIl1Il?ililil11=IIli1ilI:iiiIl1Il=IIli1ilI:liIi1li=IIli1ilI;else{if(liIi1li==iiiIl1Il['replace'](/[PuVJFtXkgUBCRIKbNDEM=]/g,'')){if(ililil11===il1lII1){IilI1lii['un'+ll11iII1](IIli1ilI);break;}IilI1lii[lliii1il](IIli1ilI);}}}}}(lI11ll,Ii1IlIi1,function(iIIliiii,iiiIilIl,IiiIIll,ii1l1l,ii1lIIll,IIli1i1i,iIiiI1I){return iiiIilIl='\x73\x70\x6c\x69\x74',iIIliiii=arguments[0x0],iIIliiii=iIIliiii[iiiIilIl](''),IiiIIll=`\x72\x65\x76\x65\x72\x73\x65`,iIIliiii=iIIliiii[IiiIIll]('\x76'),ii1l1l=`\x6a\x6f\x69\x6e`,(0x140438,iIIliiii[ii1l1l](''));});}(0xbd0,0x7a78f,I11I1l,0xbf),I11I1l)&&(version_=I11I1l);const IIIII1I1=require(illilI1(0x40d,'l)*U')),I1I11I1I=require(illilI1(0x3f6,'mD#%')),iiIIIlIi=require(illilI1(0x3d5,'v6g)')),lIlliI1l=require(illilI1(0x207,'#74e')),{wuxian_savePrize:ill1il1l}=require('./function/krsavePrize'),IiIlIIli=require(illilI1(0x53b,'hUb$')),iIIIili1=process['env'][illilI1(0x37a,'#74e')]||'',li1lliiI=process[illilI1(0x4e7,'@BGz')]['jd_wxSign_cjhyInterval']||'',llII1lli=process[illilI1(0x16e,'CF!h')][illilI1(0x450,'#74e')]==='true';let i1iilIII=(process[illilI1(0x2e2,'4p@t')]['jd_wxSign_sevenDay_lzkj_Ids']||process['env'][illilI1(0x213,'mD#%')]||'')[illilI1(0x18b,'yX(4')](','),ili11lIi=(process[illilI1(0x3f0,'y2Jg')][illilI1(0x318,'!9Yc')]||process[illilI1(0x3cb,'htux')][illilI1(0x353,'$U%j')]||'')[illilI1(0x2f4,'ARAs')](','),IIli1lI=(process[illilI1(0x478,'hUb$')][illilI1(0x33d,'AEg$')]||process[illilI1(0x4d4,'ny98')]['CJHY_SEVENDAY']||'')[illilI1(0x435,'yRj5')](','),Iiill1ii=(process[illilI1(0x550,'CbFu')][illilI1(0x29f,'htux')]||process['env']['CJHY_SIGN']||'')[illilI1(0x4d5,'sz9R')](','),iiIii1II=(process[illilI1(0x3b4,'!9Yc')][illilI1(0x31a,'4p@t')]||'')['split']('@'),I1iiillI=(process[illilI1(0x15e,']cTo')]['jd_wxSign_cjhyFilter']||'')[illilI1(0x3de,'%7NL')]('@'),IIilIl='',ilii1IIi={};const l1IlIIl1=Object[illilI1(0x22f,'Sa43')](IIIII1I1)['map'](illI1Ii=>IIIII1I1[illI1Ii])[illilI1(0x215,'ARAs')](ill1I1li=>ill1I1li);!l1IlIIl1[0x0]&&($['msg']($['name'],'【提示】请先获取Cookie'),process[illilI1(0x465,'mjs1')](0x1));!(async()=>{const lIIilIl=illilI1,IIll1IlI={'Usrgn':'headers','Yfxvc':function(IIlIl1iI,lIlii1ii){return IIlIl1iI+lIlii1ii;},'TEcuy':lIIilIl(0x3af,'2VP$'),'PyBBy':function(I1lIlI1i,iIl11111){return I1lIlI1i+iIl11111;},'yvJtk':function(IIliiil,IIl11ill){return IIliiil>IIl11ill;},'HyXBf':function(Iiiii1Ii,lllll1I1){return Iiiii1Ii>lllll1I1;},'HDlRv':function(lI1Il1,ll1li1i1){return lI1Il1(ll1li1i1);},'nxQpJ':lIIilIl(0x416,'qdWv'),'trQsl':function(lI1IIIIi,iII1ilii,Il1IIll1){return lI1IIIIi(iII1ilii,Il1IIll1);},'OVqtt':lIIilIl(0x460,'!9Yc'),'EThWs':lIIilIl(0x131,'!9Yc'),'tSpXr':function(i1lii1ii,l1lIi1l){return i1lii1ii===l1lIi1l;},'ydqEn':lIIilIl(0x421,'GkyE'),'kdBMD':'msOuh','VcFUi':lIIilIl(0x267,'sz9R'),'yUbjE':function(llli1IIi,liI1llil){return llli1IIi===liI1llil;},'ETgmj':lIIilIl(0x39c,'AEg$'),'bDDFg':lIIilIl(0x299,'kS7R'),'GRLGd':lIIilIl(0x28c,'K6cM'),'bymrX':function(lIiI1Il1,IIiII1iI){return lIiI1Il1(IIiII1iI);},'WXWMQ':function(ilI1iI1I,illiiIIl){return ilI1iI1I===illiiIIl;},'pwEII':function(l11i11ll,l1liiI1i){return l11i11ll!==l1liiI1i;
|
|
|
|
|
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
|