jdpro/jd_mssign.js

7 lines
98 KiB
JavaScript
Raw Normal View History

2024-11-27 13:36:56 +00:00
/*
35 12 * * * jd_mssign.js
*/
const $ = new Env('秒送签到');
function Yw9Pyw(){}var JYgUybe=Object['defineProperty'],kht9JVS,IMGJQg,iDm5hQE,iJKzzS,lR4D5XU,KtQaZcV,DHXXqy,uNqq2rV,YpX_oC,JfI9ZjO,rjk7v8,xlrICh,Fc0xF1z,SJHyuCN;function bXOF9no(Yw9Pyw){return kht9JVS[Yw9Pyw<-0x2a?Yw9Pyw-0x2c:Yw9Pyw>0x6c?Yw9Pyw+0x3b:Yw9Pyw<0x6c?Yw9Pyw+0x29:Yw9Pyw+0x4]}kht9JVS=J8ZHR2();function iYSSyOM(Yw9Pyw,JYgUybe){IMGJQg(Yw9Pyw,'length',{value:JYgUybe,configurable:!0x0});return Yw9Pyw}Yw9Pyw(IMGJQg=Object.defineProperty,iDm5hQE=iYSSyOM(y1BXTV((...JYgUybe)=>{var IMGJQg=y1BXTV(JYgUybe=>{return kht9JVS[JYgUybe<0x61?JYgUybe-0xe:JYgUybe>0xf7?JYgUybe+0x1e:JYgUybe>0xf7?JYgUybe-0x29:JYgUybe>0xf7?JYgUybe-0x3a:JYgUybe-0x62]},0x1);Yw9Pyw(JYgUybe.length=IMGJQg(0x7a),JYgUybe[IMGJQg(0x62)]=0x3c);if(JYgUybe[IMGJQg(0x62)]>0x97){return JYgUybe[JYgUybe[JYgUybe[IMGJQg(0x62)]-0x2]-0x31]}else{var iDm5hQE=y1BXTV(JYgUybe=>{return kht9JVS[JYgUybe<-0x43?JYgUybe-0x51:JYgUybe<-0x43?JYgUybe+0x43:JYgUybe>0x53?JYgUybe+0x14:JYgUybe+0x42]},0x1);return JYgUybe[0x1](JYgUybe[iDm5hQE(-0x32)]())}}),0x2)(S6oWzH,_MLvuEg));var yKZc873=[],N2Z6w2H=[XWcOiMu(0x0),XWcOiMu(bXOF9no(-0x1e)),XWcOiMu(0x2),XWcOiMu(0x3),XWcOiMu(0x4),XWcOiMu(bXOF9no(0x2f)),XWcOiMu(0x6),XWcOiMu(0x7),XWcOiMu(bXOF9no(-0x16)),XWcOiMu(0x7),XWcOiMu(0x8),bXOF9no(-0x26),'zsLi|',XWcOiMu(bXOF9no(-0x28)),XWcOiMu(0xa),'4_!*|',XWcOiMu(0xb),XWcOiMu(0xc),XWcOiMu(0xd),XWcOiMu(0xe),XWcOiMu(0xf),XWcOiMu(0x10),XWcOiMu(0x11),XWcOiMu(0x12),XWcOiMu(0x13),XWcOiMu(0x14),XWcOiMu(0x15),'|Sa*J+)t#',XWcOiMu(bXOF9no(0x4)),XWcOiMu(0x17),XWcOiMu(0x18),XWcOiMu(0x19),XWcOiMu(0x1a),XWcOiMu(0x1b),XWcOiMu(0x1c),XWcOiMu(0x1d),XWcOiMu(0x1e),XWcOiMu(0x1f),XWcOiMu(bXOF9no(0x4f)),XWcOiMu(0x21),XWcOiMu(0x22),XWcOiMu(0x23),XWcOiMu(0x24),XWcOiMu(0x9),bXOF9no(-0x27),XWcOiMu(0x25),'|J$`w~Hfo]qVp1',XWcOiMu(bXOF9no(0xa)),XWcOiMu(0x27),XWcOiMu(0x28),'dE(j]41jR}<[0>NM+hK)R.|3Oc}0,',XWcOiMu(bXOF9no(0x51)),XWcOiMu(0x2a),'=UUxv|TS',XWcOiMu(0x2b),XWcOiMu(0x2c),XWcOiMu(bXOF9no(0x2e)),XWcOiMu(0x2e),XWcOiMu(0x2f),'BWaPq|G',XWcOiMu(0x30),XWcOiMu(0x31),XWcOiMu(0x32),'4f|N+4VS',XWcOiMu(0x33),XWcOiMu(0x34),XWcOiMu(bXOF9no(-0x20)),XWcOiMu(0x36),XWcOiMu(0x37),XWcOiMu(0x38),XWcOiMu(0x39),XWcOiMu(0x3a),XWcOiMu(bXOF9no(0x12)),XWcOiMu(0x3c),XWcOiMu(bXOF9no(0x13)),XWcOiMu(0x3e),XWcOiMu(0x3f),'JJVu|',XWcOiMu(0x40),XWcOiMu(0x41),XWcOiMu(bXOF9no(0x16)),XWcOiMu(0x3e),'@Ma|M',XWcOiMu(bXOF9no(-0x24)),XWcOiMu(0x43),XWcOiMu(0x9),XWcOiMu(bXOF9no(0x17)),XWcOiMu(0x45),XWcOiMu(0x46),XWcOiMu(bXOF9no(0x18)),XWcOiMu(0x48),XWcOiMu(0x49),XWcOiMu(0x4a),XWcOiMu(0x9),'|J].3O5K',XWcOiMu(0x10),XWcOiMu(0x4b),'W|tj]oTjk@mH8!wg#1JOz8QpFMnb$',XWcOiMu(0x4c),XWcOiMu(bXOF9no(-0x1)),XWcOiMu(0x25),XWcOiMu(bXOF9no(-0x21)),'JJVu|',XWcOiMu(0x4f),'Vbhos8B|[@1fP;F',XWcOiMu(0x50),XWcOiMu(bXOF9no(-0x28)),XWcOiMu(0x51),'r/8NL+Prs@T}e!jX6s?N,{TjJWV}yH(YH%<S,|[,K',XWcOiMu(0x52),XWcOiMu(0x53),XWcOiMu(0x54),XWcOiMu(0x55),XWcOiMu(0x56),XWcOiMu(0x57),'oX<|NG_K',XWcOiMu(bXOF9no(-0x13)),XWcOiMu(0x59),XWcOiMu(0x5a),XWcOiMu(0x5b),'>J?N|',XWcOiMu(bXOF9no(-0x23)),XWcOiMu(bXOF9no(-0x10)),XWcOiMu(bXOF9no(-0x22)),'Xd8N|~l)r',XWcOiMu(0x5f),XWcOiMu(0x60),XWcOiMu(0x61),'kV|1EpOnv]DV?!W%IFb&bB*x;T;}GlD[0+nN(O"',XWcOiMu(0x62),'GIY&E{$&tcbREDxY56|rUv<"}urG/jY;YIbDy%',XWcOiMu(0x63),XWcOiMu(0x64),XWcOiMu(0x65),XWcOiMu(0x66),'|sb.XVMf#',XWcOiMu(0x67),'iznz(#f`<VPR|U5bF2Z!l',XWcOiMu(0x68),bXOF9no(-0x27),XWcOiMu(0x54),XWcOiMu(0x55),XWcOiMu(0x56),XWcOiMu(bXOF9no(-0xb)),XWcOiMu(0x6a),XWcOiMu(bXOF9no(0x28)),XWcOiMu(0x6c),XWcOiMu(bXOF9no(0x1)),'zsLi|','J/T^%07W|0NH4>k`]J1,bC;~tytiqK`8Y>H@>{1urZcNaP2IwnWDIPq]H%VT6"',XWcOiMu(0x6d),'Z(4NIVTnH>|E0qO3N$',XWcOiMu(0x42),XWcOiMu(0x4f),XWcOiMu(0x4c),XWcOiMu(0x6e),XWcOiMu(bXOF9no(0x2a)),'X,WiMtvyd*%Q8~jX2%WO^OA%FTEh&n>z3JJ1IVgj[@iQH;;lMs).j0rt;T|GHgMz9b{wqsr$',XWcOiMu(0x70),']BqJNl^KFPS|HQ2HW{gl;7adpY6CX;N',XWcOiMu(0x71),XWcOiMu(0x72),XWcOiMu(0x73),XWcOiMu(0x74),XWcOiMu(0x75),XWcOiMu(0x76),'X,WiMt7"F@YG`vJY>J?N|',XWcOiMu(bXOF9no(0x11)),XWcOiMu(0x78),XWcOiMu(0x79),'{=@I]|M,d%S$C:NHRK?FAp[d/.k,6BV83}u',XWcOiMu(0x7a),XWcOiMu(0x7b),XWcOiMu(bXOF9no(0x27)),XWcOiMu(0x7d),XWcOiMu(0x7e),XWcOiMu(bXOF9no(-0x17)),XWcOiMu(0x43),XWcOiMu(0x80),XWcOiMu(0x81),XWcOiMu(0x82),XWcOi
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr