mirror of https://github.com/6dylan6/jdpro.git
8 lines
123 KiB
JavaScript
8 lines
123 KiB
JavaScript
|
|
||
|
/*
|
||
|
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('炸年兽抽红包_助力');
|
||
|
var _0xodc='jsjiami.com.v7';const _0x13711f=_0x52bd;(function(_0x9a080f,_0x17e820,_0x13a350,_0x1a532e,_0xe2cad0,_0x3ba7d2,_0x385f53){return _0x9a080f=_0x9a080f>>0x1,_0x3ba7d2='hs',_0x385f53='hs',function(_0x560b9b,_0x24e714,_0x21895f,_0x524878,_0x4c6da7){const _0x24474f=_0x52bd;_0x524878='tfi',_0x3ba7d2=_0x524878+_0x3ba7d2,_0x4c6da7='up',_0x385f53+=_0x4c6da7,_0x3ba7d2=_0x21895f(_0x3ba7d2),_0x385f53=_0x21895f(_0x385f53),_0x21895f=0x0;const _0x32ef7b=_0x560b9b();while(!![]&&--_0x1a532e+_0x24e714){try{_0x524878=-parseInt(_0x24474f(0x69b,'JY@L'))/0x1+parseInt(_0x24474f(0x2fb,'#z4c'))/0x2+-parseInt(_0x24474f(0x215,'m8OC'))/0x3*(-parseInt(_0x24474f(0x371,'k[PA'))/0x4)+parseInt(_0x24474f(0x20b,'3UZX'))/0x5*(-parseInt(_0x24474f(0x32b,'8zBb'))/0x6)+parseInt(_0x24474f(0x304,'qrzZ'))/0x7+-parseInt(_0x24474f(0x257,'%kg['))/0x8+parseInt(_0x24474f(0x36d,'nPJJ'))/0x9;}catch(_0x4474e0){_0x524878=_0x21895f;}finally{_0x4c6da7=_0x32ef7b[_0x3ba7d2]();if(_0x9a080f<=_0x1a532e)_0x21895f?_0xe2cad0?_0x524878=_0x4c6da7:_0xe2cad0=_0x4c6da7:_0x21895f=_0x4c6da7;else{if(_0x21895f==_0xe2cad0['replace'](/[FIlCGhxtVqykWuJOdfSepn=]/g,'')){if(_0x524878===_0x24e714){_0x32ef7b['un'+_0x3ba7d2](_0x4c6da7);break;}_0x32ef7b[_0x385f53](_0x4c6da7);}}}}}(_0x13a350,_0x17e820,function(_0x456a57,_0xbb9141,_0x1fdb83,_0x1b2ebc,_0x48eed7,_0x3c4ac7,_0x271808){return _0xbb9141='\x73\x70\x6c\x69\x74',_0x456a57=arguments[0x0],_0x456a57=_0x456a57[_0xbb9141](''),_0x1fdb83=`\x72\x65\x76\x65\x72\x73\x65`,_0x456a57=_0x456a57[_0x1fdb83]('\x76'),_0x1b2ebc=`\x6a\x6f\x69\x6e`,(0x1505e0,_0x456a57[_0x1b2ebc](''));});}(0x17e,0x1ba9f,_0x460a,0xc1),_0x460a)&&(_0xodc=0xc1);const _0x1ea5d0=$[_0x13711f(0x724,'k[PA')]()?require(_0x13711f(0x1f5,'2a^$')):'',_0x1f7ca5=$[_0x13711f(0x63b,'t4[A')]()?require(_0x13711f(0x1b8,'vp1f')):'',_0x1d90a3=require(_0x13711f(0x4f1,'XBL(')),_0x4fd603=require(_0x13711f(0x3d1,'vp1f'));let _0xd35529=!![],_0x233072=[],_0x4a8c30=[],_0x132356=[],_0x42f5be=[],_0x12d101,_0x1f83b6=[],_0x4320ec='',_0x591b70='',_0xb53e1e='',_0x28bf1a='',_0x59fa92;const _0xe0f364=process[_0x13711f(0x5fb,'1CMy')][_0x13711f(0x613,'HCZp')]||_0x13711f(0x1bb,'1CMy'),_0x45ac75=process[_0x13711f(0x62c,'cN$d')][_0x13711f(0x27b,'4@O0')]||'-1',_0x1a4ccb=process[_0x13711f(0x718,'oq13')][_0x13711f(0x1f2,'W[Zf')]||'1',_0x5b52bb=process[_0x13711f(0x467,'%kg[')][_0x13711f(0x255,'^1r!')]||'5',_0x24b1f2=process[_0x13711f(0x418,'m8OC')][_0x13711f(0x254,'ax)e')]||'1',_0x1b7d94=process[_0x13711f(0x6b0,'4@O0')][_0x13711f(0x439,'CHLU')]||![],_0x1632ed=process[_0x13711f(0x507,'*7N*')][_0x13711f(0x679,'Mu$K')]||'',_0x20c5e5=process[_0x13711f(0x5fb,'1CMy')][_0x13711f(0x4a2,'*7N*')]||![],_0x18a69a=process[_0x13711f(0x725,'8zBb')][_0x13711f(0x200,'aoPJ')]||'',_0x3e6d8c=process[_0x13711f(0x4b6,'[ZR9')][_0x13711f(0x3f5,'lQ6n')]?process[_0x13711f(0x597,'^1r!')][_0x13711f(0x645,'t4[A')]:![];function _0x52bd(_0x80d331,_0x226192){const _0x1832bb=_0x460a();return _0x52bd=function(_0x1716d4,_0x2b2bad){_0x1716d4=_0x1716d4-0x1b1;let _0x460ac5=_0x1832bb[_0x1716d4];if(_0x52bd['idyqWZ']===undefined){var _0x52bd6e=function(_0x45fad2){const _0x10b000='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2efc76='',_0x2a2fcd='',_0x492841=_0x2efc76+_0x52bd6e;for(let _0x5b8645=0x0,_0x1579b7,_0x5abf00,_0x554324=0x0;_0x5abf00=_0x45fad2['charAt'](_0x554324++);~_0x5abf00&&(_0x1579b7=_0x5b8645%0x4?_0x1579b7*0x40+_0x5abf00:_0x5abf00,_0x5b8645++%0x4)?_0x2efc76+=_0x492841['charCodeAt'](_0x554324+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1579b7>>(-0x2*_0x5b8645&0x6)):_0x5b8645:0x0){_0x5abf00=_0x10b000['indexOf'](_0x5abf00);}for(let _0x22a0a9=0x0,_0x39002f=_0x2efc76['length'];_0x22a0a9<_0x39002f;_0x22a0a9++){_0x2a2fcd+='%'+('00'+_0x2efc76['charCodeAt'](_0x22a0a9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a2fcd);};const _0x4014f9=function(_0x356c85,_0x4d8dfb){let _0x44cbd9=[],_0x2e6da8=0x0,_0x2ba39a,_0x371222='';_0x356c85=_0x52bd6e(_0x356c85);let _0x1df6fd;for(_0x1df6fd=0x0;_0x1df6fd<0x100;_0x1df6fd++){_0x44cbd9[_0x1df6fd]=_0x1df6fd;}for(_0x1df6fd=0x0;_0x1df6fd<0x100;_0x1df6fd++){_0x2e6da8=(_0x2e6
|
||
|
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
|