jdpro/jd_dwapp.js

10 lines
73 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
积分换话费
入口首页-生活·缴费-积分换话费
update2024/5/6
10 1,14 * * * jd_dwapp.js
*/
const $ = new Env('积分换话费');
2024-11-08 02:12:05 +00:00
function dSItYd(){}var h9AFyZ=Object['defineProperty'],Va1iPFr,M9J0XkE,Fs3BKdp,QjQVXC,Ztk4eQF,U7dwmt,h_6T0se,EtEvnK,KbGFpqF,crX5wue,yq92s1,ff4BnT2,pVz3o2Q,yiqQRRx,YBuVS4,Q9J2NAe,OhJpex,KlffjT,lFs6EG,Q2XmmT9;function _Z9gr_(dSItYd){return Va1iPFr[dSItYd<0xe0?dSItYd>0x20?dSItYd>0x20?dSItYd-0x21:dSItYd+0x1d:dSItYd+0x17:dSItYd-0x3]}Va1iPFr=PmVJlq();function OnCKNW0(dSItYd,h9AFyZ){return M9J0XkE.call(_Z9gr_(0x56),dSItYd,_Z9gr_(0x30),{value:h9AFyZ,configurable:!0x0})}dSItYd(M9J0XkE=Object.defineProperty,Fs3BKdp=OnCKNW0(MFCszh((...h9AFyZ)=>{var M9J0XkE=MFCszh(h9AFyZ=>{return Va1iPFr[h9AFyZ>0x4e?h9AFyZ>0x10e?h9AFyZ-0x52:h9AFyZ<0x10e?h9AFyZ-0x4f:h9AFyZ-0x56:h9AFyZ-0x41]},0x1);dSItYd(h9AFyZ.length=_Z9gr_(0x5c),h9AFyZ.BPfhGz=h9AFyZ[M9J0XkE(0x5c)]);return h9AFyZ[0x1](h9AFyZ.BPfhGz())}),0x2)(SWyvGB,FgfJPS));var gOix6Ax=[],IZBYlF=[ZkLmyc7(0x0),ZkLmyc7(_Z9gr_(0x31)),ZkLmyc7(0x2),ZkLmyc7(_Z9gr_(0x3e)),ZkLmyc7(0x4),ZkLmyc7(_Z9gr_(0x3b)),ZkLmyc7(0x6),ZkLmyc7(_Z9gr_(0x21)),ZkLmyc7(_Z9gr_(0x47)),ZkLmyc7(0x9),Z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(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