faker3/jd_dwapp.js

15 lines
83 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称积分换话费
入口首页-话费充值
2024-11-18 18:53:57 +08:00
jd_dwapp_wait // 延时参数,默认 4 秒,填写 1代表延迟1秒
2024-11-12 11:17:55 +08:00
cron: 56 7,19 * * *
*/
const $ = new Env('积分换话费');
2024-11-20 10:14:21 +08:00
function a7wVT8X(){}var _dRWz8O=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],GZaXH9U,X7gk6j,WCZ0sSC,hnKVQN8,ylkGs6B,ZAzjvfx,jpzUP0,FZE2V1y,vMfyilY,SvlIDo,MNZTGa,cVAJPl,bOBLd2,kLa852,vk5Nrv,KxzJrvt,NFPHXWK,gLbj_u,xIG9eL;function kI_tMu(a7wVT8X){return GZaXH9U[a7wVT8X<0x1a?a7wVT8X-0x18:a7wVT8X>0xdb?a7wVT8X+0x32:a7wVT8X-0x1b]}GZaXH9U=xAprVL();function Dr9cS3z(a7wVT8X,_dRWz8O){return X7gk6j.call(null,a7wVT8X,'length',{value:_dRWz8O,configurable:!0x0})}a7wVT8X(X7gk6j=Object.defineProperty,WCZ0sSC=Dr9cS3z(iCqLff((..._dRWz8O)=>{a7wVT8X(_dRWz8O[kI_tMu(0x29)]=kI_tMu(0x2d),_dRWz8O[0xe6]=0x61);if(_dRWz8O[0xe6]>kI_tMu(0xb3)){return _dRWz8O[-0x25]}else{var X7gk6j=iCqLff(_dRWz8O=>{return GZaXH9U[_dRWz8O>0xf?_dRWz8O<0xf?_dRWz8O-0x30:_dRWz8O>0xf?_dRWz8O>0xf?_dRWz8O-0x10:_dRWz8O-0x9:_dRWz8O+0x5c:_dRWz8O-0x51]},0x1);return _dRWz8O[_dRWz8O[0xe6]-X7gk6j(0x16)](_dRWz8O[_dRWz8O[_dRWz8O[kI_tMu(0x28)]+0x85]-0x61]())}}),0x2)(pk04gN,thUNcG));var RPzKqFW=[],bQB1EyT=[dKxEoC(0x0),dKxEoC(0x1),dKxEoC(0x2),dKxEoC(0x3),dKxEoC(0x4),dKxEoC(kI_tMu(0x31)),dKxEoC(0x6),dKxEoC(kI_tMu(0x3b)),dKxEoC(kI_tMu(0x43)),dKxEoC(kI_tMu(0x5f)),dKxEoC(0xa),dKxEoC(0xb),dKxEoC(kI_tMu(0x36)),dKxEoC(0xd),dKxEoC(kI_tMu(0x42)),'P@|[m',dKxEoC(0xf),dKxEoC(kI_tMu(0xa0)),dKxEoC(kI_tMu(0x61)),dKxEoC(kI_tMu(0x25)),dKxEoC(kI_tMu(0x50)),dKxEoC(kI_tMu(0x62)),dKxEoC(0x15),dKxEoC(0x12),dKxEoC(kI_tMu(0x65)),dKxEoC(kI_tMu(0x66)),'F3}!V|B',dKxEoC(kI_tMu(0x64)),dKxEoC(0x19),dKxEoC(0x1a),dKxEoC(0x1b),dKxEoC(kI_tMu(0x63)),dKxEoC(kI_tMu(0x3c)),dKxEoC(kI_tMu(0x68)),dKxEoC(kI_tMu(0x69)),dKxEoC(0x20),dKxEoC(kI_tMu(0x5b)),dKxEoC(0x22),dKxEoC(kI_tMu(0x2a)),'65l{_DBbb|',dKxEoC(0x24),dKxEoC(0x25),dKxEoC(0x26),dKxEoC(kI_tMu(0x4e)),dKxEoC(0x28),dKxEoC(0x29),'\x4b\x70\x2c\x6c\x7a\x7c\x42',dKxEoC(0x2a),dKxEoC(0x2b),'cs+Wt|8whbo1[',dKxEoC(0x2c),dKxEoC(kI_tMu(0x6e)),dKxEoC(0x2e),dKxEoC(0x2f),dKxEoC(0x30),dKxEoC(0x31),dKxEoC(0x32),dKxEoC(0x15),dKxEoC(kI_tMu(0x1d)),dKxEoC(kI_tMu(0x77)),dKxEoC(kI_tMu(0x20)),dKxEoC(0x36),dKxEoC(kI_tMu(0x78)),dKxEoC(0x15),dKxEoC(0x38),dKxEoC(kI_tMu(0x6d)),'\x43\x21\x51\x37\x7c\x77\x5e\x54\x3a\x39','GfKn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xEoC(0x52),dKxEoC(0x53),dKxEoC(kI_tMu(0x4c)),dKxEoC(0x55),dKxEoC(0x56),dKxEoC(0x57),'bKAu|?PX',dKxEoC(0x58),dKxEoC(0x59),dKxEoC(0x5a),dKxEoC(0x5b),dKxEoC(kI_tMu(0x3f)),dKxEoC(0x5d),'nI02MnmXx|sgX>bV',dKxEoC(0x5e),dKxEoC(0x5f),dKxEoC(kI_tMu(0x21)),dKxEoC(0x61),dKxEoC(kI_tMu(0xa3)),dKxEoC(0x63),dKxEoC(0x64),dKxEoC(0x65),dKxEoC(kI_tMu(0x6b)),dKxEoC(kI_tMu(0x9a)),'\u003a\u002e\u006b\u0041\u007c\u0077\u0031\u004c\u002a\u0037\u0066\u0026\u005f\u0067\u003b\u0056\u004d\u006d\u007b\u0037\u0026\u0022\u0037\u0062\u0032\u0037\u0066\u0026\u0058\u003e\u0065\u003b\u0031\u0034\u0043\u0047\u0040\u0078\u0039\u0077\u007d\u0023\u004e\u0065\u0050\u0029\u002e\u0046\u0056\u0052\u0043\u004a\u004b\u0037\u0064\u007a\u0030\u0031\u007c\u002a\u0069\u0042\u0048\u0073\u006b\u0035\u0042\u0072\u0039',dKxEoC(kI_tMu(0x9b)),dKxEoC(0x68),dKxEoC(kI_tMu(0x9c)),dKxEoC(k
2024-11-12 11:17:55 +08:00
// prettier-ignore
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