jdpro/jd_wyw_award.js

7 lines
142 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:25:29 +00:00
const bdy_0xb76065=bdy_0x3500;(function(_0x48c980,_0x2313fe){const bdy_0x364355={_0x4aea7d:'wPwL',_0x47e25b:'0x3c3',_0x5a94ce:'x3Nk',_0x19632f:'RPdu',_0x11f6e9:'0x627',_0x1dff01:'i#ua',_0x4e9dd9:'0x48e'},_0x426b6d=bdy_0x3500,_0x5d34a8=_0x48c980();while(!![]){try{const _0x11fbaa=parseInt(_0x426b6d('0x363',bdy_0x364355._0x4aea7d))/(-0x1ee2+-0x1*-0xab6+-0x5*-0x409)*(parseInt(_0x426b6d(bdy_0x364355._0x47e25b,'yWQH'))/(-0x1d55+-0x19d3+0x372a))+-parseInt(_0x426b6d('0x611',bdy_0x364355._0x5a94ce))/(-0x1d87*0x1+-0x1a36+0x37c0)*(-parseInt(_0x426b6d('0x41c','!uWs'))/(-0x1a2f*0x1+0x892+-0x1*-0x11a1))+parseInt(_0x426b6d('0x63b',bdy_0x364355._0x19632f))/(0x3f+0x1887+0x18c1*-0x1)+parseInt(_0x426b6d('0x2ef','x3Nk'))/(-0x5*-0x3f1+0xde*-0xc+-0x947)*(parseInt(_0x426b6d('0x549','LD6%'))/(0x4da*0x2+0x2*-0xd63+-0x1*-0x1119))+parseInt(_0x426b6d(bdy_0x364355._0x11f6e9,bdy_0x364355._0x1dff01))/(0x1*0x40f+-0x1*0x36d+0x4d*-0x2)+parseInt(_0x426b6d(bdy_0x364355._0x4e9dd9,'RauJ'))/(0x7c3+0xca+-0x884)*(-parseInt(_0x426b6d('0x5c3','!8PD'))/(-0x17*-0x16+0x155c+-0x174c))+-parseInt(_0x426b6d('0x1e8','3)EW'))/(-0xa*-0x3d7+0x3a7*-0x5+0x4*-0x506);if(_0x11fbaa===_0x2313fe)break;else _0x5d34a8['push'](_0x5d34a8['shift']());}catch(_0x13a563){_0x5d34a8['push'](_0x5d34a8['shift']());}}}(bdy_0x4731,0x1b32d+0xa98ad+-0x3*0x1fcc));function bdy_0x3500(_0xf1187c,_0x1ce54e){const _0x5cfb34=bdy_0x4731();return bdy_0x3500=function(_0x4b99d0,_0x5c3d52){_0x4b99d0=_0x4b99d0-(0x2+0x21c1+-0x40d*0x8);let _0x395e7c=_0x5cfb34[_0x4b99d0];if(bdy_0x3500['rbXtZC']===undefined){var _0x2af2b8=function(_0x14ab93){const _0xe0eabe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x79d9ab='',_0x2075b1='',_0x4ec387=_0x79d9ab+_0x2af2b8;for(let _0x5011a7=0x2*0x356+0x2a*0xa7+-0x2212,_0x3c8067,_0x32f5b5,_0x20670e=-0x1*-0x2a3+0x6d*0x2+-0x37d;_0x32f5b5=_0x14ab93['charAt'](_0x20670e++);~_0x32f5b5&&(_0x3c8067=_0x5011a7%(-0x61*-0x25+-0x1*0x2569+0x7*0x358)?_0x3c8067*(-0x6d*0x37+0x443*0x3+0xae2)+_0x32f5b5:_0x32f5b5,_0x5011a7++%(0x1e07+0x1276+-0x3079*0x1))?_0x79d9ab+=_0x4ec387['charCodeAt'](_0x20670e+(0x3*0xb96+0xdbd+-0x5*0x9b1))-(0x2622+-0x15e4+-0x1034)!==-0x10c*-0x9+-0x11f2+0x886?String['fromCharCode'](0x1596+-0x1*-0x399+-0x1830&_0x3c8067>>(-(0x1*-0x26d3+-0x1f+0x33f*0xc)*_0x5011a7&-0x34f*-0x9+-0x2f1+-0x1ad0)):_0x5011a7:0x9*-0x2eb+0x2676+-0xc33){_0x32f5b5=_0xe0eabe['indexOf'](_0x32f5b5);}for(let _0x461982=-0x392*0x7+0x2259*0x1+-0x1*0x95b,_0x41f5ab=_0x79d9ab['length'];_0x461982<_0x41f5ab;_0x461982++){_0x2075b1+='%'+('00'+_0x79d9ab['charCodeAt'](_0x461982)['toString'](-0x233f+0xb*-0x1a8+0x3587))['slice'](-(0x337+0xf3*0x7+0x2*-0x4ed));}return decodeURIComponent(_0x2075b1);};const _0x34e80e=function(_0x19a0b2,_0x2edb46){let _0x380ca5=[],_0x40b9c1=-0x1b9d*0x1+0x140a+-0x793*-0x1,_0xbf91f4,_0x2d5421='';_0x19a0b2=_0x2af2b8(_0x19a0b2);let _0x4f85c0;for(_0x4f85c0=-0x500+0xda*0x13+0x3*-0x3ba;_0x4f85c0<0xfa7+0x75*-0x4+-0xcd3;_0x4f85c0++){_0x380ca5[_0x4f85c0]=_0x4f85c0;}for(_0x4f85c0=0x1*0x1501+-0xd02+-0x17*0x59;_0x4f85c0<-0x52*0x2b+-0x13ab+-0xb7b*-0x3;_0x4f85c0++){_0x40b9c1=(_0x40b9c1+_0x380ca5[_0x4f85c0]+_0x2edb46['charCodeAt'](_0x4f85c0%_0x2edb46['length']))%(0x2522*0x1+-0x1213*0x1+-0x120f*0x1),_0xbf91f4=_0x380ca5[_0x4f85c0],_0x380ca5[_0x4f85c0]=_0x380ca5[_0x40b9c1],_0x380ca5[_0x40b9c1]=_0xbf91f4;}_0x4f85c0=-0x6*-0x1f+-0x117a*0x1+0x10c0,_0x40b9c1=-0x11f*-0xd+-0x1*-0x12e4+-0x2177;for(let _0x12f7db=-0x175e+-0x1*0x3fd+-0x1*-0x1b5b;_0x12f7db<_0x19a0b2['length'];_0x12f7db++){_0x4f85c0=(_0x4f85c0+(-0x6f9+0x13be+0x26*-0x56))%(0x2*0x449+0x25*-0x96+0xe1c),_0x40b9c1=(_0x40b9c1+_0x380ca5[_0x4f85c0])%(0x2175+0x8d*0x2f+-0x1*0x3a58),_0xbf91f4=_0x380ca5[_0x4f85c0],_0x380ca5[_0x4f85c0]=_0x380ca5[_0x40b9c1],_0x380ca5[_0x40b9c1]=_0xbf91f4,_0x2d5421+=String['fromCharCode'](_0x19a0b2['charCodeAt'](_0x12f7db)^_0x380ca5[(_0x380ca5[_0x4f85c0]+_0x380ca5[_0x40b9c1])%(-0x5*0x78d+0x53*-0x1b+-0x6*-0x7eb)]);}return _0x2d5421;};bdy_0x3500['HdRfop']=_0x34e80e,_0xf1187c=arguments,bdy_0x3500['rbXtZC']=!![];}const _0x2ec85e=_0x5cfb34[-0x1*0x191+0x1619+-0x1488],_0x103629=_0x4b99d0+_0x2ec85e,_0x295d6a=_0xf1187c[_0x103629
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