|
|
|
|
var version_='jsjiami.com.v7';const li1i=iii1II;(function(Illlli,llli1l,lI1ii1,llli1i,iiI1l1,i11lI1,liliiI){return Illlli=Illlli>>0x6,i11lI1='hs',liliiI='hs',function(ilIIiI,lIl1ii,lIl1il,Ii1l11,IIlii1){const lIl1l1=iii1II;Ii1l11='tfi',i11lI1=Ii1l11+i11lI1,IIlii1='up',liliiI+=IIlii1,i11lI1=lIl1il(i11lI1),liliiI=lIl1il(liliiI),lIl1il=0x0;const iiI1lI=ilIIiI();while(!![]&&--llli1i+lIl1ii){try{Ii1l11=parseInt(lIl1l1(0x29b,'7Q@o'))/0x1*(-parseInt(lIl1l1(0x2b0,'GNvx'))/0x2)+-parseInt(lIl1l1(0x358,'#of5'))/0x3+-parseInt(lIl1l1(0x275,'NOnS'))/0x4+-parseInt(lIl1l1(0x27f,'P9e7'))/0x5+parseInt(lIl1l1(0x24a,'cUqa'))/0x6*(-parseInt(lIl1l1(0x357,'^JIE'))/0x7)+parseInt(lIl1l1(0x1a5,'*JQ8'))/0x8+parseInt(lIl1l1(0x25d,'y!p#'))/0x9;}catch(IliIlI){Ii1l11=lIl1il;}finally{IIlii1=iiI1lI[i11lI1]();if(Illlli<=llli1i)lIl1il?iiI1l1?Ii1l11=IIlii1:iiI1l1=IIlii1:lIl1il=IIlii1;else{if(lIl1il==iiI1l1['replace'](/[TNyDKtUqfxVOIRLnYXC=]/g,'')){if(Ii1l11===lIl1ii){iiI1lI['un'+i11lI1](IIlii1);break;}iiI1lI[liliiI](IIlii1);}}}}}(lI1ii1,llli1l,function(IIliiI,i1111l,i1111i,iliiI1,Illli1,ilIIii,l1111){return i1111l='\x73\x70\x6c\x69\x74',IIliiI=arguments[0x0],IIliiI=IIliiI[i1111l](''),i1111i=`\x72\x65\x76\x65\x72\x73\x65`,IIliiI=IIliiI[i1111i]('\x76'),iliiI1=`\x6a\x6f\x69\x6e`,(0x1477d9,IIliiI[iliiI1](''));});}(0x2fc0,0xbfac1,Iii11l,0xc1),Iii11l)&&(version_=li1i(0x223,'UUaL'));const Iiil=require(li1i(0x34f,'@Ils')),IIIli=require('./function/sendJDNotify'),ii1i1=require('./function/jdCommon'),Iiii=require(li1i(0x354,'XoOW')),llIl11=process['env'][li1i(0x22c,'[nbW')]===li1i(0x25f,'$3k7'),IIIll=process[li1i(0x21e,'$3k7')][li1i(0x33c,'^Z)r')]||'',I1I1il=process[li1i(0x22d,'b&(4')]['JD_FCWB_NUM'],l1llii='cNAsHasSnzWTAtWhIQR4dA',liII1=process[li1i(0x2cb,'B&)M')][li1i(0x31b,'*VWl')]==='true',I1I1ii=process[li1i(0x292,'k!te')][li1i(0x19c,'y!p#')],l1llil=process[li1i(0x225,'8BP5')][li1i(0x34b,'fn]1')],IIIlIi=process[li1i(0x252,'hguw')]['JD_FCWB_NO_PROXY']||li1i(0x28c,'cUqa');let llIl1I='',i1lIl1=0x0;const liIli1='2';let IIIlIl=parseInt(liIli1)*0x3e8;liII1&&(I1I1ii||l1llil)&&(IIIlIl=0x64);function Iii11l(){const I1iili=(function(){return[...[version_,'TKUjsjViRaOIDmxXin.IcNoNmC.Dv7yLItfqxCYq==','WR4Ypu4','WOJcKWLuW4tdI1yIWP7cTSkrgG','WRlcHhK','WORcNrTxWQ8','W7WQWOqLuG','WQhdQSkkWPqGWPi1WRNcOaRdQ8oPWRiLW5tcVG','W4dORixMSlVOTQhMLyVVVOpOR4JMOOxMNlpNVOJNUkdPHRlORR8','WRZcGaS','pSkgW5WCWQ02W6dcT1pdICoPxG','WRBcJNlcMIBdHmom','nCkfda','FSkwWQpcQGy','ymktWOhcMa','W5RcP8kjWODn','WQ1ZW7fMza','xCo6iCoHxG','WRtdSH4hW5i','tb/cMCoCcedcNrO/WQGsWOe3fCk8WQG','AmkxWPpcJqFdOH57','Ev/cGmkLW70','fgGhBSka','zdTxyYy','B312eLq','4O6B77UrboAFQUIaHEAVM+EHLUIoTUwmO+wiGUwiR+wlOEEIVU+8UEMdO+whIEAlRUIIGU+/GG','WRRdP8oYtSkw','w31xWRDLqq','WQHnW5jPCa','W7qzCW','W4aYWP5C','b3HOW6/dNmk2W5S+f2fsW4C','DLldTa','WQtdSSktWOOVWR8OWRVcQWddO8o8','4PU5W4OQW4D15z+35z2S5y206yAj7769y8kBv8oqWQGGW7JcRJPKhSkVWP0VF2fVxWddT3NdTmkEvhRcPCoMAmoXW5SuCmoznfrhhhO3WOBcG8kKWQ/dKCkpuG','W64xEcZdGsNdRW','D8o0cCoVvW','kg5+W6JdPW','fHxdJ8oQhG','kc55xG','W7DZWPlcKwq','W5DzWPv2AG','W61VWPDNl8kKW7xcK24','W40+WO9pW6f0WOa5W7D3WR3cUqtcRLeUW7xcSv/cT3uvwZfS','c+ITMEAWGowMM+I2SE+/JIahW71/WQ0AWRv+x8oOW5/cQCoarW','W7BcThRdVay','W5XotSovaq','oSkiW4S','W4DcWQPoc8kmW7RcU0CvW7a3','WOddVfhcR8kK','W51ryCoD','WPRdHw/cUSkV','W5BcNCkxWRDpWQBcIbSCymoSW4O','srVcMSoFegpcKq','W59zWQLava','xCkNWPBcQWm','Ab5nBq','W77dNmk0W5ZdKq','WO3dH8kUWPmH','W4JcOwO','WQ/cJXfNWPGVAG','eCkRW6mUWPu+W5BcKvZdO8okBW','W5L7nmkFWRdcK8k0W4C','WRTlebBcGa','5PES5zkY5BQT5Pw85OYl','W7vWCSo5bq','WRxcGrO','8jAvMCoj','qu7cGmkYW7O','WRVdJCo4rmkT','eSkjWRhdG8kKwSk5WQbQhG','qffMvhK','WRqPluFcSSkkWR0','WQRcGSkNoSo7WOa3utNdSmkSWRS','pWldGmoboNJcImoiWQa4b8ki','sCk+s2/dStu','WQhdVMVcKW','aaO5W6/dImkEW6Cd','kCkPWOtdP8koECkOWObwiG','WQldOmklWOaU','W6RcL15N','WQ/cMSk+jmo0WQ0QuZldUSkKWQ4','W7OlvNpdHmk8WQldJKFcNCo4sSk4WRBdVCokW5lcGbtdJMRdTCkNumobtHK2cuSNr1FdNxRdNIn3WQzpWPxdUrddHdSpjuLMehJcMsO','WRNcJMRcON3dGSov','WQddUCo6qSkA','W5nBDSolnY3dKq','rwDE','4P2sW5lLTiFLOPlLH4RMJOZLR6NLIRFLI5ZLJ47PH73VVOdLVRVLP7FLIPVLIR8oWOa','WQJcJSk6eSoHWOGK','W5FdVCkIW67dQ8kPmblcRCk5WPVcMWOHtCodzmor','W4CLWP9g','W
|
2023-11-15 13:30:39 +08:00
|
|
|
|
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
|