jdpro/jd_wyw_award.js

7 lines
143 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
1 6 29 2 * jd_wyw_award.js
*/
const $ = new Env('玩一玩兑换');
2024-07-02 11:14:29 +00:00
const bdy_0x38e8b3=bdy_0x425b;(function(_0x3c77ee,_0xb97cbc){const bdy_0x2fe0aa={_0x86dc1b:'0x1dc',_0x4ad34e:'YSy2',_0x209623:'0x42a',_0x5aedcb:'lBHv',_0x5e864d:'p[UF',_0x57e950:'0x3a9',_0x45c741:'cBXS'},_0x123996=bdy_0x425b,_0x1711c3=_0x3c77ee();while(!![]){try{const _0x433465=parseInt(_0x123996(bdy_0x2fe0aa._0x86dc1b,'4G^9'))/(-0x1c6d+0x90e+0x8*0x26c)+-parseInt(_0x123996('0x19b','xq(K'))/(0x1969+-0x602+-0x5*0x3e1)*(-parseInt(_0x123996('0x5d8','tfht'))/(-0xb77+-0x1c06+0x2780))+parseInt(_0x123996('0x1e7',bdy_0x2fe0aa._0x4ad34e))/(-0x117f+-0x4*0x613+0x29cf)+parseInt(_0x123996('0x256','pi9G'))/(0x5*0x37a+0x1*0x973+-0x2*0xd68)*(parseInt(_0x123996(bdy_0x2fe0aa._0x209623,bdy_0x2fe0aa._0x5aedcb))/(0x1f5+-0x207a+0x1e8b))+parseInt(_0x123996('0x497','pi9G'))/(-0x221f+-0x5*-0x4c7+-0xa43*-0x1)+-parseInt(_0x123996('0x517',bdy_0x2fe0aa._0x5e864d))/(0xd02+-0x1467+-0x76d*-0x1)*(parseInt(_0x123996('0x49e','Inmp'))/(-0x8ca+0x708+0x1cb))+-parseInt(_0x123996('0x343','YSy2'))/(-0x1*0xe51+0x3*0xaf1+0x1*-0x1278)*(parseInt(_0x123996(bdy_0x2fe0aa._0x57e950,bdy_0x2fe0aa._0x45c741))/(0x29*0x97+0x2544+-0x3d68));if(_0x433465===_0xb97cbc)break;else _0x1711c3['push'](_0x1711c3['shift']());}catch(_0x3e41b2){_0x1711c3['push'](_0x1711c3['shift']());}}}(bdy_0x286d,0xd954+0x11bd9+0xb08a));const bdy_0x169d77=(function(){const bdy_0x7f9e56={_0x3a14c4:'0x42f'},bdy_0x81b8b2={_0x9a7807:'S88P'},bdy_0x5a81ef={_0x113485:'Ydu@'},_0x4de781=bdy_0x425b,_0x9f99f3={};_0x9f99f3[_0x4de781(bdy_0x7f9e56._0x3a14c4,'qv0$')]=function(_0x1fcec8,_0x3ca58a){return _0x1fcec8===_0x3ca58a;};const _0x34350c=_0x9f99f3;let _0x4c426c=!![];return function(_0x9b361f,_0x46589f){const _0x39c36e=bdy_0x425b;if(_0x34350c[_0x39c36e('0x51c',bdy_0x81b8b2._0x9a7807)](_0x39c36e('0x156','CMQ['),_0x39c36e('0x445','J9l9'))){const bdy_0x40c404={_0x1a0e2e:'0x4b3',_0x451b27:'#iL['},_0x216ed8=_0x42eb84?function(){const _0x578533=bdy_0x425b;if(_0x1fe06a){const _0x223a9b=_0x57179e[_0x578533(bdy_0x40c404._0x1a0e2e,bdy_0x40c404._0x451b27)](_0x3ed605,arguments);return _0x57eaa4=null,_0x223a9b;}}:function(){};return _0x22fd50=![],_0x216ed8;}else{const _0x361a57=_0x4c426c?function(){const _0x3c69e0=bdy_0x425b;if(_0x46589f){const _0x444c1a=_0x46589f[_0x3c69e0('0x5b6',bdy_0x5a81ef._0x113485)](_0x9b361f,arguments);return _0x46589f=null,_0x444c1a;}}:function(){};return _0x4c426c=![],_0x361a57;}};}()),bdy_0x54d11c=bdy_0x169d77(this,function(){const bdy_0x8614d7={_0x59a90b:'xq(K',_0x1587fa:'qv0$',_0x283b28:'W8lf'},_0x38077f=bdy_0x425b,_0x1cf401={};_0x1cf401[_0x38077f('0x3f0',bdy_0x8614d7._0x59a90b)]=_0x38077f('0x2e4',bdy_0x8614d7._0x1587fa);const _0x39186c=_0x1cf401;return bdy_0x54d11c[_0x38077f('0x696','YSy2')]()[_0x38077f('0x42c',bdy_0x8614d7._0x283b28)](_0x39186c[_0x38077f('0x455','Nmec')])[_0x38077f('0x4fc','U31x')]()[_0x38077f('0x5d3','p[UF')](bdy_0x54d11c)[_0x38077f('0x42c','W8lf')](_0x38077f('0x436','lBHv'));});bdy_0x54d11c();const bdy_0x37f89a=(function(){const bdy_0x25240a={_0x501d01:'0x5fc'},bdy_0x436e1b={_0x532538:'lBHv',_0x50c4e3:'0x566'},_0xb1546a=bdy_0x425b,_0xb64ce9={};_0xb64ce9[_0xb1546a('0x17a','CMQ[')]=function(_0x2160d5,_0x493344){return _0x2160d5!==_0x493344;},_0xb64ce9[_0xb1546a(bdy_0x25240a._0x501d01,'Inmp')]=function(_0x1bbdb2,_0x2dac31){return _0x1bbdb2!==_0x2dac31;};const _0x1d6f79=_0xb64ce9;let _0x5cab6b=!![];return function(_0x2439f4,_0x246160){const bdy_0x217d74={_0x49dba0:'0x228',_0x16c1ee:'T&N9'},_0x5846cb=bdy_0x425b;if(_0x1d6f79[_0x5846cb('0x594','cBXS')](_0x5846cb('0x66f','1Eep'),_0x5846cb('0x54b','v9BG')))_0x4c803d[_0x5846cb('0x579',bdy_0x436e1b._0x532538)](_0x8afffc[_0x5846cb('0x4b0','Nmec')][_0x5846cb(bdy_0x436e1b._0x50c4e3,'jbpk')]);else{const _0x2fd73e=_0x5cab6b?function(){const _0x1a9235=bdy_0x425b;if(_0x246160){if(_0x1d6f79[_0x1a9235('0x3d6','jbpk')](_0x1a9235(bdy_0x217d74._0x49dba0,'pi9G'),_0x1a9235('0x16d','E3pG')))_0x194eeb[_0x1a9235('0x5fe',bdy_0x217d74._0x16c1ee)]=!![];else{const _0x3871be=_0x246160[_0x1a9235('0x323','AC$L')](_0x2439f4,arguments);return _0x246160=null,_0x3871be;}}}:function(){};return _0x5cab6b=![],_0x2fd73e;}};}());(function(){const bdy_0xf9f7f2={_0x163a9
2024-06-28 07:47:44 +00:00
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr