mirror of https://github.com/6dylan6/jdpro.git
12 lines
419 KiB
JavaScript
12 lines
419 KiB
JavaScript
|
/*
|
|||
|
默认0.04倍,9点后自动0.01倍
|
|||
|
倍数变量JOY_RUN_ASSETS='0.01'
|
|||
|
https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_joy_run.js
|
|||
|
定时自定义
|
|||
|
updatetime: 2022/12/4 fix
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('汪汪赛跑-加密');
|
|||
|
(function(_0x2c6ea9,_0x2116ce){const _0x570c53={_0x2e9f55:'\x30\x78\x34\x33\x39',_0x352a7c:'\x30\x78\x34\x30\x32',_0x212f5c:'\x34\x5e\x32\x26',_0x548617:'\x30\x78\x33\x63\x36',_0x439d65:'\x30\x78\x32\x31\x64',_0x2afbe6:'\x30\x78\x31\x64\x64',_0x2eac47:'\x30\x78\x32\x62\x33',_0x5cd12b:'\x30\x78\x31\x66\x65',_0x4e5251:'\x6b\x2a\x79\x78',_0x33d1dd:'\x30\x78\x63\x61',_0x1cdc6a:'\x30\x78\x36\x34\x36',_0x2fb448:'\x30\x78\x34\x35\x64',_0x5c0298:'\x50\x67\x59\x5e',_0x4a5daf:'\x30\x78\x38\x30\x64',_0x3ca7c4:'\x30\x78\x34\x66\x31',_0x4cab1a:'\x30\x78\x35\x33\x39',_0x2dd443:'\x30\x78\x33\x36\x36',_0x390edd:'\x37\x41\x54\x76',_0x25c69d:'\x30\x78\x33\x35\x33',_0x17a034:'\x30\x78\x35\x31\x36',_0x4b2f5c:'\x30\x78\x35\x38\x30',_0x37b04d:'\x30\x78\x34\x30\x33',_0x11effd:'\x30\x78\x36\x39\x62',_0x39f221:'\x30\x78\x35\x61\x39',_0x5bab53:'\x68\x73\x69\x72',_0x20e144:'\x30\x78\x32\x33\x37',_0x319412:'\x30\x78\x61\x66',_0xc9e2bc:'\x30\x78\x31\x62\x65',_0x55bbd4:'\x30\x78\x31\x64',_0x3ef141:'\x52\x32\x6e\x59',_0x31d24a:'\x30\x78\x31\x38\x35',_0x25bedd:'\x30\x78\x62',_0x2a3d60:'\x30\x78\x31\x61\x37',_0x48ea3c:'\x30\x78\x31\x37\x33',_0x4c087d:'\x30\x78\x33\x36\x64',_0x58ec94:'\x30\x78\x31\x39\x37',_0x1006b1:'\x65\x56\x5b\x6a',_0x2a54df:'\x30\x78\x33\x39\x32',_0x1cb910:'\x30\x78\x31\x62\x35',_0x3b0c46:'\x28\x62\x54\x29',_0x563539:'\x30\x78\x34\x39',_0x47fea8:'\x30\x78\x32\x39',_0x23d94b:'\x30\x78\x31\x63\x62',_0x207309:'\x30\x78\x31\x36\x31',_0x17d2c1:'\x30\x78\x31\x39\x63',_0x5c0716:'\x30\x78\x31\x64\x37',_0x46feab:'\x30\x78\x34\x38',_0x4a5e80:'\x69\x78\x41\x50',_0x4fcdd1:'\x30\x78\x37\x65',_0x22e886:'\x30\x78\x35\x66\x31',_0x19b033:'\x30\x78\x33\x63\x61',_0xa068b5:'\x28\x62\x54\x29',_0x3ebcbb:'\x30\x78\x36\x66\x36',_0x2655d9:'\x30\x78\x34\x36\x61',_0x32aec3:'\x30\x78\x35\x35\x39',_0x36ebb6:'\x30\x78\x36\x35\x34',_0x243eeb:'\x30\x78\x36\x65\x33',_0x1441d5:'\x70\x46\x59\x69',_0x47bb0f:'\x30\x78\x36\x37\x33'},_0x11b034={_0xbb0f50:'\x30\x78\x32\x61\x33'},_0x2b9294={_0x2e3ebc:'\x30\x78\x32\x30\x33'},_0x58b033={_0x39dd5e:'\x30\x78\x31\x61\x32'},_0x137fdf={_0x2730d5:'\x30\x78\x31\x65\x30'},_0x53b166={_0x5857e5:'\x30\x78\x32\x66'};function _0x563adf(_0x290eee,_0x4d7c20,_0x3765ad,_0x1d5955,_0x52d73d){return _0x5d63(_0x290eee- -_0x53b166._0x5857e5,_0x1d5955);}function _0x4078de(_0x5c79e3,_0x279423,_0x265d6c,_0xf59c0f,_0x134dcf){return _0x5d63(_0x265d6c- -_0x137fdf._0x2730d5,_0x5c79e3);}function _0xc2f01a(_0xcd1b6d,_0x446ee1,_0x34481c,_0x431329,_0x164c56){return _0x5d63(_0x446ee1-_0x58b033._0x39dd5e,_0x431329);}function _0x458050(_0x1a7164,_0x4af049,_0x45f236,_0x3ac3a8,_0x3f4b25){return _0x5d63(_0x3ac3a8-_0x2b9294._0x2e3ebc,_0x3f4b25);}function _0x27787a(_0x5cbe64,_0x30424d,_0x4ebd39,_0x3dbd06,_0x55611d){return _0x5d63(_0x5cbe64-_0x11b034._0xbb0f50,_0x4ebd39);}const _0xd7cf0b=_0x2c6ea9();while(!![]){try{const _0x3b2dd8=-parseInt(_0x27787a(_0x570c53._0x2e9f55,_0x570c53._0x352a7c,_0x570c53._0x212f5c,_0x570c53._0x548617,_0x570c53._0x439d65))/(-0x19bd+-0x250f+0x3ecd)*(-parseInt(_0xc2f01a(_0x570c53._0x2afbe6,_0x570c53._0x2eac47,_0x570c53._0x5cd12b,_0x570c53._0x4e5251,_0x570c53._0x33d1dd))/(0xf03+0x10a3*-0x1+-0xb*-0x26))+-parseInt(_0x27787a(_0x570c53._0x1cdc6a,_0x570c53._0x2fb448,_0x570c53._0x5c0298,_0x570c53._0x4a5daf,_0x570c53._0x3ca7c4))/(0x908+-0x2*-0x10b2+-0x2a69)+parseInt(_0x27787a(_0x570c53._0x4cab1a,_0x570c53._0x2dd443,_0x570c53._0x390edd,_0x570c53._0x25c69d,_0x570c53._0x17a034))/(-0x1*0x2011+0x94*0x33+0x299)*(-parseInt(_0x458050(_0x570c53._0x4b2f5c,_0x570c53._0x37b04d,_0x570c53._0x11effd,_0x570c53._0x39f221,_0x570c53._0x5bab53))/(0xe18+0x124*-0x3+-0xaa7))+-parseInt(_0x4078de(_0x570c53._0x5c0298,_0x570c53._0x20e144,_0x570c53._0x319412,_0x570c53._0xc9e2bc,-_0x570c53._0x55bbd4))/(0x587+-0x5*0x505+-0xc*-0x1a2)*(parseInt(_0x4078de(_0x570c53._0x3ef141,-_0x570c53._0x31d24a,_0x570c53._0x25bedd,_0x570c53._0x2a3d60,-_0x570c53._0x48ea3c))/(0x48a+0x310+-0x793))+parseInt(_0x27787a(_0x570c53._0x4c087d,_0x570c53._0x58ec94,_0x570c53._0x1006b1,_0x570c53._0x2a54df,_0x570c53._0x1cb910))/(-0x1*-0xd0a+0x1031+0x73*-0x41)*(parseInt(_0x4078de(_0x570c53._0x3b0c46,_0x570c53._0
|
|||
|
// 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
|