jdpro/jd_dwapp.js

10 lines
82 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 16:55:14 +00:00
function LUTZvN(){}var ydp1gx=Object['defineProperty'],mEZQILv,QM_ut56,w7PIKjl,hItMkQ,QSVHrr0,d3n2jjT,_82FtG0,FLyvR6Q,OulbgX,rHi3eSe,WIKLscy,ecwHIrR,W3Y4KzE,mDIaoN,g0fK8w,_V7IfF,Hz6gSb,sxZJxOs,lEfN5T;function HDFnDE(LUTZvN){return mEZQILv[LUTZvN<0x26?LUTZvN+0x62:LUTZvN<0x26?LUTZvN-0x53:LUTZvN>0x10a?LUTZvN+0x29:LUTZvN<0x26?LUTZvN+0x13:LUTZvN-0x27]}mEZQILv=iord4d();function GMTZC4(LUTZvN,ydp1gx){QM_ut56(LUTZvN,'length',{value:ydp1gx,configurable:!0x0});return LUTZvN}LUTZvN(QM_ut56=Object.defineProperty,w7PIKjl=GMTZC4(kKmmc7a((...ydp1gx)=>{var QM_ut56=kKmmc7a(ydp1gx=>{return mEZQILv[ydp1gx<0xef?ydp1gx>0xef?ydp1gx-0x5a:ydp1gx-0xc:ydp1gx-0x55]},0x1);LUTZvN(ydp1gx[QM_ut56(0x2c)]=0x2,ydp1gx[HDFnDE(0x3a)]=0x88);if(ydp1gx[0xa6]>HDFnDE(0x3b)){return ydp1gx[ydp1gx[0xa6]-0x91]}else{var w7PIKjl=kKmmc7a(ydp1gx=>{return mEZQILv[ydp1gx>0x142?ydp1gx-0x39:ydp1gx>0x5e?ydp1gx-0x5f:ydp1gx+0x3d]},0x1);return ydp1gx[w7PIKjl(0x75)](ydp1gx[0x0]())}}),HDFnDE(0x4f))(cSRJfk,MOrgP0));var vixBnib=[],jDIAUed=[tbNptog(HDFnDE(0x3c)),tbNptog(0x1),tbNptog(0x2),tbNptog(HDFnDE(0x3e)),tbNptog(0x4),tbNptog(HDFnDE(0x4e)),'Irb|{*z2',tbNptog(0x6),tbNptog(0x7),tbNptog(HDFnDE(0x4d)),tbNptog(0x9),tbNptog(HDFnDE(0x43)),tbNptog(HDFnDE(0x62)),tbNptog(0xc),tbNptog(0xd),tbNptog(0xe),tbNptog(HDFnDE(0x88)),tbNptog(0x10),tbNptog(0x9),tbNptog(0xc),tbNptog(0xe),tbNptog(0x11),tbNptog(0xe),tbNptog(HDFnDE(0x63)),tbNptog(HDFnDE(0x67)),tbNptog(0xc),tbNptog(0x12),tbNptog(0x13),tbNptog(0x14),tbNptog(0x15),tbNptog(0x16),tbNptog(0x17),tbNptog(0x18),tbNptog(0x19),tbNptog(0x1a),tbNptog(HDFnDE(0x6c)),tbNptog(HDFnDE(0x37)),'E<>+v|z2','E<>+v|wN7v9',tbNptog(0x1d),tbNptog(0x1e),'0y>+v|z2',tbNptog(0x1f),tbNptog(0x20),tbNptog(0x21),'p2h{=F1<,>`4l=ZM{Bg<,5@l9+Yu{1hhoo`=aVBb^Eo&UA6p0y>+v|wN{E,Vm+SN~n;ngHyG1Sh@`H;M_v"h}KX41q1dNdv/f6[@/Zls"',tbNptog(0x22),tbNptog(0x23),tbNptog(0x18),tbNptog(0x24),tbNptog(0x25),tbNptog(HDFnDE(0x76)),tbNptog(0x27),tbNptog(HDFnDE(0x69)),'Ir]|Oq[MW',tbNptog(HDFnDE(0x78)),tbNptog(0x2a),tbNptog(0x2b),tbNptog(0x2c),tbNptog(HDFnDE(0x72)),'2t1n!e?:GPAuUE/QA"FNtKul,)cg){3hoAEC0pr<y|/9GdlrTGYT^',tbNptog(HDFnDE(0x95)),tbNptog(0x2e),tbNptog(0x2f),tbNptog(HDFnDE(0x96)),tbNptog(0x31),tbNptog(0x32),tbNptog(HDFnDE(0x27)),tbNptog(0x21),tbNptog(HDFnDE(0x82)),tbNptog(HDFnDE(0x81)),tbNptog(HDFnDE(0x27)),tbNptog(HDFnDE(0x84)),tbNptog(0x36),tbNptog(HDFnDE(0x85)),tbNptog(HDFnDE(0x3f)),tbNptog(0x39),tbNptog(HDFnDE(0x49)),tbNptog(0x3b),tbNptog(HDFnDE(0x86)),tbNptog(0x3d),tbNptog(HDFnDE(0x7c)),tbNptog(HDFnDE(0x29)),tbNptog(0x3f),tbNptog(HDFnDE(0x89)),tbNptog(HDFnDE(0x27)),tbNptog(HDFnDE(0x28)),tbNptog(0x41),tbNptog(0x42),tbNptog(0x43),tbNptog(0x44),tbNptog(0x18),tbNptog(0x45),tbNptog(0x18),tbNptog(0x46),tbNptog(0x18),tbNptog(0x47),tbNptog(0x48),tbNptog(0x49),tbNptog(0xe),tbNptog(HDFnDE(0x90)),tbNptog(0x18),tbNptog(HDFnDE(0x28)),tbNptog(0x41),tbNptog(0x42),tbNptog(0x43),tbNptog(0x4b),tbNptog(HDFnDE(0x2a)),tbNptog(0x4d),tbNptog(HDFnDE(0x27)),tbNptog(HDFnDE(0x97)),tbNptog(0x18),tbNptog(0x4f),tbNptog(HDFnDE(0x27)),tbNptog(0x50),tbNptog(0x49),tbNptog(HDFnDE(0x30)),tbNptog(0x52),tbNptog(HDFnDE(0x2b)),tbNptog(0x48),tbNptog(HDFnDE(0x31)),HDFnDE(0x32),tbNptog(HDFnDE(0x33)),tbNptog(HDFnDE(0xa4)),'$fuIQ|)2',tbNptog(0x56),tbNptog(HDFnDE(0xa6)),tbNptog(HDFnDE(0x2c)),HDFnDE(0x36),tbNptog(HDFnDE(0x2d)),tbNptog(0x59),tbNptog(HDFnDE(0xdd)),HDFnDE(0x35),tbNptog(HDFnDE(0x2e)),':RC|eps)?=#|oM~9>bM#&4>)@"0',tbNptog(0x5c),tbNptog(0x5d),tbNptog(0x5e),tbNptog(HDFnDE(0xd2)),tbNptog(0x60),tbNptog(0x61),tbNptog(HDFnDE(0x5f)),tbNptog(0x63),tbNptog(0x64),'b[rE=2=(4{t|NPtshcq',tbNptog(HDFnDE(0x5a)),tbNptog(HDFnDE(0xa8)),tbNptog(0x67),tbNptog(HDFnDE(0xac)),tbNptog(0x42),tbNptog(HDFnDE(0x29)),tbNptog(0x69),tbNptog(HDFnDE(0x2f)),tbNptog(0x6a),'gnH]/B|"a',tbNptog(0x6b),tbNptog(0x6c),tbNptog(0x49),tbNptog(0x6d),tbNptog(0x43),tbNptog(0x50),tbNptog(0x69),tbNptog(HDFnDE(0x2a)),tbNptog(HDFnDE(0xaa)),tbNptog(HDFnDE(0x45)),tbNptog(0x70),'fSz;9i^NC:5W)X1;Blsn0?F&b~aMQ(@kVQ{Do,r>a~**Q(`/j=(<@t_{O=(6Ocgf%o4"(%a%s=1&qwn},)Tn9DAy@*R2WPv;$lxuSvdaKgCR;KT/c2[UvE|&aBGO3PpAiQTn9D(DHI!eSypA)Q}U#Zc[vh!e~vXAK,!UvE,}rg!FYd`/fMgcCt$',tbNptog(0
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