2024-06-28 07:47:44 +00:00
|
|
|
/*
|
2024-06-30 10:40:42 +00:00
|
|
|
22 10 * * * jd_zwb.js
|
2024-06-28 07:47:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
const $ = new Env('做任务赚汪贝');
|
2024-06-30 10:40:42 +00:00
|
|
|
const bdy_0x467628=bdy_0x3ce9;(function(_0x29f07a,_0x490e43){const bdy_0x11cd42={_0x5b664c:'A8@W',_0x59d5bf:'0x510',_0x4eb871:'OFgB',_0x1bbb06:'0x362',_0xc915b0:'A]$G',_0x11c49c:'0x581'},_0x195af2=bdy_0x3ce9,_0x9b469=_0x29f07a();while(!![]){try{const _0x4fa85d=parseInt(_0x195af2('0x559',bdy_0x11cd42._0x5b664c))/(0xd26+-0x1*0x14f+0x3f2*-0x3)+-parseInt(_0x195af2(bdy_0x11cd42._0x59d5bf,'4*vt'))/(-0x1*-0x935+-0x1c45+0x1312)*(parseInt(_0x195af2('0x139','^P#M'))/(0xc9*-0x7+-0x3b*-0x1+0x547*0x1))+-parseInt(_0x195af2('0x419','KZa)'))/(0x1ac7+0x64b*-0x3+-0x7e2*0x1)*(-parseInt(_0x195af2('0x3bc',bdy_0x11cd42._0x4eb871))/(-0xe98+-0x23*0x83+0x2086))+parseInt(_0x195af2('0x430','bNuC'))/(0x2*0x107e+-0x5*-0x56f+0x3c21*-0x1)+-parseInt(_0x195af2('0x40f','*b]^'))/(0x2561+-0x25eb+-0x91*-0x1)+-parseInt(_0x195af2('0x387','Q9#Z'))/(0x54*-0x30+0xb2b*-0x1+0x1af3)*(parseInt(_0x195af2(bdy_0x11cd42._0x1bbb06,bdy_0x11cd42._0xc915b0))/(0x1b07+0x6cf+-0x1fd*0x11))+-parseInt(_0x195af2(bdy_0x11cd42._0x11c49c,'Q9#Z'))/(0x1d67+0x173a+-0x3497);if(_0x4fa85d===_0x490e43)break;else _0x9b469['push'](_0x9b469['shift']());}catch(_0x2af7b1){_0x9b469['push'](_0x9b469['shift']());}}}(bdy_0x3238,0x45*0x262b+0x86a38+-0x408b2));const bdy_0xae38b=(function(){const bdy_0x4a3cc4={_0x464628:'4*vt',_0x37bc2f:'A8@W',_0x4853c1:'0x2ce'},bdy_0x2c4c11={_0x38d63b:'0x353',_0x41fcb6:'0x492',_0x68bbc3:'c@!2',_0x5a6799:'OFgB'},_0x28c670=bdy_0x3ce9,_0x59737a={};_0x59737a[_0x28c670('0x2d3',bdy_0x4a3cc4._0x464628)]=function(_0x256b8d,_0x4b5bcf){return _0x256b8d===_0x4b5bcf;},_0x59737a[_0x28c670('0x398',bdy_0x4a3cc4._0x37bc2f)]=_0x28c670('0x212','F)[@'),_0x59737a[_0x28c670('0x4b5','rsA1')]=_0x28c670(bdy_0x4a3cc4._0x4853c1,'DiwE');const _0x3b1a71=_0x59737a;let _0x310610=!![];return function(_0x6ffa18,_0x1b2c65){const _0x12912f=bdy_0x3ce9;if(_0x3b1a71[_0x12912f(bdy_0x2c4c11._0x38d63b,'Y3zO')](_0x3b1a71[_0x12912f(bdy_0x2c4c11._0x41fcb6,bdy_0x2c4c11._0x68bbc3)],_0x3b1a71[_0x12912f('0x4ac',bdy_0x2c4c11._0x5a6799)]))_0x32d4f5();else{const _0x3a53a2=_0x310610?function(){const _0x3512c2=bdy_0x3ce9;if(_0x1b2c65){const _0xed51a2=_0x1b2c65[_0x3512c2('0x48b','c@!2')](_0x6ffa18,arguments);return _0x1b2c65=null,_0xed51a2;}}:function(){};return _0x310610=![],_0x3a53a2;}};}()),bdy_0x36ef91=bdy_0xae38b(this,function(){const bdy_0x18ff19={_0x5d7884:'0xef',_0x540f37:'A8@W',_0x2ef6c1:'0x187',_0x276f1f:'#ClR',_0x2b705f:'nmi['},_0x5840a8=bdy_0x3ce9,_0x1d9ba0={};_0x1d9ba0[_0x5840a8(bdy_0x18ff19._0x5d7884,']Xs0')]=_0x5840a8('0x38d',bdy_0x18ff19._0x540f37);const _0x10ac11=_0x1d9ba0;return bdy_0x36ef91[_0x5840a8('0x420','^P#M')]()[_0x5840a8('0x365','DiwE')](_0x10ac11[_0x5840a8(bdy_0x18ff19._0x2ef6c1,'h58w')])[_0x5840a8('0x223','zgqZ')]()[_0x5840a8('0x395',bdy_0x18ff19._0x276f1f)](bdy_0x36ef91)[_0x5840a8('0x271','@&^S')](_0x10ac11[_0x5840a8('0x4b2',bdy_0x18ff19._0x2b705f)]);});bdy_0x36ef91();const bdy_0x364343=(function(){let _0x23681d=!![];return function(_0x578c88,_0x2fa079){const bdy_0x1ffded={_0x4b56fe:'0x1cc'},_0x3bde6e=_0x23681d?function(){const _0x13df50=bdy_0x3ce9;if(_0x2fa079){const _0x3ba7c0=_0x2fa079[_0x13df50(bdy_0x1ffded._0x4b56fe,'p0Ha')](_0x578c88,arguments);return _0x2fa079=null,_0x3ba7c0;}}:function(){};return _0x23681d=![],_0x3bde6e;};}());(function(){const bdy_0x1fdebd={_0x59d694:'A8@W',_0x464699:']b7D',_0x417459:'&5&V',_0x4825dd:'0x56a'},bdy_0x329631={_0x16945c:'A8@W',_0x2192b9:'0x527',_0x918764:'4*vt',_0x5c876d:'0x4b7',_0xd762dd:'HnGi',_0x5e212b:'0x461',_0x14ac0a:'0x53c'},_0x40f06e=bdy_0x3ce9,_0x39cc26={};_0x39cc26[_0x40f06e('0x1e9',bdy_0x1fdebd._0x59d694)]=_0x40f06e('0x447',bdy_0x1fdebd._0x464699),_0x39cc26[_0x40f06e('0x39a','^0HC')]=_0x40f06e('0x192',bdy_0x1fdebd._0x417459),_0x39cc26[_0x40f06e('0x205','Q9#Z')]=_0x40f06e(bdy_0x1fdebd._0x4825dd,']b7D');const _0x2ba708=_0x39cc26;bdy_0x364343(this,function(){const _0x4dbfc2=bdy_0x3ce9;if(_0x2ba708[_0x4dbfc2('0x329','Z$&9')]===_0x4dbfc2('0x290','4*vt')){_0x518020=_0x44a463[_0x4dbfc2('0x4e8','c@!2')](_0x267391);if(_0x94c14e[_0x4dbfc2('0x347',bdy_0x329631._0x16945c)]==='1'){}else _0x4d7875[_0x4dbfc2('0x4c3','OFgB')]==='0'&&(_0x1a20ee[_0x4dbfc2(bdy
|
2024-06-28 07:47:44 +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
|