jdpro/jd_3c_task.js

7 lines
114 KiB
JavaScript
Raw Normal View History

2024-11-04 23:48:55 +00:00
/*
33 3,16 * * * jd_3c_task.js
*/
const $ = new Env('3C每日签到');
2024-11-27 12:35:28 +00:00
function funkiVZ(){}var STYrdl=Object['defineProperty'],G6WwmEb,ntEYGS,mFDyrq,WiLvvJX,i0S1vH,fKBGiIh,XEvP7ff,fWl1l1X,ZRWhxrf,QnlTJn,kcvuvV,sZbzXg,rUK6gV9,uSFvb0q,aIkrrL1,qqI6xM4,XGwLnxA,Ww7ria,gAYkapx,dlVEiuE,kcWxl6;function b5D25pQ(funkiVZ){return G6WwmEb[funkiVZ>0x93?funkiVZ-0x4b:funkiVZ<-0x2c?funkiVZ+0x2d:funkiVZ+0x2b]}G6WwmEb=iTnIQNs();function r74Q1_(funkiVZ,STYrdl){var mFDyrq=dLZkd1(funkiVZ=>{return G6WwmEb[funkiVZ<0x22?funkiVZ-0x20:funkiVZ<0xe1?funkiVZ-0x23:funkiVZ+0x2e]},0x1);ntEYGS(funkiVZ,mFDyrq(0x3a),{value:STYrdl,configurable:!0x0});return funkiVZ}funkiVZ(ntEYGS=Object.defineProperty,mFDyrq=dLZkd1((funkiVZ,STYrdl)=>{return STYrdl(funkiVZ())},0x2)(QtVBFZQ,dD9EOh));var O_R1cs=[],SEgnsM=[F6Fqt4L(b5D25pQ(-0x1f)),F6Fqt4L(0x1),F6Fqt4L(0x2),F6Fqt4L(0x3),F6Fqt4L(0x4),F6Fqt4L(0x5),F6Fqt4L(b5D25pQ(-0x1d)),F6Fqt4L(0x7),F6Fqt4L(0x8),F6Fqt4L(0x9),F6Fqt4L(0xa),F6Fqt4L(0xb),F6Fqt4L(b5D25pQ(0x82)),F6Fqt4L(0xd),F6Fqt4L(0xe),F6Fqt4L(0xf),F6Fqt4L(0x10),F6Fqt4L(0x11),F6Fqt4L(0x12),F6Fqt4L(0x13),F6Fqt4L(0x14),F6Fqt4L(0x15),F6Fqt4L(0x16),F6Fqt4L(0x17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4L(0x72),F6Fqt4L(b5D25pQ(-0x2a)),F6Fqt4L(0x73),'y}av5Ztl5t1$[f`~fkZ7/pdm9$SX)K>8x|av',F6Fqt4L(0x74),F6Fqt4L(0x75),F6Fqt4L(b5D25pQ(-0x2a)),F6Fqt4L(0x76),F6Fqt4L(0x77),F6Fqt4L(b5D25pQ(0x1b)),F6Fqt4L(0x79),F6Fqt4L(0x7a),F6Fqt4L(b5D25pQ(0x36)),F6Fqt4L(b5D25pQ(-0x28)),F6Fqt4L(0x7d),F6Fqt4L(0x7e),F6Fqt4L(0x7f),F6Fqt4L(0x80),F6Fqt4L(0x81),F6Fqt4L(0x82),F6Fqt4L(0x83),b5D25pQ(-0x26),F6Fqt4L(0x84),F6Fqt4L(0x25),F6Fqt4L(0x85),F6Fqt4L(0x86),F6Fqt4L(0x87),';};LGr|i',F6Fqt4L(0x88),F6Fqt4L(b5D25pQ(-0xa)),F6Fqt4L(0x9),F6Fqt4L(0x8a),F6Fqt4L(0x8b),F6Fqt4L(b5D25pQ(0x37)),F6Fqt4L(0x8d),F6Fqt4L(0x8e),F6Fqt4L(b5D25pQ(-0x29)),F6Fqt4L(0x90),F6Fqt4L(0x91),F6Fqt4L(b5D25pQ(0x8)),F6Fqt4L(0x93),F6Fqt4L(0x91),F6Fqt4L(0x8f),F6Fqt4L(0x25),F6Fqt4L(0x9),F6Fqt4L(0x94),F6Fqt4L(0x67),F6Fqt4L(0x5d),F6Fqt4L(0x5e),F6Fqt4L(0x25),F6Fqt4L(0x60),F6Fqt4L(0x95),F6Fqt4L(0x96),F6Fqt4L(0x2a),'fkZxIj|i',';};LGr|i',F6Fqt4L(0x97),F6Fqt
2024-11-04 23:48:55 +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