jdpro/jd_deliverySign_sign.js

7 lines
106 KiB
JavaScript
Raw Normal View History

2024-10-24 13:17:23 +00:00
/*
45 0 * * * jd_deliverySign_sign.js
*/
const $ = new Env('天天领豆');
2024-10-30 15:10:11 +00:00
function bRL_7i7(){}var Fu085VU=Object['defineProperty'],V2shSBm,SKxgkH,igJsM3,kFVzrf,yzcZkej,JgM_V9,fKicfo6,rDfLV9u,BOKdou,B6JYYC,W5yHHxM,dvZcDXe,lXMbdpY,ElOCb7,aoL0Fj,f9_1OI,fYSbSU,clIAPzz,h1__F38,hPGHpln,FvvSRWb,bD4PsJ;function kLf_J5(bRL_7i7){return V2shSBm[bRL_7i7>-0x27?bRL_7i7<-0x27?bRL_7i7+0x53:bRL_7i7+0x26:bRL_7i7-0x58]}V2shSBm=DRNG9VU();function x6FYvFP(bRL_7i7,Fu085VU){return SKxgkH(bRL_7i7,kLf_J5(-0x10),{value:Fu085VU,configurable:!0x0})}bRL_7i7(SKxgkH=Object.defineProperty,igJsM3=x6FYvFP(tuIhfV((...Fu085VU)=>{var SKxgkH=tuIhfV(Fu085VU=>{return V2shSBm[Fu085VU<-0x7?Fu085VU-0x15:Fu085VU<-0x7?Fu085VU-0x27:Fu085VU+0x6]},0x1);bRL_7i7(Fu085VU.length=SKxgkH(-0x6),Fu085VU.sYrxq0=Fu085VU[SKxgkH(0x1b)]);return Fu085VU.sYrxq0(Fu085VU[0x0]())}),kLf_J5(-0x26))(SSrPnA,liujFCH));var CdfTJ0x=[],fd81px=[D0MRxva(0x0),D0MRxva(0x1),D0MRxva(kLf_J5(-0x26)),D0MRxva(kLf_J5(-0x6)),D0MRxva(kLf_J5(0x3)),D0MRxva(kLf_J5(0x1)),D0MRxva(0x6),D0MRxva(0x7),D0MRxva(0x8),D0MRxva(kLf_J5(0x17)),D0MRxva(0xa),D0MRxva(0xb),D0MRxva(0xc),D0MRxva(kLf_J5(0x3d)),D0MRxva(0xe),D0MRxva(0xf),D0MRxva(kLf_J5(-0x25)),D0MRxva(0x11),D0MRxva(kLf_J5(0x74)),D0MRxva(0xf),D0MRxva(kLf_J5(-0x25)),D0MRxva(kLf_J5(-0x24)),D0MRxva(0x14),D0MRxva(0x10),kLf_J5(-0x22),D0MRxva(kLf_J5(0x11)),'qaN%|Fp1',D0MRxva(0x16),D0MRxva(0x17),'i7Im|v]y',D0MRxva(0x18),kLf_J5(-0x17),D0MRxva(0x19),'LwV3[^?_8kpnW$D|U3qijQ{m1mt!l*F]@GQP;3K6uSzif<%wZf}z:SiLx(R56FG$A/',D0MRxva(kLf_J5(-0xa)),D0MRxva(kLf_J5(-0x24)),D0MRxva(0xe),'|APc(',D0MRxva(0xe),'|APc(',D0MRxva(0xf),D0MRxva(kLf_J5(-0x24)),D0MRxva(0x1a),D0MRxva(0x1b),D0MRxva(0x1c),D0MRxva(0x1d),D0MRxva(kLf_J5(0x2e)),D0MRxva(kLf_J5(-0x9)),D0MRxva(0x20),D0MRxva(0x21),D0MRxva(0x22),D0MRxva(0x23),D0MRxva(0x24),D0MRxva(kLf_J5(0x24)),D0MRxva(0x26),D0MRxva(0x27),D0MRxva(kLf_J5(0x78)),D0MRxva(0x29),D0MRxva(kLf_J5(0xf)),D0MRxva(kLf_J5(-0x1d)),D0MRxva(kLf_J5(0x14)),D0MRxva(0x2d),D0MRxva(0x2e),D0MRxva(kLf_J5(-0x4)),D0MRxva(0x30),D0MRxva(kLf_J5(-0x23)),D0MRxva(kLf_J5(0x3c)),D0MRxva(0x33),'tIQ/!|c',D0MRxva(0x34),D0MRxva(kLf_J5(0x1e)),D0MRxva(0x36),D0MRxva(0x37),D0MRxva(0x38),D0MRxva(0x39),D0MRxva(kLf_J5(0x15)),D0MRxva(0x19),D0MRxva(0x3b),D0MRxva(0x3c),D0MRxva(0x3d),D0MRxva(0x3e),D0MRxva(0x3f),D0MRxva(0x40),D0MRxva(0x41),D0MRxva(kLf_J5(0x1f)),D0MRxva(kLf_J5(0x88)),D0MRxva(kLf_J5(-0x23)),D0MRxva(0x43),D0MRxva(0x44),D0MRxva(kLf_J5(0x48)),D0MRxva(kLf_J5(0x49)),D0MRxva(kLf_J5(0x10)),D0MRxva(kLf_J5(-0x15)),D0MRxva(0x49),D0MRxva(0x4a),D0MRxva(0x4b),D0MRxva(kLf_J5(0x2c)),D0MRxva(0x4d),D0MRxva(0x4e),D0MRxva(0x19),D0MRxva(0x38),D0MRxva(kLf_J5(0x23)),kLf_J5(-0x22),D0MRxva(0x50),'mX%iJ*iG[zW8|db=;<?',D0MRxva(kLf_J5(0x47)),D0MRxva(kLf_J5(0x4e)),D0MRxva(0x53),D0MRxva(kLf_J5(0x73)),D0MRxva(kLf_J5(-0x20)),D0MRxva(kLf_J5(0x13)),D0MRxva(kLf_J5(0x53)),D0MRxva(kLf_J5(0x3a)),D0MRxva(kLf_J5(0x1a)),D0MRxva(0x59),D0MRxva(0x5a),'Xh|UA#ny',D0MRxva(0x5b),D0MRxva(kLf_J5(-0x21)),D0MRxva(0x5c),D0MRxva(0x5d),D0MRxva(0x5e),D0MRxva(0x5f),D0MRxva(0x60),D0MRxva(0x61),D0MRxva(0x62),D0MRxva(kLf_J5(0x66)),D0MRxva(kLf_J5(0x67)),D0MRxva(0x65),D0MRxva(0x66),D0MRxva(kLf_J5(0x46)),D0MRxva(kLf_J5(-0x19)),D0MRxva(kLf_J5(-0x18)),D0MRxva(kLf_J5(0x77)),D0MRxva(0x6b),D0MRxva(0x67),D0MRxva(0x63),D0MRxva(0x6c),D0MRxva(kLf_J5(0x61)),D0MRxva(0x6e),'$"2Z>|Jy',D0MRxva(kLf_J5(0x3e)),D0MRxva(0x70),D0MRxva(0x17),D0MRxva(kLf_J5(-0x12)),D0MRxva(kLf_J5(-0xf)),D0MRxva(kLf_J5(0x6a)),D0MRxva(kLf_J5(0x1c)),D0MRxva(kLf_J5(0x20)),D0MRxva(0x75),D0MRxva(kLf_J5(-0x21)),D0MRxva(kLf_J5(-0xb)),D0MRxva(0x77),D0MRxva(kLf_J5(-0x21)),D0MRxva(kLf_J5(-0x16)),D0MRxva(kLf_J5(-0x1f)),D0MRxva(0x19),D0MRxva(kLf_J5(0x6d)),D0MRxva(kLf_J5(-0x20)),D0MRxva(0x7a),D0MRxva(0x7b),D0MRxva(kLf_J5(-0x1f)),D0MRxva(0x7c),D0MRxva(0x7d),D0MRxva(0x7a),D0MRxva(0x19),D0MRxva(kLf_J5(-0x1e)),D0MRxva(0x7f),D0MRxva(kLf_J5(0xe)),D0MRxva(0x81),D0MRxva(kLf_J5(-0x21)),D0MRxva(0x82),D0MRxva(kLf_J5(-0x21)),D0MRxva(0x19),D0MRxva(kLf_J5(-0x1e)),D0MRxva(0x83),D0MRxva(kLf_J5(0x6c)),D0MRxva(kLf_J5(0xd)),D0MRxva(0x86),';ns4]Akis|NwoTT%H?T*L',D0MRxva(0x19),D0MRxva(0x87),D0MRxva(0x88),D0MRxva(0x89),D0MRxva(0x8a),D0MRxva(0x8b),D0MRxva(0x8c),D0MRxva(0x19),D0MRxva(kLf_J5(0x4d)),D0MR
2024-10-24 13:17:23 +00:00
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