jdpro/jd_dwapp.js

10 lines
210 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-23 03:00:14 +00:00
function P1KZ7z(){}var hx7RMd=Object['defineProperty'],xh_epAw,U_l5Np,pJNDsCA,hNYQoyI,QjNe7_0,J3zJGSH,xEVrEa6,vIwv3gW,cE0OFmp,B0WCdP,jNf2VD,wMJ_gAl,or_nJH,uUel_z,jJL_v1a,FlvbEYg,VjGydD0,pQrQ7_T,ovu5fY,mDfAuP;function luv10p(P1KZ7z){return xh_epAw[P1KZ7z<0x27?P1KZ7z+0x5:P1KZ7z>0x27?P1KZ7z>0x27?P1KZ7z-0x28:P1KZ7z-0x54:P1KZ7z+0x17]}xh_epAw=nbPvXVE();function qg9ggh5(P1KZ7z,hx7RMd){return U_l5Np.call(luv10p(0xce),P1KZ7z,luv10p(0x89),{value:hx7RMd,configurable:luv10p(0xdf)})}P1KZ7z(U_l5Np=Object.defineProperty,pJNDsCA=PTy7bi3((P1KZ7z,hx7RMd)=>{return hx7RMd(P1KZ7z())},0x2)(xXnDrZ,uZe4gv));var IIH1RN=[],dJJRmYZ=[bEyxklI(luv10p(0x92)),bEyxklI(luv10p(0x90)),bEyxklI(luv10p(0x93)),bEyxklI(luv10p(0x8c)),bEyxklI(luv10p(0x8d)),'L|0y/8j3',bEyxklI(luv10p(0x8a)),bEyxklI(luv10p(0xa4)),bEyxklI(luv10p(0xa6)),bEyxklI(luv10p(0xac)),bEyxklI(luv10p(0xaf)),bEyxklI(luv10p(0x97)),bEyxklI(luv10p(0xbe)),bEyxklI(luv10p(0xa3)),bEyxklI(luv10p(0xc1)),bEyxklI(luv10p(0xb0)),'Ij|5S%)y',bEyxklI(luv10p(0xa2)),bEyxklI(luv10p(0xb1)),bEyxklI(luv10p(0xd3)),bEyxklI(luv10p(0xa7)),bEyxklI(luv10p(0x28)),luv10p(0x38),luv10p(0x40),'S!|!e]"cx"<Nn[R2+B0Xx@Jo<ty=KnD#,D`tf',bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x28)),luv10p(0x29),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0xca)),bEyxklI(luv10p(0xdd)),bEyxklI(luv10p(0xde)),bEyxklI(luv10p(0x2b)),bEyxklI(luv10p(0x9a)),bEyxklI(luv10p(0xe8)),bEyxklI(luv10p(0x28)),luv10p(0x29),bEyxklI(luv10p(0x2c)),bEyxklI(luv10p(0x2d)),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0xe7)),bEyxklI(luv10p(0xe6)),bEyxklI(luv10p(0x9d)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x37)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0xe5)),bEyxklI(luv10p(0xcb)),bEyxklI(luv10p(0xf2)),'E&|U.k33N=',bEyxklI(luv10p(0x3b)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x32)),bEyxklI(luv10p(0x33)),bEyxklI(luv10p(0x34)),bEyxklI(luv10p(0x35)),bEyxklI(luv10p(0x36)),bEyxklI(luv10p(0x2e)),bEyxklI(luv10p(0x28)),luv10p(0x29),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0xfb)),bEyxklI(luv10p(0x2f)),bEyxklI(luv10p(0x2b)),bEyxklI(luv10p(0x30)),bEyxklI(luv10p(0x31)),bEyxklI(luv10p(0x2c)),bEyxklI(luv10p(0x2d)),bEyxklI(luv10p(0xff)),bEyxklI(luv10p(0x39)),bEyxklI(luv10p(0x3a)),bEyxklI(luv10p(0x2e)),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0x2f)),bEyxklI(luv10p(0x30)),bEyxklI(luv10p(0x31)),bEyxklI(luv10p(0x28)),luv10p(0x29),'kBC|77*',bEyxklI(luv10p(0x31)),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0x2f)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x49)),bEyxklI(luv10p(0x4a)),bEyxklI(luv10p(0x4b)),bEyxklI(luv10p(0x4c)),bEyxklI(luv10p(0x30)),bEyxklI(luv10p(0x31)),bEyxklI(luv10p(0x2a)),bEyxklI(luv10p(0x2f)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x32)),bEyxklI(luv10p(0x33)),bEyxklI(luv10p(0x34)),bEyxklI(luv10p(0x35)),bEyxklI(luv10p(0x36)),bEyxklI(luv10p(0xb5)),bEyxklI(luv10p(0xb4)),bEyxklI(luv10p(0xf8)),bEyxklI(luv10p(0x2e)),bEyxklI(luv10p(0xb6)),'>Z#PO@|fk',bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x8b)),bEyxklI(luv10p(0xd7)),bEyxklI(luv10p(0x105)),bEyxklI(luv10p(0x102)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x91)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0xa0)),'?U_:|beyIjcBhjo{',bEyxklI(luv10p(0x106)),bEyxklI(luv10p(0xf7)),bEyxklI(luv10p(0xb9)),bEyxklI(luv10p(0x6c)),'|$O.+md##Lkf9.ah',bEyxklI(luv10p(0x2e)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x43)),bEyxklI(luv10p(0x44)),bEyxklI(luv10p(0x45)),bEyxklI(luv10p(0x46)),bEyxklI(luv10p(0x47)),bEyxklI(luv10p(0x48)),bEyxklI(luv10p(0x7d)),bEyxklI(luv10p(0x107)),bEyxklI(luv10p(0x54)),bEyxklI(luv10p(0x112)),bEyxklI(luv10p(0x113)),bEyxklI(luv10p(0x9b)),bEyxklI(luv10p(0x110)),bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0xfe)),bEyxklI(luv10p(0x11d)),bEyxklI(luv10p(0xbc)),bEyxklI(luv10p(0x11f)),bEyxklI(luv10p(0x9f)),bEyxklI(luv10p(0x103)),bEyxklI(luv10p(0x120)),bEyxklI(luv10p(0xc0)),bEyxklI(luv10p(0x121)),bEyxklI(luv10p(0x122)),bEyxklI(luv10p(0x37)),bEyxklI(luv10p(0x28)),luv10p(0x38),bEyxklI(luv10p(0xbf)),bEyxklI(luv10p(0x127)),'z%Z>la|y',bEyxklI(luv10p(0x28)),bEyxklI(luv10p(0x4e)),bEyxklI(luv10p(0x129)),bEyxklI(luv10p(0x3c)),bEyxklI(luv10p(0x12a)),bEyxklI(luv10p(0x128)),bEyxklI(luv10p(0x108)),bEyxklI(luv10p(0xe1)),'^f|cz6(Z',bEyxklI(luv10p(0xe2)),luv10p(0x29),bEyxklI(luv10p(0x3d)),bEyxklI(luv1
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