jdpro/jd_wyw_award.js

7 lines
157 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:02:37 +00:00
function bdy_0x3eb6(_0x49c090,_0x475033){const _0x2cbb6e=bdy_0x1b4b();return bdy_0x3eb6=function(_0x535eca,_0x5ec50f){_0x535eca=_0x535eca-(0x132e+0xb26+0x11*-0x1ae);let _0x1e9dfb=_0x2cbb6e[_0x535eca];if(bdy_0x3eb6['osTpoz']===undefined){var _0xbae852=function(_0x6cb43b){const _0x27a7ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1cbafc='',_0x297da7='',_0x181560=_0x1cbafc+_0xbae852;for(let _0x484dba=0x2226+0x291*-0xa+-0x2*0x43e,_0x504927,_0x68b956,_0x123b4a=-0x2220+-0x9*-0x3e5+-0x1*0xed;_0x68b956=_0x6cb43b['charAt'](_0x123b4a++);~_0x68b956&&(_0x504927=_0x484dba%(0x57b*0x3+0x10d*0x25+-0x1ba7*0x2)?_0x504927*(0x1*-0x4ff+-0x822*0x4+0x25c7)+_0x68b956:_0x68b956,_0x484dba++%(-0x10*0x1d5+-0x15ed*-0x1+0x767))?_0x1cbafc+=_0x181560['charCodeAt'](_0x123b4a+(-0xe75+0x1ea0+-0x1021))-(-0xd*0x1e2+0x1*-0xf1a+0x279e)!==0x1636+0x15fa+-0x2c30?String['fromCharCode'](-0x1*-0x5bb+-0x1*-0x11a+0x5d6*-0x1&_0x504927>>(-(-0x2a8*0x3+-0x1*0x19ab+0x21*0x105)*_0x484dba&-0x5*-0x745+0x3b*0x6c+0x3d37*-0x1)):_0x484dba:0x1*0x236b+-0x12c1+-0x4f*0x36){_0x68b956=_0x27a7ef['indexOf'](_0x68b956);}for(let _0x5c0099=-0x656+-0x245b+0x2ab1,_0x6e05ba=_0x1cbafc['length'];_0x5c0099<_0x6e05ba;_0x5c0099++){_0x297da7+='%'+('00'+_0x1cbafc['charCodeAt'](_0x5c0099)['toString'](0x1*-0x209f+0xdf*-0x4+0x242b*0x1))['slice'](-(0x8*0x1c1+-0x1d0a+0x1f*0x7c));}return decodeURIComponent(_0x297da7);};const _0x4accc7=function(_0x17c716,_0xa23e61){let _0x5ed899=[],_0x2315b9=-0x25e*-0x3+0x12a2+0x3d*-0x6c,_0x1aeb3a,_0x527d22='';_0x17c716=_0xbae852(_0x17c716);let _0x1401cb;for(_0x1401cb=0x459+-0x1814+0x13bb*0x1;_0x1401cb<0x125a+0x4b2+-0x53*0x44;_0x1401cb++){_0x5ed899[_0x1401cb]=_0x1401cb;}for(_0x1401cb=0x5*0x291+0x3*-0x377+-0x270;_0x1401cb<0x218*0x8+0x56*-0x5b+0xed2;_0x1401cb++){_0x2315b9=(_0x2315b9+_0x5ed899[_0x1401cb]+_0xa23e61['charCodeAt'](_0x1401cb%_0xa23e61['length']))%(-0x1115+0x11*0xad+0x698),_0x1aeb3a=_0x5ed899[_0x1401cb],_0x5ed899[_0x1401cb]=_0x5ed899[_0x2315b9],_0x5ed899[_0x2315b9]=_0x1aeb3a;}_0x1401cb=0x3a1*0x1+0xee1+-0x1282,_0x2315b9=0x59c+-0x238e+-0x2*-0xef9;for(let _0x206ae3=-0x16db+-0x1c0c*0x1+-0x1*-0x32e7;_0x206ae3<_0x17c716['length'];_0x206ae3++){_0x1401cb=(_0x1401cb+(-0x12bd*-0x2+0x2c5*0x1+0x65*-0x66))%(-0x51*-0x7a+0x1dbc+-0x1*0x4356),_0x2315b9=(_0x2315b9+_0x5ed899[_0x1401cb])%(-0x2b1+-0x20d+0x6*0xf5),_0x1aeb3a=_0x5ed899[_0x1401cb],_0x5ed899[_0x1401cb]=_0x5ed899[_0x2315b9],_0x5ed899[_0x2315b9]=_0x1aeb3a,_0x527d22+=String['fromCharCode'](_0x17c716['charCodeAt'](_0x206ae3)^_0x5ed899[(_0x5ed899[_0x1401cb]+_0x5ed899[_0x2315b9])%(0x2*-0x307+-0x639*-0x3+0xb9d*-0x1)]);}return _0x527d22;};bdy_0x3eb6['fEFwxc']=_0x4accc7,_0x49c090=arguments,bdy_0x3eb6['osTpoz']=!![];}const _0x51337f=_0x2cbb6e[0x2397+-0xda*0x11+-0x151d],_0x385e82=_0x535eca+_0x51337f,_0x41918c=_0x49c090[_0x385e82];if(!_0x41918c){if(bdy_0x3eb6['SPFDUl']===undefined){const _0x473e5a=function(_0x85f7f){this['QtdlSo']=_0x85f7f,this['LRJzcL']=[-0x1873+-0x3*-0xd1+0x1601,0x1*0x144f+-0xb*-0x32e+0x1*-0x3749,-0xbd0+-0x818+-0x5b*-0x38],this['GezzXh']=function(){return'newState';},this['vEMHIg']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['prbGQL']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x473e5a['prototype']['rTIxuC']=function(){const _0x25c7a1=new RegExp(this['vEMHIg']+this['prbGQL']),_0x51b5c1=_0x25c7a1['test'](this['GezzXh']['toString']())?--this['LRJzcL'][-0xd1*-0x15+0x1f97*-0x1+0xe73]:--this['LRJzcL'][-0x1*0x3fd+-0xebc+0x12b9];return this['OgSFoC'](_0x51b5c1);},_0x473e5a['prototype']['OgSFoC']=function(_0x408c1b){if(!Boolean(~_0x408c1b))return _0x408c1b;return this['lDvyAZ'](this['QtdlSo']);},_0x473e5a['prototype']['lDvyAZ']=function(_0x16f500){for(let _0x1c54b1=0x9cd*-0x3+0x1aad+0x15d*0x2,_0x4ed525=this['LRJzcL']['length'];_0x1c54b1<_0x4ed525;_0x1c54b1++){this['LRJzcL']['push'](Math['round'](Math['random']())),_0x4ed525=this['LRJzcL']['length'];}return _0x16f500(this['LRJzcL'][0x168c+0x66e*-0x1+-0x101e]);},new _0x473e5a(bdy_0x3eb6)['rTIxuC'](),bdy_0x3eb6['SPFDUl']=!![];}_0x1e9dfb=bdy_0x3eb6['fEFwxc'](_0x1e9dfb,_0x5ec50f),_0x49c090[_0x385e82]=_0x1e9dfb;}else _0x1e9dfb=_0x41918c;return _0x1e9
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