mirror of https://github.com/6dylan6/jdpro.git
11 lines
157 KiB
JavaScript
11 lines
157 KiB
JavaScript
|
|
||
|
/*
|
||
|
赛跑兑10红包
|
||
|
1 1 1 1 * jd_joyrunred.js
|
||
|
fix
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('赛跑兑10红包');
|
||
|
(function(_0x9f42dc,_0x5eda8f){const _0x34f1d5={_0x578d6d:'\x30\x78\x34\x37',_0x29db3f:'\x38\x37\x6d\x48',_0x25e858:'\x30\x78\x62\x32',_0x201b08:'\x30\x78\x31\x31\x37',_0x57b387:'\x30\x78\x31\x39\x38',_0x4b0d8a:'\x48\x37\x6b\x78',_0x38bcc5:'\x30\x78\x62\x65',_0x260c1d:'\x30\x78\x65\x61',_0x165894:'\x30\x78\x31\x37\x62',_0xd094c0:'\x32\x5a\x4a\x4a',_0x1c9106:'\x30\x78\x31\x61\x34',_0xed3ece:'\x30\x78\x31\x35\x32',_0x157ec6:'\x30\x78\x37',_0x17c904:'\x38\x37\x6d\x48',_0x179232:'\x30\x78\x62\x34',_0x5eec0a:'\x30\x78\x63\x64',_0x247312:'\x4e\x55\x21\x51',_0x3fa207:'\x30\x78\x37\x39',_0x839fe0:'\x30\x78\x31\x65',_0x151aa0:'\x30\x78\x31\x34\x65',_0x322fb5:'\x29\x5d\x29\x78',_0x40f47a:'\x30\x78\x31\x66\x39',_0x3729f9:'\x30\x78\x31\x39\x39',_0x267be0:'\x30\x78\x31\x64\x62',_0x17b12d:'\x4e\x55\x21\x51',_0x501819:'\x30\x78\x31\x37\x65',_0x975b53:'\x30\x78\x31\x31\x32',_0x2ad3c7:'\x30\x78\x32\x30\x37',_0x32ce90:'\x36\x63\x46\x61',_0x1a3a39:'\x30\x78\x32\x31\x36',_0x4e7ea0:'\x30\x78\x31\x38\x36',_0x296f27:'\x30\x78\x31\x64\x64',_0x30b80c:'\x6e\x79\x6a\x61',_0x1b6ebb:'\x30\x78\x31\x33\x32',_0x29dc98:'\x30\x78\x31\x36\x65'},_0x522112={_0x2b5f2b:'\x30\x78\x32\x30\x32'},_0x28fd3d={_0x36a60a:'\x30\x78\x31\x61'};function _0x119fda(_0xd542be,_0x1f3533,_0x33bc5c,_0x2cb143){return _0x335a(_0x2cb143-_0x28fd3d._0x36a60a,_0x1f3533);}function _0x2e7849(_0x4086aa,_0x39137f,_0x542f33,_0x5126ff){return _0x335a(_0x5126ff- -_0x522112._0x2b5f2b,_0x39137f);}const _0x43e8d4=_0x9f42dc();while(!![]){try{const _0x3ba465=-parseInt(_0x119fda(_0x34f1d5._0x578d6d,_0x34f1d5._0x29db3f,_0x34f1d5._0x25e858,_0x34f1d5._0x201b08))/(0xd20+-0xde4+-0xc5*-0x1)*(parseInt(_0x2e7849(-_0x34f1d5._0x57b387,_0x34f1d5._0x4b0d8a,-_0x34f1d5._0x38bcc5,-_0x34f1d5._0x260c1d))/(-0x64e+0x6a7+-0x57))+-parseInt(_0x119fda(_0x34f1d5._0x165894,_0x34f1d5._0xd094c0,_0x34f1d5._0x1c9106,_0x34f1d5._0xed3ece))/(0x1a4b+0x22c6+-0x3d0e)*(parseInt(_0x2e7849(_0x34f1d5._0x157ec6,_0x34f1d5._0x17c904,-_0x34f1d5._0x25e858,-_0x34f1d5._0x179232))/(0x2448+-0x1864+0x50*-0x26))+parseInt(_0x2e7849(_0x34f1d5._0x5eec0a,_0x34f1d5._0x247312,-_0x34f1d5._0x3fa207,_0x34f1d5._0x839fe0))/(0x1*0xeb1+0x1*-0x18ea+0xa3e)+parseInt(_0x119fda(_0x34f1d5._0x151aa0,_0x34f1d5._0x322fb5,_0x34f1d5._0x40f47a,_0x34f1d5._0x3729f9))/(-0x1bb*-0x7+-0xd7f+0x168)+-parseInt(_0x119fda(_0x34f1d5._0x267be0,_0x34f1d5._0x17b12d,_0x34f1d5._0x501819,_0x34f1d5._0x975b53))/(0x2145*-0x1+-0x15d+0x22a9)+-parseInt(_0x119fda(_0x34f1d5._0x2ad3c7,_0x34f1d5._0x32ce90,_0x34f1d5._0x1a3a39,_0x34f1d5._0x4e7ea0))/(0x250*0xc+-0x1*-0x207e+-0x15*0x2de)+parseInt(_0x119fda(_0x34f1d5._0x296f27,_0x34f1d5._0x30b80c,_0x34f1d5._0x1b6ebb,_0x34f1d5._0x29dc98))/(0x1*0xd07+-0x1*0x281+-0xa7d);if(_0x3ba465===_0x5eda8f)break;else _0x43e8d4['push'](_0x43e8d4['shift']());}catch(_0x585f41){_0x43e8d4['push'](_0x43e8d4['shift']());}}}(_0x29e0,-0x3c81c+-0x8057+0xc129b));const _0x18223c=$[_0x1225d5('\x30\x78\x33\x38\x34','\x30\x78\x32\x66\x66','\x6e\x79\x6a\x61','\x30\x78\x33\x34\x32')]()?require(_0x1225d5('\x30\x78\x31\x63\x66','\x30\x78\x32\x31\x65','\x48\x4d\x34\x39','\x30\x78\x32\x63\x32')):'',_0x5ca62b=$[_0x1225d5('\x30\x78\x33\x37\x39','\x30\x78\x33\x30\x34','\x24\x39\x63\x25','\x30\x78\x32\x64\x35')]()?require(_0x1225d5('\x30\x78\x32\x36\x62','\x30\x78\x32\x61\x64','\x25\x66\x26\x6a','\x30\x78\x31\x65\x32')):'';let _0x2fb323=!![];function _0x521602(_0x4975fa,_0x10e551,_0x5c4ece,_0x320065){const _0x456e0f={_0x235e7e:'\x30\x78\x32\x37\x32'};return _0x335a(_0x5c4ece-_0x456e0f._0x235e7e,_0x320065);}function _0x335a(_0x26d1d7,_0x5d9fad){const _0x43e340=_0x29e0();return _0x335a=function(_0x39c093,_0x1d6941){_0x39c093=_0x39c093-(0x22df+0x21a*0x12+-0x3*0x17fd);let _0x5d42e2=_0x43e340[_0x39c093];if(_0x335a['\x4a\x50\x5a\x73\x4c\x62']===undefined){var _0x40ab38=function(_0x2c5544){const _0x248362='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x5548a6='',_0x3031d8='',_0x3
|
||
|
// prettier-ignore
|
||
|
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
|