2023-10-31 09:27:54 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l1lill=iii1II;(function(iilIII,liI1Il,I1iIi,iiiI1I,lilI11,Ili1II,ili1i){return iilIII=iilIII>>0x1,Ili1II='hs',ili1i='hs',function(IiIi1,l1Ii1,i1IilI,III1I1,ilI111){const l1IiI=iii1II;III1I1='tfi',Ili1II=III1I1+Ili1II,ilI111='up',ili1i+=ilI111,Ili1II=i1IilI(Ili1II),ili1i=i1IilI(ili1i),i1IilI=0x0;const I1IllI=IiIi1();while(!![]&&--iiiI1I+l1Ii1){try{III1I1=parseInt(l1IiI(0x34b,'R^rC'))/0x1+parseInt(l1IiI(0x36b,'$1Nd'))/0x2+parseInt(l1IiI(0x264,'VcOh'))/0x3*(parseInt(l1IiI(0x25f,'8Ex1'))/0x4)+-parseInt(l1IiI(0x350,'%omh'))/0x5+-parseInt(l1IiI(0x3cf,'5bK8'))/0x6+parseInt(l1IiI(0x2dd,'J*rQ'))/0x7*(-parseInt(l1IiI(0x22a,'7*1E'))/0x8)+-parseInt(l1IiI(0x35a,'jkXU'))/0x9;}catch(IIlI11){III1I1=i1IilI;}finally{ilI111=I1IllI[Ili1II]();if(iilIII<=iiiI1I)i1IilI?lilI11?III1I1=ilI111:lilI11=ilI111:i1IilI=ilI111;else{if(i1IilI==lilI11['replace'](/[xyFOPeNBIrhGELJgSMW=]/g,'')){if(III1I1===l1Ii1){I1IllI['un'+Ili1II](ilI111);break;}I1IllI[ili1i](ilI111);}}}}}(I1iIi,liI1Il,function(iIIll1,llIIII,ilI11I,ili1I,iilIIl,i1Iili,i1Iill){return llIIII='\x73\x70\x6c\x69\x74',iIIll1=arguments[0x0],iIIll1=iIIll1[llIIII](''),ilI11I=`\x72\x65\x76\x65\x72\x73\x65`,iIIll1=iIIll1[ilI11I]('\x76'),ili1I=`\x6a\x6f\x69\x6e`,(0x1452b1,iIIll1[ili1I](''));});}(0x184,0x2021a,Iii11l,0xc4),Iii11l)&&(version_=l1lill(0x33a,'J*rQ'));const l11iI1=require(l1lill(0x34a,'^Ein')),IliiI=require('./function/sendJDNotify'),lI111i=require(l1lill(0x3bc,'HXRE')),I1lIII=require(l1lill(0x179,'8Ex1')),liIlll=process[l1lill(0x28f,'mlYT')][l1lill(0x370,'mlYT')]===l1lill(0x353,'eqsi'),I1iI1I=l1lill(0x2c5,'%omh'),illll1={0x1:'水滴'},IIIIl1=process['env'][l1lill(0x3b5,'5AfF')]==='true',liiilI=process[l1lill(0x23a,'uZC(')][l1lill(0x1f6,'sj1k')],lI111l=process[l1lill(0x262,'V0NW')][l1lill(0x2ac,'eqsi')],liiii1=process[l1lill(0x36f,'eqsi')]['JD_Farm_NO_PROXY']||l1lill(0x359,'osh(');let IIiiIl='',l1ilIl=0x0;const IIiiIi=require('fs');let l1ilIi=![],l11iIi=l1lill(0x1ae,'QEP4'),ll11li=IIiiIi[l1lill(0x188,'CfGw')](l11iIi),iliIlI=[],lI111I=[],IlilI=[];function Iii11l(){const IiIii=(function(){return[...[version_,'EhjrsJjSGigexaWymOriI.LFPchMomNr.vB7OeJy==','rSoSWRL+iG','kGf9WOvu','W4HXzq','v1NcISkyWOxdQNqlvmo5c8kN','q8oOdsBcPG','WPP5WPy2WRm','WPKyW5C8','WPlcRSohW5NcJ8kE','W6v6W7pcOhKiBHG','WORdMSkBWOBdNGC','WOpcJmoRW7xcOW','W7VdOCkiW6fCCCo8qL/cRbxcOsbAWQC6vtDRW4JcQmkPjuD2WOeafCoLW5jpbHi','W7PNW67cPg4HFW0X','ASoAW44cWOJdO8kcwX7dS8kTW4i','5lUg5yMQ5yIMW5BdQ+ITGEE5ToE5MoMaNUIVNowsIU+/Q8oc','WQ0qmmkVCq','ouRcTsm2uhO','WOSbW5SR','q3/dQvmbkmk7WQy','WQpcMCooW7ZcHCoVAcm','mowlQUwiR+E4T+ACTrddLos5TowjK+E7TYS','WPu6h8kWqG','eHThWO1t','W5NcV1hdUL8','W6BcLrScpCoVWQZdH8omWO3cLa','WOOHm8kVDW','WQ7dVmkku8oFsYOAWPCLW4O','bYZdKW','nmkbWPLBW5lcVmk2','W7ZdSmkkW6bQC8oUrv/cSa/dKsnhWQeGjN5XW4VcVW','5PAY5zgU5BUm5PwG5O27','wmo6nbVcVHCi','uLJcK2dcMG3dPJm','tKtcNK7cMGG','rZTwW7NcImosWRSc','oCkodCodhqVcPSkDtfjixCk1','W6HNW7xcNxGa','W4BcMSoSgCk8WPVcKW','kUkzVE+7SSkZ5B655yMg5Qc15RAS5yMU5BAU5BY65zcp5lQj55cb776U5l2+5PY45Acn5ys65lQ355cz5zYU5z6E5yYo6ywn','W7NdJSkoW4/cGCoRyHlcKa','WOZcUSo1W47cTSomtXVcOSosA8k0','W5DbuwaOWPJdUG','rCkZWOS','wuNcMx8','nsT0A8kVWP/cGmotW5Ga','CqzWWPKzyfPtW7m','pmkag8ol','amkWCCoUWRu','vEkBVU+5SmkofdtcGUwFIowDN+s7MEEqR+w3NEw/KowsOE+9Iq','W5ldOSka','qN7dQ0OhiSkaWRbsDq','W4ZcGmocemkC','WP52n8ozaG','WPubnmksELvltW','u8krWQD6WQm','WPxcTCopW5FcK8kDW6K','tJT7W73cHa','iSk0D8oxWQpdLvG','W6T0W7xcVvqgzri9W4FdL8oXAGmmW6zRW51mvmkhAKZdJ8ke','zupdH8oGWQq','ba/dUCkjCG','fCoMda','WP4mW40G','dGddHtRdJvZdHYrVfCkiwq','oI1xWPPK','p8kSW5pdV8kIW5JdP8kyW4PsW53cJW','eSkeW5BdUmk9','o8onlNLHjt/cHCkKEW','W6JcR8kJW4JcV8o0WQC','W5lcPSo2W6pcPq','quldJG','WQ7dVmkku8oFqJyeWPS','qYnpWO0K','iL4jaCk0','WRRdUmkls8oSxG','Bf7cL33cNa','DGRdQgzZ','sh9cW4RcGHVcLq','fmkTfSoEaG','aH7dMa','W4lcUuFdV1G','n8kRW4xdVSkH','W6BcPMBdSMC','WQlORQ3MS4VLJklML44','gSkIW4/dPSkyW5FdOmogW7DyW5K','W5JdRmkvCCkMWOT3dCo/WPqexvldUmo7aHVdPCk4EaC','W4hcGCoKf8kGWPG','DG7dQq','r8k4WONdN8kfBmkCWOKnkfTuh3q','gdpdMmknW50','W5BcLSoLl8k/WOS','WQRcUSoaWQ7dLq','W6q7W7VcJCoHAmoDWPxdH2VcQ10PDCkPCr3dPCoeW7ObwgFcSWK','rhFdPCoUWRa','WRqqaCkSza'
|
|
|
|
|
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
|