jdpro/jd_wyw_award.js

7 lines
152 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-09-06 15:20:59 +00:00
const _0x51ef=['l2ddISorWPS','W6vgWQGxhq','WOiOga','scpdO8ozAmoWWO8E','W7ijaCkxWRu','fSoFa8oEW4m','jCk1l8kj','q3KojWa','WQHgg8och1ddVHe','WOVLPzFLKP3LI5VOOABVVzq','W43cSmoO','nmoiW4tdSSkb','WOOZeCkpWO4','WPpcKeO','zCofdNhdMG','vxuVW4ifWOLHqKZcJG','aGTquCkG','bgldT8omWR0C','df3dN109','sI3dUCoKsSo6WOirj8kb','fdT+xSksb2yrW6FcOG','a2BdI2udvG','WP/cM8kOquaKWR3dOfu','rmkZWOdcItq','WP3cMKO','pCkGWPP1','ad1Vy8kuo2av','dSkfc8k6WPa','WRLqWQ1Fnq','nqOChYu','A1yufq8q','pJRcISkwxG','r8oEd8oiv8oCWQG','z8oAe0FdJ8oRW40','6iY25B6w5PES5OQh5Awy5yU/772n','gCk4bW','WRajACkPW7hcJKe','W6LihbZdGq','lSoLkmokWQC','BCklWQe','WOJcOwHMcCk1BHtcUSkW','pmk2oCkqWOecB8oDWR4','W7v0lSkIrI8NESkOvW','CCkuWORdUHO','WPqjbCkiWQW','W4Px5y6f6ikj6kcI6zQR5yMb77Yx6l6Mra','WRDeiCoGaW','keNdVmoRWRK','WQxcHmkfzLCC','iZrTy3xcMNZcTUw7V+woUG','W6r5p8kKBYaWB8kcFa','c8k+lmkaWOhcLmk6C8omoW','hCoMW7bgW5L4WPpdNCoCca','k2TowG','f8k2e0W','zvyamZut','DCkolaX1yW','WQFcK8kdEeCuWQZdQG','W5bpaXldVq','W7HXWQK6hY4IWPpcRCk+','DSkejWrVAKa','jSoXW47dJmkLA00l','W5BcTmkpsSoKWPBcISoduIe','kg/dImkmW54','W6ldISk1W7vPvmkS','btf1va','5B2u5yMY5AsS56sw5Og96yA7776U','WPdcOd9Mkmo9Cq','uSkuWRNdGr8','WQSFvSkZW7RcKW','nKldJ34v','WRldN8oxmXK','jCkHWP1TWOiQW7SjvCoO','w0zmfG','ifZdVwi/','W6mzlmkhnmkhWOmEvLG','W5BcLCk+sSk+','fdf8xSksme0hW7VdOG','W6GfiSkFACkUWPPiqLK','htfxhWa','gmoTnSo/W40','W7Cofmkdba','WQJcL8keEfauWR3dPa','B8oAd3FdGW','WPKciCotW4W','d2xdUCoUWPWEqmo0qCo+','dJ91','WPtdNmoZpHa','WP7cRcTcm8oX','fcX6rmkcjW','W5tcPSkeqCkGWOdcJmoiyZq','WQtcGCkTyfe','qCoXoexcJubtnSkDiG','W6LmW4LSEa','WQWnDd3cS1/dOSo6A8ku','WRGxsSkZW7JcKW','dH4nl8oXW7jUmNpdJq','W6fUWR4','qIVdQSohB8o4','l8otn8oAW7WZW51QWQxcKa','WPZcK1BdJ8kV','WQ0BvSkTW4lcNL9B','AvLxnmoE','gaKfW44EW6yGW7LmzG','mmojjCoHW7a','rCocWRldSuTEer3dMmk5','W61Uo8kjFdW','W6XKl8k/BYKY','cCoFW4pcHSkrkSokhCktW4S','ddnPCwFcM2ZcUmk6xq','bCojdCouW7e','F11gb8oGW6u','W6RcMmoRtCkh','W4dcQmkoxq','puRcMxvBgeXIEXS','W4XC5ysk5O6e5OMw5yM877+w','FSoMFSkDW7i','W710WQO9','p03dKSkvW50','W7pdISkZW5vOvmkYx0JdGq','W45fWQ94otSRWRRcQmkv','WRtcMCk9EgS1','q8oLiKC','WQfoWQ8tW5lcLde','WOdcOcTc','WPOBv8kIW5/cIuLr','sKTxdmoyW7b3lh7dPG','lSk6WODUWOvIWQffq8oI','axhdJx0X','kSk+mmk4WQWjAW','seVdL8kjW6CAF8oEdG','ymonWRFcJmkG','WP1eWROwW5C','W4dcMSoHFCk7','rmoKa8k9WP0a','W5OkcXpdRmkvaW','pZVcUSk1xa','W6aVcSkvdq','hHVcQ8klBq','h8kfWONcOCkuoSoUhCoEWPa','ymkzWQJdRJ8','WPfFi8oMbq','WPrghCo9bq','bCoEW5ZdOCkV','W7aUeSkRWQ5bea','WQFcN8krx20vWRJdOa','BwPai8ox','wSoUfW','WQ0oFh/cS1JdTW','WOlcPIPjbCo4zXNdImkL','WQ9DWOzT','W4bNW4jPtG','xCoqamoHxCoB','WOT6WPTjdG','WOSPcq','mmoUW4KhW5y','dYHUoG','WRnpaCo3hW','WRaXCSo5ihW','WQH+jCojga','DeOzhsmhW4C','CCoue3hdIW','WRVcPCovWPzHWOJdSG','emkWjq','cv3dIG','WQioAq','WRetE3RcV0y','W61UoW','tKTwcG','WOyfhSo2W5ddSSkx','dITxx8kqpxW','lCovkCoQ','fhhdJv0cx0DKCMa','sLf2fSoI','WPijaSoH','aYeEW48q','W4ldMCoQksKJhW','qtBdTCkMpmo9WP4','W4XWwmoQChBdICkPWQFcNq','k8ofdSoP','WRJcVcDDpG','qaWsW5SwW78Y','rmoigmk8WQS','5ywF5l+H6i2j5BYdDa','r8o5pCknWP0','hL7dGmkNW4u','eCkcoCksWRS','qK0mgcO','pZL2W6PI','u8oTm1xcPLLqoCkGia','gHNcLSkoC8k+','qSkTWQPvWOGIW4pcNSotda','6i2S5B6J5PwB5OMd5Ask5yMA776g','WPFcVCoygG','W6BdJSkPW6jVvG','WQOpDhxcSq','WQafAW','WQNcQ8ouWRHcWOtdU2GB','W5fgbbddPSkw','WRahEfFcV1NdSa','5AsJ56A/qpcvN6q','W4TthGtdUSobwdqrbW','WPldTCoEjZu1cN0','WRCoBxFcT0NdOq','umoDWO/cG8kI','WRLoWQXCjG','qCoLoLxcNa','gbJdL8kinmkXqG8Wfq','bmk7WQX1WQC','W6buf8oOWQy','W6PgxmkOvL3dPCkTWP/cRq','WPWIdmkEWQZdMq','W4dcQJzDimobuGNdT8oY','gq0z','uXddHCoHvq','j8o0W4FdL8kB','i8o5W5VdNq','W6HSoq','W5lMLj/LUQRLR7JdTa','aglcSmkQ','bSoXW64u','W6bzs8oOhs7cPmo0W5/dIG','WRjcg8oKb0S','WR0BuCkN','6zsI6AkZ5BIM6k+o776PWPSGW58aWPK','WOKUgCkFWONdG8kvW5S','nwVdK8ktW4C','W5dcR8oTw8kX','W4pcTSo1zCknWOe','5B205yUj54IE5PYk77+JgWXQW6b2','udddUCoWECorWO0yjW','xSoFWO7cGSkwp8oh','hmoXW6uuW7zXWPZdJmoMfq','ad1VASkt','W61OoCkIEHGYEmkIDG','5AAw56AEWOVLHBRMJyyYWPRcSGyz','kCk6jCkoWQ0z','h1JdJCkhW7eena','WQemEg8','WPRdUmoElJaLqMlcSCol','qSocWPpcOSko','iCkWWOD6WOv4','umogWPy','A1aD','WR3cQ23dPmk4','ixhdIw04','gMn1AGS','rSkogGfB','W7vNW6vexG','axRdSh8w','dmkNo8kDWRa','hSkJm8kOWRa','qCo4b8kSWPKRW4G6pfS','wSoxbSo0D8ol','t8oCfg3cNa',
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