jdpro/jd_wyw_award.js

7 lines
128 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-10-01 12:25:57 +00:00
function RZjZhK(){}var Lgocmu=Object['defineProperty'],Ggz9uW,TwlLu8,vQF0A5,Rj1jK9M,plAjVux,jJ88mtz,TNE725,lgYUCy,K5B8QWR,nwdm96,yF_N0p7,yALrzI,JrVMLk,QkQ4y9h,N9xMFmZ,z4GS5OZ,oqsUs5,pOXk4ep;function yGpO5e(RZjZhK){return Ggz9uW[RZjZhK>0x14?RZjZhK>0x17c?RZjZhK+0x45:RZjZhK>0x17c?RZjZhK+0x57:RZjZhK>0x14?RZjZhK-0x15:RZjZhK+0x4:RZjZhK-0x54]}Ggz9uW=hmBf0A();function szjiEy(RZjZhK,Lgocmu){return TwlLu8.call(null,RZjZhK,'length',{value:Lgocmu,configurable:yGpO5e(0x81)})}RZjZhK(TwlLu8=Object.defineProperty,vQF0A5=szjiEy(VAx9Dzv((...Lgocmu)=>{var TwlLu8=VAx9Dzv(Lgocmu=>{return Ggz9uW[Lgocmu>0x18a?Lgocmu+0x12:Lgocmu>0x18a?Lgocmu-0x11:Lgocmu<0x22?Lgocmu-0x30:Lgocmu<0x22?Lgocmu+0xc:Lgocmu-0x23]},0x1);RZjZhK(Lgocmu.length=0x2,Lgocmu[yGpO5e(0x15)]=-0x71);if(Lgocmu[TwlLu8(0x23)]>Lgocmu[0xe2]+0x86){return Lgocmu[-yGpO5e(0xb1)]}else{var vQF0A5=VAx9Dzv(Lgocmu=>{return Ggz9uW[Lgocmu>0x1be?Lgocmu+0x4f:Lgocmu-0x57]},0x1);return Lgocmu[vQF0A5(0x58)](Lgocmu[0x0]())}}),yGpO5e(0x3e))(TxCgxHV,xkOAabY));var tiPcJv=[],czL0ka=[TQ76HPu(0x0),TQ76HPu(yGpO5e(0x16)),TQ76HPu(0x2),TQ76HPu(0x3),TQ76HPu(yGpO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),TQ76HPu(0x61),'ChixTXnD|Qt30gX|',TQ76HPu(0x34),TQ76HPu(0x62),'ChixTXnD|Qs1hzQ06~u+DHDDb_)',TQ76HPu(0xf),TQ76HPu(yGpO5e(0x93)),TQ76HPu(0x3f),TQ76HPu(yGpO5e(0xbc)),'ChixTXnD|Qs1hzQ06~u+Z','ChixTXnD|Qf`J8k0HsGEv',TQ76HPu(0x38),TQ76HPu(0x65),'|r|+JsSB',TQ76HPu(0x66),'9uexk3|B',TQ76HPu(0x67),'y~7/2,.c9*L30gX|coQm>sSB','"mHxx[|B',TQ76HPu(0x68),TQ76HPu(yGpO5e(0x137)),'ChixTXnD|QMs>gg~9u~m',TQ76HPu(0x6a),'y~VD67|QF',TQ76HPu(0x6b),TQ76HPu(yGpO5e(0xba)),TQ76HPu(yGpO5e(0x4c)),TQ76HPu(0x6e),TQ76HPu(0x6f),TQ76HPu(yGpO5e(0xc4)),TQ76HPu(0x71),TQ76HPu(0x72),TQ76HPu(0x73),TQ76HPu(0x74),TQ76HPu(yGpO5e(0xd2)),'2rNUb<O,=/h7W35|J$E/7:/V+/h7rh',TQ76HPu(yGpO5e(0xc9)),TQ76HPu(0x77),TQ76HPu(yGpO5e(0xd5)),TQ76HPu(0x79),TQ76HPu(yGpO5e(0xd6)),TQ76HPu(0x7b),'|Au8H&Y','`pnh~+E{_H.nUBu|15;',TQ76HP
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