mirror of https://github.com/6dylan6/jdpro.git
7 lines
81 KiB
JavaScript
7 lines
81 KiB
JavaScript
|
/*
|
||
|
45 0 * * * jd_deliverySign_sign.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('天天领豆');
|
||
|
function NSEDRHb(){}var QYIaAT=Object['defineProperty'],_Qywqr,mdfNtXS,CsCcwb,VmPui6f,nVY1ee,HagpPo,NIEpch,BxY8keE,N1Rrveq,l6LhZh,Ma5MrV,JSvW6j8,PPx2V5,EZiJQG,QmR9Z1,HQIfSV;function a0pLer(NSEDRHb){return _Qywqr[NSEDRHb>-0x2d?NSEDRHb<-0x2d?NSEDRHb+0x46:NSEDRHb>0x7f?NSEDRHb+0x24:NSEDRHb+0x2c:NSEDRHb-0x27]}_Qywqr=BrTBG5();function ZbarSI(NSEDRHb,QYIaAT){return mdfNtXS(NSEDRHb,a0pLer(-0x1a),{value:QYIaAT,configurable:a0pLer(0xe)})}NSEDRHb(mdfNtXS=Object.defineProperty,CsCcwb=RX5oJJk((NSEDRHb,QYIaAT)=>{return QYIaAT(NSEDRHb())},0x2)(r6LCyD,fIZstq));var VRawpLK=[],oDQegD=[bYnthJ(0x0),bYnthJ(0x1),bYnthJ(a0pLer(-0x1e)),bYnthJ(0x3),bYnthJ(a0pLer(-0xf)),bYnthJ(a0pLer(-0x1)),bYnthJ(0x6),bYnthJ(a0pLer(-0x14)),bYnthJ(0x8),bYnthJ(0x9),bYnthJ(a0pLer(0x1c)),'6(|Hj',bYnthJ(0xb),bYnthJ(0xc),bYnthJ(0x6),bYnthJ(0xd),bYnthJ(a0pLer(-0x5)),'6(|Hj',bYnthJ(0xa),'6(|Hj',bYnthJ(0x6),bYnthJ(0x8),bYnthJ(0xf),bYnthJ(0x10),bYnthJ(0x11),bYnthJ(0x12),bYnthJ(0x13),bYnthJ(0x14),bYnthJ(a0pLer(-0x12)),bYnthJ(a0pLer(-0x3)),'vT|HU',bYnthJ(a0pLer(0x2)),bYnthJ(0x18),bYnthJ(0x19),bYnthJ(a0pLer(-0x2c)),bYnthJ(a0pLer(0x42)),bYnthJ(0x1c),bYnthJ(0x1d),'9Jv^"iB/D|:',bYnthJ(0x1e),bYnthJ(0x1f),bYnthJ(a0pLer(0x3)),bYnthJ(a0pLer(-0x2b)),bYnthJ(a0pLer(-0x2a)),'bNXp@2aJ;vke+@_fpt&J;S=+P^[LpaXX||k@%ythY9|?oHGbU(v^"i$Ip9;yr^/ID0>0&~(,a/X=k~>f#"BXFxuea]aQIQ"ERGm=E_+5B',bYnthJ(0x23),bYnthJ(a0pLer(0x4)),bYnthJ(a0pLer(-0x2)),bYnthJ(0x26),bYnthJ(0x27),bYnthJ(0x28),bYnthJ(a0pLer(0x7)),'1)0z#x{|W/',bYnthJ(a0pLer(0x8)),bYnthJ(0x2b),bYnthJ(0x2c),bYnthJ(a0pLer(0xa)),bYnthJ(a0pLer(0xb)),'x(LC|s4FW','EUks|CP{{.',bYnthJ(0x2f),'qTLC|s4FW',bYnthJ(0x30),bYnthJ(0x31),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x32),bYnthJ(a0pLer(0xc)),bYnthJ(0x34),bYnthJ(0x35),bYnthJ(a0pLer(-0x2b)),bYnthJ(a0pLer(-0x2a)),'EUks|C"N','1)0z#x{|W/',bYnthJ(0x36),bYnthJ(0x37),'|<%z[><z@*G|^o',bYnthJ(0x38),bYnthJ(0x39),bYnthJ(0x3a),bYnthJ(a0pLer(-0x27)),bYnthJ(0x3c),bYnthJ(a0pLer(0xf)),'<<u[P+(|>t2IS]e>zUB7q',bYnthJ(a0pLer(0x10)),bYnthJ(0x3f),bYnthJ(a0pLer(-0x2c)),'qTLC|s4FW',bYnthJ(0x30),'6(|Hj','hp1H.fw9qzon|]YdIvsznVz{OD',bYnthJ(a0pLer(0x12)),bYnthJ(a0pLer(-0xb)),'=3+U|',bYnthJ(0x42),a0pLer(-0x29),bYnthJ(0x1a),bYnthJ(0x43),bYnthJ(a0pLer(0x19)),bYnthJ(0x45),bYnthJ(0x46),bYnthJ(a0pLer(-0x26)),bYnthJ(0x48),bYnthJ(a0pLer(0x16)),bYnthJ(a0pLer(0x14)),bYnthJ(0x4b),bYnthJ(0x4c),bYnthJ(a0pLer(-0x28)),bYnthJ(0x4d),bYnthJ(0x4e),bYnthJ(0x4f),bYnthJ(0x34),bYnthJ(a0pLer(0x17)),bYnthJ(0x4d),bYnthJ(0x49),bYnthJ(0x51),bYnthJ(0x52),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x53),bYnthJ(a0pLer(0x1a)),bYnthJ(0x55),bYnthJ(a0pLer(0x1f)),bYnthJ(0x57),bYnthJ(0x1a),bYnthJ(a0pLer(-0x9)),bYnthJ(a0pLer(0x1e)),a0pLer(-0x29),bYnthJ(0x5a),bYnthJ(a0pLer(-0xa)),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x5c),'m)0j|fZV4&3yM',bYnthJ(a0pLer(-0x2c)),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x5c),'m)|Hk?(mqXz','`pN[|',bYnthJ(a0pLer(0x20)),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x5e),bYnthJ(a0pLer(-0x2c)),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x5c),bYnthJ(0x5f),bYnthJ(0x60),bYnthJ(0x61),'m)0j|f[N',bYnthJ(0x62),bYnthJ(0x63),bYnthJ(0x64),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x65),bYnthJ(0x66),bYnthJ(0x67),bYnthJ(0x68),bYnthJ(0x69),'x(LC|s4FW',bYnthJ(0x1a),bYnthJ(a0pLer(0x22)),bYnthJ(a0pLer(0x23)),'m)=B|iym(XKt!+OhJ(QBpLKO<1nt9Ak:AR,upjqpN',bYnthJ(0x6c),bYnthJ(0x6d),bYnthJ(0x6e),bYnthJ(0x6f),bYnthJ(0x70),bYnthJ(a0pLer(0x26)),bYnthJ(0x72),'8~)xF=(|m',bYnthJ(a0pLer(0x2a)),bYnthJ(a0pLer(0x2b)),bYnthJ(a0pLer(0x2d)),bYnthJ(0x76),'ta0iVE|mW',bYnthJ(0x77),bYnthJ(a0pLer(-0x22)),bYnthJ(a0pLer(-0x23)),bYnthJ(0x7a),bYnthJ(0x7b),'K:si8b5*V@{i|fDPvhf{?ev*=BU',bYnthJ(0x7c),bYnthJ(a0pLer(0x34)),bYnthJ(0x7e),bYnthJ(a0pLer(-0x17)),bYnthJ(0x80),'uR+DM0&|,&!^|]Sh`h]Bv_3#$*Q!h]TY::s_:nQG2XU]j@vY~abo46,:(D`V+Y.:L)xv<i=Gxz`sdNv.EsOBrI%N_Q932e*:*[jip3!#(zC*5qDh#:ms5hMMTSfpEu@6P<`S/4fj&emk[+{dHM(itL}.nwZ(/NNdB[+DL7M/Qe~qdMA~<uZBGsCFi.M@IAK@CbKAz:IW[BR!quIjC:fuos*Q{.NH/dVhAUOPP?]%WQTtdIOGy!F]uf%N_Q93!qMGdk.{k>mM',bYnthJ(a0pLer(0x35)),bYnthJ(0x82),bYnthJ(0x83),bYnthJ(0x3f),bYnthJ(0x84),bYnthJ(0x52),bYnthJ(a0pLer(-0x2c)),bYnthJ(0x85),bYnthJ(0x22),bYnthJ(a0pLer(0x36)),bYnthJ(a0pLer(0x37)),bYnthJ(0x88),bYnthJ(0x89),bYnthJ(0x8a),bYnthJ(0x8b),'><QBv_|zp.',bYnt
|
||
|
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
|