mirror of https://github.com/6dylan6/jdpro.git
10 lines
93 KiB
JavaScript
10 lines
93 KiB
JavaScript
|
/*
|
|||
|
积分换话费
|
|||
|
入口:首页-生活·缴费-积分换话费
|
|||
|
update:2024/5/6
|
|||
|
10 1,14 * * * jd_dwapp.js
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('积分换话费');
|
|||
|
const bdy_0xe1f307=bdy_0x4c83;(function(_0x2448d9,_0x53ef07){const bdy_0x1d5681={_0x14a941:'0x104',_0x53c4c3:'ue%n',_0x91f37d:'0x1bb',_0x1a1ce5:'c9JL',_0xe71d6:'0x212',_0x520b20:'0x284',_0x54c6f6:'(KLn',_0x3c5069:'0x26b',_0x1430c5:'!6Lq',_0xaaa1ee:'0x239',_0x564b7f:'zInT',_0x458e36:'0x196',_0x5764ca:'%gXb',_0x251e10:'0x152',_0x4cff54:'5GYS',_0x50067a:'0x1ec',_0x26fb66:'Yvt(',_0x35de55:'0x1da',_0x3b03d4:'WYz&',_0x257e3e:'0x2ae',_0x3953d0:'c5h4',_0x4ad61d:'0x73',_0x12a2c5:'P*mA',_0x58c302:'0x6b',_0x53c30e:'8k&P'},_0x4a817d=bdy_0x4c83,_0x1cc53b=_0x2448d9();while(!![]){try{const _0x3478c8=-parseInt(_0x4a817d(bdy_0x1d5681._0x14a941,bdy_0x1d5681._0x53c4c3))/(-0x2199+-0x80e+0x29a8)*(-parseInt(_0x4a817d(bdy_0x1d5681._0x91f37d,bdy_0x1d5681._0x1a1ce5))/(0x164a*0x1+0xf55+-0x1*0x259d))+parseInt(_0x4a817d(bdy_0x1d5681._0xe71d6,bdy_0x1d5681._0x53c4c3))/(-0x2246+0x272*0xe+0xd*0x1)*(-parseInt(_0x4a817d(bdy_0x1d5681._0x520b20,bdy_0x1d5681._0x54c6f6))/(0x1439+0x1*0x26b+-0xb5*0x20))+-parseInt(_0x4a817d(bdy_0x1d5681._0x3c5069,bdy_0x1d5681._0x1430c5))/(-0x1061+0x1a*0x101+-0x9b4)+-parseInt(_0x4a817d(bdy_0x1d5681._0xaaa1ee,bdy_0x1d5681._0x564b7f))/(0x1*0x1051+0x2*0x7c8+-0x1fdb)*(parseInt(_0x4a817d(bdy_0x1d5681._0x458e36,bdy_0x1d5681._0x5764ca))/(-0x14*-0x18e+-0x773+-0x2*0xbcf))+parseInt(_0x4a817d(bdy_0x1d5681._0x251e10,bdy_0x1d5681._0x4cff54))/(-0x176f+0x6*0x565+-0x8e7)*(-parseInt(_0x4a817d(bdy_0x1d5681._0x50067a,bdy_0x1d5681._0x26fb66))/(0x3*-0x23f+0x1459+-0xd93))+-parseInt(_0x4a817d(bdy_0x1d5681._0x35de55,bdy_0x1d5681._0x3b03d4))/(-0x56*0x37+0x1*0xfea+0x29a)*(-parseInt(_0x4a817d(bdy_0x1d5681._0x257e3e,bdy_0x1d5681._0x3953d0))/(-0x2467+-0x1*-0x1bb+0x22b7))+-parseInt(_0x4a817d(bdy_0x1d5681._0x4ad61d,bdy_0x1d5681._0x12a2c5))/(-0xf79+0x25*0xf1+-0x1350)*(-parseInt(_0x4a817d(bdy_0x1d5681._0x58c302,bdy_0x1d5681._0x53c30e))/(-0x2659*0x1+0x567*-0x3+-0x7*-0x7cd));if(_0x3478c8===_0x53ef07)break;else _0x1cc53b['push'](_0x1cc53b['shift']());}catch(_0x2bede1){_0x1cc53b['push'](_0x1cc53b['shift']());}}}(bdy_0x12dd,0x1754*-0x6+-0x1*-0x42043+-0x1308a));const bdy_0xad1580=(function(){const bdy_0x481ed8={_0x2d4692:'0x1fe',_0x3937d8:'Mrc)',_0x59840c:'0xd3',_0x27dfca:'Uqj[',_0xb98ae7:'0xaf'},_0x22f51e=bdy_0x4c83,_0x16ed62={};_0x16ed62[_0x22f51e(bdy_0x481ed8._0x2d4692,bdy_0x481ed8._0x3937d8)]=_0x22f51e(bdy_0x481ed8._0x59840c,bdy_0x481ed8._0x27dfca),_0x16ed62[_0x22f51e(bdy_0x481ed8._0xb98ae7,bdy_0x481ed8._0x27dfca)]=function(_0x1ea328,_0x13f0d1){return _0x1ea328===_0x13f0d1;};const _0x83c57=_0x16ed62;let _0x1ae5be=!![];return function(_0x568569,_0x56dc9b){const bdy_0x1b391c={_0x379a7f:'0x179',_0x18dd6b:'%gXb',_0x1bc6d2:'0x26a',_0x3dabe0:'5GYS',_0x3eaf1e:'0x180',_0x39a8e3:'V(UV',_0x5a9c37:'0x121',_0x1474f3:'4*c5',_0x21130b:'0x1ab',_0x5c0b15:'FOGX',_0x295296:'0x1f5',_0x40a987:'72vx',_0x575fe6:'0x1b9',_0x472d96:'(KLn',_0x573979:'0x1dc',_0x26a01:'MHO*',_0x16531e:'0x127',_0x35aad6:'vPU4',_0x1db50b:'0x272',_0x53c4fa:'[N0v'},_0x38c4b5=_0x1ae5be?function(){const _0x29a6a3=bdy_0x4c83;if(_0x83c57[_0x29a6a3(bdy_0x1b391c._0x379a7f,bdy_0x1b391c._0x18dd6b)]===_0x29a6a3(bdy_0x1b391c._0x1bc6d2,bdy_0x1b391c._0x3dabe0)){const bdy_0x47031b={_0xfa4e9f:'0xa1',_0x100937:'x]8h'},_0x4452e5=_0x58f6b5?function(){const _0xfe8a55=bdy_0x4c83;if(_0x26c9f1){const _0x443146=_0x2b6283[_0xfe8a55(bdy_0x47031b._0xfa4e9f,bdy_0x47031b._0x100937)](_0x14c696,arguments);return _0x593137=null,_0x443146;}}:function(){};return _0x2209d1=![],_0x4452e5;}else{if(_0x56dc9b){if(_0x83c57[_0x29a6a3(bdy_0x1b391c._0x3eaf1e,bdy_0x1b391c._0x39a8e3)](_0x29a6a3(bdy_0x1b391c._0x5a9c37,bdy_0x1b391c._0x1474f3),_0x29a6a3(bdy_0x1b391c._0x21130b,bdy_0x1b391c._0x5c0b15)))_0xf04e14[_0x29a6a3(bdy_0x1b391c._0x295296,bdy_0x1b391c._0x40a987)](''+_0x3ded90),_0x43bced[_0x29a6a3(bdy_0x1b391c._0x575fe6,bdy_0x1b391c._0x472d96)](_0x2987ef[_0x29a6a3(bdy_0x1b391c._0x573979,bdy_0x1b391c._0x26a01)]+_0x29a6a3(bdy_0x1b391c._0x16531e,bdy_0x1b391c._0x35aad6));else{const _0x5727de=_0x56dc9b[_0x29a6a3(bdy_0x1b391c._0x1db50b,bdy_0x1b391c._0x53c4fa)](_0x568569,arguments);return _0x56dc9b=null,_0x5727de;}}}}:function(){};return _0x1ae5be=![],_0x38c4
|
|||
|
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
|