2023-11-28 12:34:57 +08:00
|
|
|
|
var iil='jsjiami.com.v7';const Ii111=iii1II;if(function(Ii1IIi,Ii1IIl,l111I,ll1lli,ll1lll,Illlil,I1iili){return Ii1IIi=Ii1IIi>>0x6,Illlil='hs',I1iili='hs',function(lililI,lI1ill,Illlii,lI1ili,Il1II){const lIl1ll=iii1II;lI1ili='tfi',Illlil=lI1ili+Illlil,Il1II='up',I1iili+=Il1II,Illlil=Illlii(Illlil),I1iili=Illlii(I1iili),Illlii=0x0;const i1lll=lililI();while(!![]&&--ll1lli+lI1ill){try{lI1ili=parseInt(lIl1ll(0xe2,'%vW!'))/0x1*(parseInt(lIl1ll(0xe9,'urRc'))/0x2)+parseInt(lIl1ll(0xae,'TJ)A'))/0x3+parseInt(lIl1ll(0xf6,']uSr'))/0x4*(-parseInt(lIl1ll(0x18b,'Usd3'))/0x5)+parseInt(lIl1ll(0x18e,'U&ye'))/0x6*(parseInt(lIl1ll(0x1bf,'ZW*u'))/0x7)+parseInt(lIl1ll(0x145,'[N[]'))/0x8*(parseInt(lIl1ll(0x21f,'Lyaj'))/0x9)+parseInt(lIl1ll(0x128,'JUd@'))/0xa+-parseInt(lIl1ll(0x105,'kFWJ'))/0xb;}catch(Ii11I){lI1ili=Illlii;}finally{Il1II=i1lll[Illlil]();if(Ii1IIi<=ll1lli)Illlii?ll1lll?lI1ili=Il1II:ll1lll=Il1II:Illlii=Il1II;else{if(Illlii==ll1lll['replace'](/[rwHRhCxgOGLtkydfQJ=]/g,'')){if(lI1ili===lI1ill){i1lll['un'+Illlil](Il1II);break;}i1lll[I1iili](Il1II);}}}}}(l111I,Ii1IIl,function(I1iill,i1lli,i11111,lIl1li,Il1I1,lIilii,lIilil){return i1lli='\x73\x70\x6c\x69\x74',I1iill=arguments[0x0],I1iill=I1iill[i1lli](''),i11111=`\x72\x65\x76\x65\x72\x73\x65`,I1iill=I1iill[i11111]('\x76'),lIl1li=`\x6a\x6f\x69\x6e`,(0x1493a4,I1iill[lIl1li](''));});}(0x2f80,0x90fd0,Iii11l,0xc0),Iii11l){}const I1I1iI=require(Ii111(0x164,'k8SW')),IIIlII=require(Ii111(0xfa,'w38S')),iiIiI1=require('./function/jdCommon'),ili1Il=require(Ii111(0x1f6,'2paA')),ili1Ii=process[Ii111(0x159,'u62C')][Ii111(0x272,'ZW*u')]===Ii111(0xa1,')Vv#'),Iilll1=process['env'][Ii111(0x146,'3w6j')]||'',ll11I=process[Ii111(0x257,'Usd3')]['JD_FCWB_NUM'],iIi1I='Bn1VWXtvgTv5ewPoMR-X8A',liIIl=process[Ii111(0x256,'HE$2')][Ii111(0xcf,'dM^A')]===Ii111(0x235,'dM^A'),IlI1lI=process['env']['JD_FCWB_PROXY_TUNNRL'],liIIi=process[Ii111(0x204,'STGR')][Ii111(0x208,'k8SW')],IilllI=process[Ii111(0x1a0,'(#nU')][Ii111(0x230,'w38S')]||Ii111(0x11a,'lS5X');let iI1lIi='',l1lllI=0x0;const llliIi='2';function Iii11l(){const i1Iii1=(function(){return[...[iil,'xtkjOtsfwjtiHxadRmCifLw.Gcyotgmh.Qrvwh7J==','W6RdSs3dNtCYxcLG','tfhdSCkxWONdImkJWRK9','W5xcQtFcSvxdGL7dTSoHo8kzeW','exVcJCk8WOxdHSoY','zxX8BqK','W5HhuCkFlG','WOLEgqu3','WP4Gk1JdKa','4PM9W6xKU7FNKQ3MSjVLJOlPH77VVBbFW7JcGK0SW6ldO1NdJJ/dLCkQy0fbkLSoWPHsWRRcQSoqWQTLzMq6W4VdOSowW7jiWO3cPNTxyhFcKmkaW5KPEW','WQ/ORllMSyNLJlZMLzS','n2v6CG/dIgilWRO','WRdORBdMSlBLPPpOTQPDW78GBG','DSoAamoqW5O','gColW7Hzwa','W4CWW6CFW4y','WRhdLCk9zd0','idKqW5RcRW','FSo9imo4uW','ySk8oJpdVXrzW6BdVbLMsa','4P6nB+w8U+wjUEwkVEwkP+w3RUI8Q+wkGoAmS+wTLEwiJEwiOos5GEAuJo++KoMbKUwfNE++La','l8oCaxxcOG','ECkUW6SavCk0','BhVdKmkW','W6WUhfu','A2ZdKexcQa','WOyCkGzM','W6WwWPRdN8oZ','sNhdVLBcOq','kCoisXdcHfhcHGe','W7JdOHJdKSoHcmkV','W5nXWQWzW4zVB8oIAW','4PIDW6GgWPfL5z625z235y2j6ywM772eWPaBhKy2mIdcMCokWQWKWQRcKadcQ2mxcqn8W7iTmSkZWPLMrSojkHz+WPZdPSk0kGxcS1ZcTg/cKmoctSoGWQhcIq','wCoQC8kmCq','bmoDdu/cGW','lGCPW4dcTa','W5BcNq4r','WQddSCo6cCkX','W4Xhs8kjacLNAJ0','WQuziazr','iWGvW4pcLJ1YW7W','wmoBBmk0BSodpW','kCoCbwRcPW','W4RdQfCY','W7X7Duyjra','hwtdJrpdGxdcKG','WRzAfHuL','lCk9qG','W7VcRCkVW4SPW6S','d8kUjsWJ','qSowWPBdH0O','W7mQWQpdLSo1','esOe','aWBcLq7dQLC','ECkUW6ed','8lEhM0C','W4lcL1G5W7RdVNtdPSoaW4fmaqldSKtcSsVdH37dJG','WRWupaz7WPTyFKW','tCk8mW','4P6pWQxLV6/LIk/LI63LI6xLTj/OV6xLIklMJPBLROxLIAJLIRhKUj7ML5pVVAZPG5/LHl/VVzS','WRVdSmkB','WR5LoSk5BG','4P+juEw8NEwiUowkVEwjRUw3PoI+TEwiKEApGowUI+wjKowkLUs5LEAxHE+/RoMdQUwhGU++Tq','z8k/WRGq','fd8zbSon','dMhcIq','W44mWQ7dRSoj','WPBcG8kQnG','W4HbWPuqW4a','h0NdKJ7dOa','W4tcKHe','CSo3xa','WOPMkGunDq','W73dRL4YtfddQsNcKtBcK0b2tbGVW4OaWRNcOCoZCYqjdCoF','WP3dM8kJBZFdHW/dVCkKkColWP/dRmowWQFdGGC','W48wl3KXnH4','WR/cRg7dPGG9','WRxdH8klxH8','WO58eGbKWOy','mcSPnSoR','ALm/y1m','c2dcMmk2WPtdKmocW6RdH3e','4PMV77INW5hKU6/NKABLNiZLN4RKU5/VVkW','W451WQWbW4XLCCo+Aa','W73ORllMSzBLPPROTz7VVzz4oUIIKEMBKowlHo+8QGZdS8kWy8oLdSoGWOWuyheEBge','ANyT','bmoDpKtcVW','W6pdSWBdI8oHgG','W63cRhhcS1JcQW','WQn3mdiY','WPTEaJOO','W57dP8o3dGK','W6xIMixVUzDOp0lcV+wESEwFLos6T+EsGUw3G+w/KUwtLo+/Ua','jwVcGCk+WOK','kLRc
|
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
|