2024-01-10 06:17:47 +00:00
|
|
|
|
var _0xodf='jsjiami.com.v7';const _0x1e2774=_0x22f9;(function(_0x55213e,_0x40c748,_0x51d840,_0x233271,_0x45dd35,_0x19eb0c,_0x522431){return _0x55213e=_0x55213e>>0x1,_0x19eb0c='hs',_0x522431='hs',function(_0x3e4a80,_0x3b0450,_0x54018a,_0x2ec2e2,_0x5f54e4){const _0x201374=_0x22f9;_0x2ec2e2='tfi',_0x19eb0c=_0x2ec2e2+_0x19eb0c,_0x5f54e4='up',_0x522431+=_0x5f54e4,_0x19eb0c=_0x54018a(_0x19eb0c),_0x522431=_0x54018a(_0x522431),_0x54018a=0x0;const _0x4389eb=_0x3e4a80();while(!![]&&--_0x233271+_0x3b0450){try{_0x2ec2e2=parseInt(_0x201374(0x5df,'eOA^'))/0x1*(-parseInt(_0x201374(0x5dd,'Fbk@'))/0x2)+parseInt(_0x201374(0x5af,'3lMT'))/0x3*(-parseInt(_0x201374(0x194,'kQ#s'))/0x4)+parseInt(_0x201374(0x44b,'!psa'))/0x5+parseInt(_0x201374(0x5ec,']T4O'))/0x6*(-parseInt(_0x201374(0x3ea,'%J0g'))/0x7)+-parseInt(_0x201374(0x3f0,'iCqV'))/0x8*(parseInt(_0x201374(0x549,']T4O'))/0x9)+-parseInt(_0x201374(0x67f,'un4B'))/0xa+parseInt(_0x201374(0x5ce,'*g7M'))/0xb;}catch(_0x36cd0b){_0x2ec2e2=_0x54018a;}finally{_0x5f54e4=_0x4389eb[_0x19eb0c]();if(_0x55213e<=_0x233271)_0x54018a?_0x45dd35?_0x2ec2e2=_0x5f54e4:_0x45dd35=_0x5f54e4:_0x54018a=_0x5f54e4;else{if(_0x54018a==_0x45dd35['replace'](/[xQnWqKygpJSMLHNBbDC=]/g,'')){if(_0x2ec2e2===_0x3b0450){_0x4389eb['un'+_0x19eb0c](_0x5f54e4);break;}_0x4389eb[_0x522431](_0x5f54e4);}}}}}(_0x51d840,_0x40c748,function(_0x8fceb0,_0x1dd753,_0x33a99e,_0x221dbf,_0x4d708d,_0x2293c6,_0xcb6103){return _0x1dd753='\x73\x70\x6c\x69\x74',_0x8fceb0=arguments[0x0],_0x8fceb0=_0x8fceb0[_0x1dd753](''),_0x33a99e=`\x72\x65\x76\x65\x72\x73\x65`,_0x8fceb0=_0x8fceb0[_0x33a99e]('\x76'),_0x221dbf=`\x6a\x6f\x69\x6e`,(0x14f870,_0x8fceb0[_0x221dbf](''));});}(0x198,0xe558e,_0x3f54,0xce),_0x3f54)&&(_0xodf=0x48b3);const _0x4b124=$[_0x1e2774(0x1c4,'@7UE')]()?require(_0x1e2774(0x5fe,'Fbk@')):'',_0x15ace5=$[_0x1e2774(0x37e,'JPmV')]()?require(_0x1e2774(0x5ff,')wYh')):'',_0xb94598=require(_0x1e2774(0x49d,'hd)!')),_0x2a1d71=require(_0x1e2774(0x2ec,'3A6u'));let _0x288f5f=!![],_0x312daa=[],_0x135d9e=[],_0x1c9f07=[],_0x3cfd43=[],_0x5b3e5e,_0x247044=[],_0x1d83ec='',_0x2a6da9='',_0x1524ed='',_0x1c0234='',_0x270d38;const _0x42567a=process[_0x1e2774(0x663,']T4O')][_0x1e2774(0x1dc,'d54O')]||_0x1e2774(0x203,'5d4g'),_0x356a23=process[_0x1e2774(0x2c3,'g5rL')][_0x1e2774(0x36c,'p7w3')]||'5',_0x5b0c9c=process[_0x1e2774(0x1eb,'Hp$z')][_0x1e2774(0x19f,'a%Jy')]||'-1',_0x3f412e=process[_0x1e2774(0x4dd,'3A6u')][_0x1e2774(0x293,'3lMT')]||'1',_0x4c0ac9=process[_0x1e2774(0x213,'JPmV')][_0x1e2774(0x196,'p1p7')]||'5',_0x34f70d=process[_0x1e2774(0x315,')wYh')][_0x1e2774(0x661,'nj$Z')]||'1',_0x23c5cb=process[_0x1e2774(0x363,'pVbD')][_0x1e2774(0x395,'cG@W')]||![],_0x534d02=process[_0x1e2774(0x421,'os*a')][_0x1e2774(0x6a1,'JniV')]||'',_0x3f0e17=process[_0x1e2774(0x29b,'nj$Z')][_0x1e2774(0x266,'c9os')]||![],_0x496d35=process[_0x1e2774(0x29b,'nj$Z')][_0x1e2774(0x280,'hd)!')]||'',_0x5ddd00=process[_0x1e2774(0x649,'VCqH')][_0x1e2774(0x1d4,'(*ph')]?process[_0x1e2774(0x663,']T4O')][_0x1e2774(0x5dc,'p1p7')]:![];if(process[_0x1e2774(0x4dd,'3A6u')][_0x1e2774(0x6aa,'[6[Q')])try{require(_0x1e2774(0x3b1,'JniV')),_0x5b3e5e=require(_0x1e2774(0x445,'ji*i')),$[_0x1e2774(0x4e6,'!psa')]=_0x5b3e5e[_0x1e2774(0x604,'I(q#')]($[_0x1e2774(0x687,'g5rL')][_0x1e2774(0x461,'3Ki4')]($)),$[_0x1e2774(0x50d,'g5rL')]=_0x5b3e5e[_0x1e2774(0x37b,'9Wm6')]($[_0x1e2774(0x66c,'p7w3')][_0x1e2774(0x2e0,'os*a')]($));}catch{$[_0x1e2774(0x31d,'d54O')](_0x1e2774(0x224,'3lMT')),$[_0x1e2774(0x229,'sWPs')]=$[_0x1e2774(0x1cd,'VCqH')],$[_0x1e2774(0x4ea,'d54O')]=$[_0x1e2774(0x5c0,'3lMT')];}else $[_0x1e2774(0x318,'kFs1')]=$[_0x1e2774(0x398,'p1p7')],$[_0x1e2774(0x275,'d54O')]=$[_0x1e2774(0x21d,'eOA^')];if($[_0x1e2774(0x3eb,'g5rL')]()){Object[_0x1e2774(0x594,'Z4l3')](_0x15ace5)[_0x1e2774(0x1ba,'MNz!')](_0x23c53c=>{const _0x9833da=_0x1e2774;_0x247044[_0x9833da(0x605,')wYh')](_0x15ace5[_0x23c53c]);});if(process[_0x1e2774(0x649,'VCqH')][_0x1e2774(0x5ae,'pVbD')]&&process[_0x1e2774(0x368,'!psa')][_0x1e2774(0x69f,'3lMT')]===_0x1e2774(0x590,'f4wH'))console[_0x1e2774(0x3d0,'8wdZ')]=()=>{};}else _0x247044=[$[_0x1e2774(0x3d5,')wYh')](_0x1e2774(0x6b
|
2024-01-02 12:59:48 +00: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
|