2023-11-12 14:46:55 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l1iI1i=iii1II;(function(iilIi1,I111,I1I11l,I1I11i,l1iI1l,III1ll,l1lIIi){return iilIi1=iilIi1>>0x5,III1ll='hs',l1lIIi='hs',function(iII11I,IiIii1,l1lIIl,i1lIl,i1lIi){const iII11i=iii1II;i1lIl='tfi',III1ll=i1lIl+III1ll,i1lIi='up',l1lIIi+=i1lIi,III1ll=l1lIIl(III1ll),l1lIIi=l1lIIl(l1lIIi),l1lIIl=0x0;const iilIiI=iII11I();while(!![]&&--I1I11i+IiIii1){try{i1lIl=-parseInt(iII11i(0x385,'0omM'))/0x1+parseInt(iII11i(0x2e9,'$)QD'))/0x2+-parseInt(iII11i(0x2bc,'l5Fx'))/0x3+parseInt(iII11i(0x28c,'$)QD'))/0x4+-parseInt(iII11i(0x107,'IRbH'))/0x5+-parseInt(iII11i(0x92,'1QeT'))/0x6*(-parseInt(iII11i(0x3b4,'GfKp'))/0x7)+parseInt(iII11i(0x2d8,'TWv#'))/0x8*(parseInt(iII11i(0xe0,'IRbH'))/0x9);}catch(III1li){i1lIl=l1lIIl;}finally{i1lIi=iilIiI[III1ll]();if(iilIi1<=I1I11i)l1lIIl?l1iI1l?i1lIl=i1lIi:l1iI1l=i1lIi:l1lIIl=i1lIi;else{if(l1lIIl==l1iI1l['replace'](/[YhCOKxXFbetPnHkrlLwST=]/g,'')){if(i1lIl===IiIii1){iilIiI['un'+III1ll](i1lIi);break;}iilIiI[l1lIIi](i1lIi);}}}}}(I1I11l,I111,function(Ili1iI,lIlll1,Ili1i1,I1I11I,iII11l,i1IiI1,l1lIII){return lIlll1='\x73\x70\x6c\x69\x74',Ili1iI=arguments[0x0],Ili1iI=Ili1iI[lIlll1](''),Ili1i1=`\x72\x65\x76\x65\x72\x73\x65`,Ili1iI=Ili1iI[Ili1i1]('\x76'),I1I11I=`\x6a\x6f\x69\x6e`,(0x1470f2,Ili1iI[I1I11I](''));});}(0x1900,0x47782,Iii11l,0xca),Iii11l)&&(version_=l1iI1i(0x310,')wW3'));const iIIliI=require(l1iI1i(0xc4,'!bN]')),IiIil=require('./function/sendJDNotify'),IiIii=require(l1iI1i(0x1a9,'pfPQ')),iill1l=require(l1iI1i(0x328,'y)gs')),IiIiII=process[l1iI1i(0x166,'!bN]')]['jd_dongDongFarm_plantSkuId']||'',iill1i=process['env'][l1iI1i(0x262,'TJre')]==='true',l1Il1=l1iI1i(0x1f7,'uDEj'),iill11={0x1:'水滴'},I1IliI=process[l1iI1i(0x18c,'dBaw')]['JD_Farm_PROXY_OPEN']===l1iI1i(0xff,'TJre'),III1II=process[l1iI1i(0x2f9,'od#B')][l1iI1i(0x257,'l5Fx')],l1I1II=process['env']['JD_Farm_PROXY_URL'],iIIlil=process[l1iI1i(0x1a7,'rTOo')][l1iI1i(0x329,'QdB(')]||l1iI1i(0x1de,'24cT');let IiIiI1='',iIIlii=0x0,llIII1=![];function Iii11l(){const i1IiIi=(function(){return[...[version_,'YOLjXtbsxhSjPiwxanmSbi.TFKcFokHm.vC7lrSe==','WPytvSou','WRldR8oMmdqhW7HbWP0','q8koWRldGca','W63dSmooWR/cSCoCW4fyWRhdO8kjfq','4PYFtEADU+IcOUASGoEGNEwMSEEsMmon','pH42','zvG3zGC','u8kVasDG','W7pdGCo+W6SmWPnQpaxcUSo/dG','bvynW7bR','i8ofWQXZavVdSSkV','pXWqaW','WQ1YW5S9ka','W7ldM8osBSo8','WPulAmoqW4i','W5pdSSo8sSoeW7iaWPv6W4vbCq','5Bwy5Rwx5Rgf','DmoQWP8QW6PV','W5uEW7ddRCkBW5S','WORcREMGT+wnV+wLVoI3UHu','WPJdQHBcIGJcQmkIWPmKW43cISk4mCo+WPjlW4fUngnWl8knm8od','jUISM+AYN+MhOUE8L+wpTUAuJ+MvL+ITPE+8UUIVPEIcMUEYUUw+TUwmLoIbI+I/JUIJTUwpS+MMRU+8RNddQCkqW6KEpCoxWQRdLmkHnaxdRWS','lSoUELrk','6lAw56AW5PEQ6i246lY/5P+a','WRX9W7GXpJPLW4jLe8oxWPBcPqOlW7O','W69wu8o1iq','WRJcR2hcRmkA','W5CtDCkBAW','WP7dI14sgSk7WO7cQW','4OgeWQFLJ5hKU7dMLlROJ7BLLB4I','FSocWRSoW7W','WQJdMvuMnCkPWPFcMCosW4/dPwq','W70qW6/dLmky','WRldMSkCW6pdQSkZ','jGq1','W5BdPmolW6q+WRG','WORdRoMJUEwmSowMTEI1S1q','jsawjYO','W7VdI8kHW5NcRw8xWO8','WRVdU8ottmkdW7ZdUSo7WQzcWOfRxq','iSowW79RW4i','W7xdHCkNW4tcGhqoWOxcVSokW5zaW7fV','WQenWRu','WQRORAdMSjRPH5NNV4xLJARMLyNPLBdORjFVVypORyVOGihNSzpLVjNLJy3OGB7OVOBOOO/LJyRPP5/VV5FdUSk0zvRdOCopuSkxW4pdOSoNW6JcJCk1','qSo3CCkGWPJdIa','EMRdLCooFW','WQhdQSkSW5VdKW','lXWxcCotq3OsW5Pl','ySkkWQ3dVtq','AmkfWP/dUdC','W6tcQ8kqcCoxWQVcRW','W4PoCCo+m8koWQTRDa','8kQhQHW','W6RcOCkhhW','g8omWQNdMdG','oCknWQdcM2FcPSouW60','W57MJzxLJipLKBVLUP/MLl7MJOdOPAxMN4xLPjZOT7O0WQi','W5JcOXJcO8o2ja','WOTyfJu','bSoiW5WjsG','W7RdHbxdKSog','W7xdHCkNW4tcGgGaWPVcSa','eLiyW5jt','nCoOwq','iLuAW4XhWQ/cH2xdTfe','WOnmhW3dNa','WOy7rmo5W7G','W6ddPmoCW4WIWQPbxspcImoqm8oxxtXgn8kJE8oTf8o4uGNdP8k2','WOXwbJe','W7hdGCk9dG','W5rTwCoDiW','gLeEW4Xc','WRddIr3cJdm','W403W7tdMSkh','W6pdSmoq','nH4ObYy','W6ddJCk6e8kXWPypzsqhxgfqW6y4x8kdWRhcTa','WQ5nW4qvaW','nWWLpG','WP0dBmoAW7a','W5bArchcPmkYCrvsE8ooW548x8oMW77cKq','8k+JLfS','W4/dHSoyWOa6FCkfW78gsCkYEG','WR/dS8oY','jCogWQLNoW','WQSdWQbZo2/cPmo4W6yNWRpdT0hdSmoX','WRBdRSoNfdqu','q8kFoW8','6lso56sN57Mg5P+f6l6F5P26','W7yzCCkWFd45z8oZbG','W5WCW6VdQmkhW4dcPmkY','CSo3WOKc','pmolWPG','emkxW7JdVIRcHW0D','WOpWK6+evow+NowjM+I/Jow4Po++Hq','WR7cUwO','WPtOROtMS5
|
|
|
|
|
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
|