jdpro/jd_gfdk.js

7 lines
110 KiB
JavaScript
Raw Normal View History

2024-09-23 05:59:35 +00:00
/*
22 0,15 * * * jd_gfdk.js
*/
const $ = new Env('瓜分1亿打卡');
function _0x74750B(){}var _0xF3E353=Object['defineProperty'],_0x78D93B0,_0xE82D5E3,_0x5658EE,_0xEFE16C5,_0xA777C3B,_0xFA3527A,_0x6DB50A8,_0x437293,_0x08FF31A,_0x50EAA9B,_0xB405E29,_0xB601A61,_0x533B4F8,_0x779E5A,_0x16CF279,_0x89D53A9,_0x501E4C7,_0x6427636,_0x4302F5;function _0xF3AAD1(_0x74750B){return _0x78D93B0[_0x74750B<0x4f?_0x74750B+0x29:_0x74750B<0x4f?_0x74750B-0x3c:_0x74750B-0x50]}_0x78D93B0=_0x4B7A86();function _0x45B6A4(_0x74750B,_0xF3E353){return _0xE82D5E3.call(null,_0x74750B,'length',{value:_0xF3E353,configurable:_0xF3AAD1(0x114)})}_0x74750B(_0xE82D5E3=Object.defineProperty,_0x5658EE=_0x6D108A((_0x74750B,_0xF3E353)=>{return _0xF3E353(_0x74750B())},0x2)(_0x379579,_0xD3EA1C));var _0xCF9FF14=[],_0xFB2629=[_0xE9B48BD(_0xF3AAD1(0x67)),_0xE9B48BD(0x1),_0xE9B48BD(_0xF3AAD1(0x69)),_0xE9B48BD(0x3),_0xE9B48BD(0x4),_0xE9B48BD(_0xF3AAD1(0x62)),_0xE9B48BD(_0xF3AAD1(0x73)),_0xE9B48BD(_0xF3AAD1(0x74)),_0xE9B48BD(_0xF3AAD1(0x81)),'BBtb#|T;',_0xE9B48BD(0x9),_0xE9B48BD(0xa),_0xE9B48BD(_0xF3AAD1(0x78)),_0xE9B48BD(_0xF3AAD1(0x72)),_0xE9B48BD(_0xF3AAD1(0x57)),'@qh|f1T;',_0xE9B48BD(0xe),_0xE9B48BD(0xf),_0xE9B48BD(_0xF3AAD1(0xa4)),'2t5|]]D',_0xE9B48BD(_0xF3AAD1(0x50)),_0xE9B48BD(0x12),_0xE9B48BD(_0xF3AAD1(0xa5)),_0xE9B48BD(_0xF3AAD1(0x64)),_0xE9B48BD(0xf),_0xE9B48BD(_0xF3AAD1(0x85)),_0xE9B48BD(_0xF3AAD1(0x50)),'!BO|LLJ',_0xE9B48BD(_0xF3AAD1(0x50)),_0xE9B48BD(0xd),_0xE9B48BD(_0xF3AAD1(0xa8)),_0xE9B48BD(0x17),_0xE9B48BD(0x18),_0xE9B48BD(0x19),_0xE9B48BD(_0xF3AAD1(0xaa)),_0xE9B48BD(0x1b),_0xE9B48BD(0x1c),_0xE9B48BD(0x1d),_0xE9B48BD(0x1e),_0xE9B48BD(0x1f),_0xE9B48BD(0x20),_0xE9B48BD(_0xF3AAD1(0xad)),_0xE9B48BD(0x22),_0xE9B48BD(0x23),_0xE9B48BD(_0xF3AAD1(0xae)),_0xE9B48BD(0x25),'G$5|?PT;',_0xE9B48BD(0x26),'G$5|?Pxmg%z',_0xE9B48BD(0x27),_0xF3AAD1(0x56),_0xE9B48BD(_0xF3AAD1(0x6e)),_0xE9B48BD(_0xF3AAD1(0x51)),_0xE9B48BD(_0xF3AAD1(0xac)),'4;E17es$o5pOJ7=]1dI$o3^J*|>N1sEE%%p7YUd(QG%w[2W4uR5|?P.V1GoU#|mVgnjnI}R+smE^p}j]c?xEab`Os_syVy?9qW"^9=JMx','(1K2<]HGugrY_=A7rq)x1>YcNy"9yBPCfr=vV|z^8&A,u%czluUli',_0xE9B48BD(_0xF3AAD1(0x52)),_0xE9B48BD(_0xF3AAD1(0x53)),'W~|(OW.b`ju10/*nm/<x+]bmuXjd6_QC5R5buv+^:7Tsqi<k',_0xF3AAD1(0x54),_0xE9B48BD(0x2c),'![h|(UD',_0xE9B48BD(0x2d),_0xE9B48BD(0x2e),_0xE9B48BD(0x2f),_0xE9B48BD(0x30),_0xE9B48BD(_0xF3AAD1(0xb4)),'v{(|j!@',_0xE9B48BD(0x32),_0xE9B48BD(0x33),_0xE9B48BD(0x34),_0xE9B48BD(0x35),_0xE9B48BD(_0xF3AAD1(0x93)),_0xE9B48BD(0x37),_0xE9B48BD(_0xF3AAD1(0x51)),_0xE9B48BD(0x38),_0xE9B48BD(_0xF3AAD1(0x52)),_0xE9B48BD(0x39),_0xE9B48BD(_0xF3AAD1(0x6c)),'+`h|(UD',_0xE9B48BD(0x3b),_0xE9B48BD(0x3c),_0xE9B48BD(_0xF3AAD1(0xbc)),_0xE9B48BD(0x3e),_0xE9B48BD(_0xF3AAD1(0x70)),_0xE9B48BD(0x40),_0xE9B48BD(_0xF3AAD1(0x53)),_0xE9B48BD(0x31),'Xl}b1|D',_0xE9B48BD(_0xF3AAD1(0x50)),'(1K2<]HGir[h%_QCV5vrhFr/brk&]8PC8q3v|]yc(m',_0xE9B48BD(_0xF3AAD1(0xbe)),_0xE9B48BD(0x42),_0xE9B48BD(0x43),_0xE9B48BD(0x44),_0xE9B48BD(0x45),_0xE9B48BD(_0xF3AAD1(0x86)),_0xE9B48BD(_0xF3AAD1(0xc0)),_0xE9B48BD(0x48),'AB.|M^7;',_0xE9B48BD(0x49),_0xE9B48BD(_0xF3AAD1(0xc2)),_0xE9B48BD(_0xF3AAD1(0xc3)),_0xE9B48BD(0x4c),'ogt[nJ^z}#[(H8g0jl?AV|Z0Mme2eCxmV(;',_0xE9B48BD(0x4d),_0xE9B48BD(_0xF3AAD1(0xfc)),_0xE9B48BD(0x4f),_0xE9B48BD(0x3e),_0xE9B48BD(0x50),'hNH$_CW:&|"9a',_0xE9B48BD(0x51),_0xE9B48BD(0xf),_0xE9B48BD(0x52),_0xE9B48BD(0x53),_0xE9B48BD(0x54),_0xE9B48BD(0x55),_0xE9B48BD(_0xF3AAD1(0x79)),_0xE9B48BD(_0xF3AAD1(0x9d)),_0xE9B48BD(0x58),_0xE9B48BD(0x59),_0xE9B48BD(0x5a),_0xE9B48BD(0x5b),_0xE9B48BD(0x5c),'QRT|eP&)H&O',_0xE9B48BD(0x5d),_0xE9B48BD(_0xF3AAD1(0xcd)),_0xE9B48BD(_0xF3AAD1(0xf3)),_0xE9B48BD(0x60),_0xE9B48BD(_0xF3AAD1(0xce)),_0xE9B48BD(_0xF3AAD1(0x76)),_0xE9B48BD(0x63),_0xE9B48BD(0x64),_0xE9B48BD(0x65),_0xE9B48BD(0x66),_0xE9B48BD(0x67),_0xE9B48BD(0x68),_0xE9B48BD(0x69),'g[8|j#8;v<',_0xE9B48BD(0x6a),'1hNX9h|!',_0xE9B48BD(0x6b),_0xE9B48BD(0x6c),_0xE9B48BD(0x6d),_0xE9B48BD(_0xF3AAD1(0x8b)),_0xE9B48BD(0x6f),_0xE9B48BD(0x70),_0xE9B48BD(_0xF3AAD1(0x9e)),_0xE9B48BD(0x72),'08T||]ycCy`s!',_0xE9B48BD(0x73),_0xE9B48BD(0x74),_0xE9B48BD(_0xF3AAD1(0xe0)),_0xE9B48BD(0x76),_0xE9B48BD(0x77),_0xE9B48BD(0x78),_0xE9B48BD(0x79),_0xE9B48BD(0x7a),_0xE9B48BD(_0xF3AAD1(0x83)),_0
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