jdpro/jd_dwapp.js

10 lines
137 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-19 07:57:34 +00:00
function VI5YrO(){}var ObVant=Object['defineProperty'],lQnbiD,SOluGx5,WQvk4bL,woZmtJo,L9N6LW,BsWijZ,jtc0Ab9,GkJ0IM6,dOZeKlT,CN48eR,B2FH1lx,l45Cqs,wJyRBmW,G6xIYG,epRAtEN,y1Hi6b,BDbv4S,pYFS4M,yonk3vF;function IwHMrus(VI5YrO){return lQnbiD[VI5YrO>0x35?VI5YrO>0x35?VI5YrO>0x28f?VI5YrO-0x5c:VI5YrO>0x35?VI5YrO-0x36:VI5YrO+0x62:VI5YrO-0x5f:VI5YrO+0x19]}lQnbiD=WrV1YdJ();function ZQKsdZ(VI5YrO,ObVant){var WQvk4bL=c680zf(VI5YrO=>{return lQnbiD[VI5YrO<0x48?VI5YrO+0x5a:VI5YrO<0x48?VI5YrO+0x57:VI5YrO<0x2a2?VI5YrO<0x48?VI5YrO-0x19:VI5YrO-0x49:VI5YrO+0x15]},0x1);SOluGx5(VI5YrO,WQvk4bL(0x49),{value:ObVant,configurable:WQvk4bL(0xc5)});return VI5YrO}VI5YrO(SOluGx5=Object.defineProperty,WQvk4bL=ZQKsdZ(c680zf((...ObVant)=>{var SOluGx5=c680zf(ObVant=>{return lQnbiD[ObVant<0x29c?ObVant<0x42?ObVant+0x27:ObVant-0x43:ObVant-0x62]},0x1);VI5YrO(ObVant[IwHMrus(0x36)]=IwHMrus(0x38),ObVant[SOluGx5(0x44)]=SOluGx5(0x4e));if(ObVant[SOluGx5(0x44)]>IwHMrus(0x54)){return ObVant[ObVant[SOluGx5(0x44)]-IwHMrus(0x4c)]}else{var WQvk4bL=c680zf(ObVant=>{return lQnbiD[ObVant<0x204?ObVant<0x204?ObVant>0x204?ObVant-0x4d:ObVant<-0x56?ObVant-0x31:ObVant+0x55:ObVant+0x4d:ObVant+0x4d]},0x1);return ObVant[ObVant[SOluGx5(0x44)]-IwHMrus(0x40)](ObVant[WQvk4bL(-0x52)]())}}),IwHMrus(0x38))(HYDxcT3,NJKelXV));var omlQ3d7=[],rxcJxec=[R68gnQ(IwHMrus(0x39)),'k48mXGIT|',R68gnQ(IwHMrus(0x80)),R68gnQ(IwHMrus(0x38)),'zbu|]jIT7',R68gnQ(IwHMrus(0x81)),R68gnQ(IwHMrus(0x82)),R68gnQ(IwHMrus(0x7f)),R68gnQ(IwHMrus(0x88)),R68gnQ(IwHMrus(0x8c)),R68gnQ(IwHMrus(0xa6)),'88oOpP.#zJ%BHfm|>3',R68gnQ(IwHMrus(0xb0)),':|az',R68gnQ(IwHMrus(0xb1)),R68gnQ(IwHMrus(0x97)),R68gnQ(IwHMrus(0x8a)),R68gnQ(IwHMrus(0x93)),R68gnQ(IwHMrus(0x91)),R68gnQ(IwHMrus(0x89)),R68gnQ(IwHMrus(0xb6)),R68gnQ(IwHMrus(0xb7)),R68gnQ(IwHMrus(0x8d)),R68gnQ(IwHMrus(0xb8)),R68gnQ(IwHMrus(0x90)),R68gnQ(IwHMrus(0x45)),R68gnQ(IwHMrus(0x3e)),IwHMrus(0x3a),R68gnQ(IwHMrus(0x98)),R68gnQ(IwHMrus(0x94)),R68gnQ(IwHMrus(0x3b)),R68gnQ(IwHMrus(0x3f)),IwHMrus(0x3a),IwHMrus(0x7b),R68gnQ(IwHMrus(0x7c)),R68gnQ(IwHMrus(0x7d)),'Q^bOUPU~;rjJT#W|2BUu$7d#',R68gnQ(IwHMrus(0x3c)),R68gnQ(IwHMrus(0x3d)),R68gnQ(IwHMrus(0x3b)),R68gnQ(IwHMrus(0x42)),IwHMrus(0x43),R68gnQ(IwHMrus(0x3c)),R68gnQ(IwHMrus(0x3d)),R68gnQ(IwHMrus(0x3e)),R68gnQ(IwHMrus(0x3f)),R68gnQ(IwHMrus(0xc1)),R68gnQ(IwHMrus(0xa8)),'|fwL"PcVVn',R68gnQ(IwHMrus(0xd0)),R68gnQ(IwHMrus(0x46)),R68gnQ(IwHMrus(0x3c)),R68gnQ(IwHMrus(0x3d)),R68gnQ(IwHMrus(0xd3)),R68gnQ(IwHMrus(0xcd)),R68gnQ(IwHMrus(0x56)),R68gnQ(IwHMrus(0xd2)),R68gnQ(IwHMrus(0xc2)),R68gnQ(IwHMrus(0x40)),R68gnQ(IwHMrus(0x41)),R68gnQ(IwHMrus(0x3e)),R68gnQ(IwHMrus(0x9e)),R68gnQ(IwHMrus(0x42)),IwHMrus(0x43),R68gnQ(IwHMrus(0x44)),R68gnQ(IwHMrus(0xa0)),R68gnQ(IwHMrus(0x3e)),R68gnQ(IwHMrus(0x3f)),R68gnQ(IwHMrus(0xe7)),R68gnQ(IwHMrus(0xf5)),R68gnQ(IwHMrus(0x44)),R68gnQ(IwHMrus(0x3d)),R68gnQ(IwHMrus(0x3e)),R68gnQ(IwHMrus(0x3f)),R68gnQ(IwHMrus(0x3c)),R68gnQ(IwHMrus(0x3d)),R68gnQ(IwHMrus(0x45)),R68gnQ(IwHMrus(0xf6)),R68gnQ(IwHMrus(0xf7)),R68gnQ(IwHMrus(0x67)),R68gnQ(IwHMrus(0xfc)),R68gnQ(IwHMrus(0xfe)),R68gnQ(IwHMrus(0xe6)),R68gnQ(IwHMrus(0x42)),R68gnQ(IwHMrus(0x79)),R68gnQ(IwHMrus(0x10d)),R68gnQ(IwHMrus(0xd5)),'c`7}UTD&|=2',R68gnQ(IwHMrus(0x114)),R68gnQ(IwHMrus(0x61)),'|fdqLso#',R68gnQ(IwHMrus(0x99)),R68gnQ(IwHMrus(0xd6)),R68gnQ(IwHMrus(0x11c)),R68gnQ(IwHMrus(0x125)),R68gnQ(IwHMrus(0x47)),R68gnQ(IwHMrus(0x48)),R68gnQ(IwHMrus(0x124)),R68gnQ(IwHMrus(0xf2)),R68gnQ(IwHMrus(0x126)),R68gnQ(IwHMrus(0xff)),R68gnQ(IwHMrus(0x104)),'a,ZznF$(f0?DksEv?|>q,LDmWQTdQ87i4?sx"P6]1UE`fNm6+fM+X',R68gnQ(IwHMrus(0x127)),R68gnQ(IwHMrus(0x42)),R68gnQ(IwHMrus(0xab)),R68gnQ(IwHMrus(0x46)),R68gnQ(IwHMrus(0x50)),R68gnQ(IwHMrus(0xae)),'K|>O$/9',R68gnQ(IwHMrus(0x49)),R68gnQ(IwHMrus(0x7a)),R68gnQ(IwHMrus(0xa3)),R68gnQ(IwHMrus(0x129)),R68gnQ(IwHMrus(0x12a)),R68gnQ(IwHMrus(0xef)),R68gnQ(IwHMrus(0x12c)),R68gnQ(IwHMrus(0x47)),R68gnQ(IwHMrus(0x48)),R68gnQ(IwHMrus(0x9b)),R68gnQ(IwHMrus(0x128)),R68gnQ(IwHMrus(0x12d)),R68gnQ(IwHMrus(0x12e)),R68gnQ(IwHMrus(0x12f)),'"M(Ov"||h',R68gnQ(IwHMrus(0xd9)),R68gnQ(IwHMrus(0x109)),R68gnQ(IwHMrus(0xa5)),IwHMrus(0x6d),R68gnQ(IwHMrus(0x132)),'iY~^6DV|',R68gnQ
2024-06-28 07:47:44 +00:00
function Env(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