jdpro/jd_wanyiwan.js

7 lines
163 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
2024-09-06 14:14:20 +00:00
23 4,11 * * * jd_wanyiwan.js
2024-06-28 07:47:44 +00:00
*/
2024-08-27 23:26:51 +00:00
const $ = new Env('新版玩一玩');
2024-09-06 14:14:20 +00:00
const _0x5aa2=['v3fEoZhcR8oCW6awyq','AfO+WRC','vCo9WRKnWPa','c8oRlXS','a1zveYW','qIldGqldRmkfzvCYW6a','WQFcH0DUWOSg','dhnu','FCo5W6ZcP1K','CJPjWQhcRG','b8o6oa0umcRcM8otW48','ttpdGq','W45OfCo+jq','ytZdRXNdTG','mSoJfSoHW5q','W7xdHHLVW7CSWQRdIJVdUG','ebbplSkGlW','WRCBWO9wWQa','EsTRWOtcQW','vaxdNG','WQuevZGte8kvW4xcHSkO','E0FdVw0h','WQqdtYChqmou','n8o+wYpcNa','W7ldKZJcKSo6F8o6WRbSmq','eCoRiX4Ikt/cHG','hq1zimkgpSosbGTN','ahxdS1RdRGFdOq','WRRcIKHbW4v6','FeZdJv9WtmklBmoKwa','WQNdTMve','maKmW7GW','5y6E5ycv5lQg5yI15zo05yMD5yIJ','WPP1g8knna','WQPYm8kEW6e','bSolrZHpzq','W6ZdK0ZdQSkQWRHsrhhcOa','eftdMhajdSotdW','emopqcW','WOnpW7Ozqq','W6dcI0ZdTmopWRPoxw3cHG','c8o9W4mPhCodWPNdJq8g','cNVcI1i','W4ldVmoaW4O9W5G','utNcHG','a3ZdO3xdNG','cmoXW5KdxmkhW7S','WQbIW684qq','W7yyW4TWsrzDxJddMW','W7RcN0RdS8oXWR4','W45WkSo9dMZdOedcGHm','p1lcQCo5WPD3qCoqxCkW','EmoFWQmSWRWJ','WRCpWPHnWQm','fuJdU8kp','rhFdILaL','WRVdMmkJg8k3','f3DEnJRcGW','uSkGjCoVFq','Dva+WRbRiHy','W4pdRmoqW5SJW40p','wLhdH3yHWO/cMq','6isX5yQW5RAm5yMP6BQo5zgy5y605y2G6ysL5A2E','WRBdUSklemkq','pSoXWQ1XW7K0shZcLmkJ','nuvyir4','fvZdKhqPdG','bMxdS8oPW485','WQ3dTgLEtgddHwfMW6K','xYBdHr3dRCoCx2eoW5a','xWFdTYddIW','W7LVpmovhq','5y6f5lUI77YM57645yoK5Aw66lAz772Z5yEv5O62','W4hdNfVcRHiYWQiLWRqm','WP5JCaPR','ACoVW51BfhJdVru+W4q','W4PBW6THbW','W4FcM8ons8oNsG','WQT2Acb1WRGxmgNcJq','5yE85y6G776o','W60fW5HUx0GTbJNcNG','WQeFra0swW','WOb6pCkgW6tdN8o5W5W8ma','WRNcIu4','W5tdUmohW54','W5ZdTSouW7OJW54','pSoxorGN','hee1W44T','W7HDW5Pakmkatga','bxLRWRHA','cgpdRG','ACk3WP19qa','vmoVW6RdT8k4W4uhW7DfBq','WQL8sGHM','WOH+W7ycqCkPW4q','j2pdPSopW5u7gCkZmG','WQ8zwquttG','pLpdMMe4tSouaZBdKG','y8kXWQj8Aq','chDEmdFcKmo/','W7pcTLhdT8oI','dmoNzWrn','W5BdL1O','W5FdK3VcKmk6','DmkrWRvXWQi6bSkCuCku','xZH8WOtcRCkJW7W','W6OdW4v5rrW','W5JdRCohW48IWPzxWRhcK8kz','haPC','W6ZdIudcRHqWWO44WQW','xJNcJ39OWRxcKLXZW4y','W5HNpmkYxaVdPGNdGti','eGK/WPKUkeZcMtOh','rspdGttdS8ojCG','BbJdUr/dRq','W7W4sCo3FW','W4P/W4Pubq','WPfEmSklW7W','s8kVW47dSCo2WO49oW','FSkbWPDErYC','f2uCW79jimkJb8kUWOu','WQavudSbtSoF','vcyECwpdHSkRW7WPiH/dICo7','usf4WORcMW','W5pdRX0','ErNcJLXO','W7pcK1XJWObwFrjRWQu','WR50BYjpWRGqlq','BSkNWQ/cIehcGmoDWPKwgG','WPHYW780qSk5','WQqErY0y','bg5xWPHommkX','5y6d5ycWWPK','bxZdUCoiW5u9c8knh8ke','W71CW557sHDWtcRdGW','WRD9gCkUkZ0','bfVdOW','W6PHo8o3dflcOMZcGIm','fSoXaHqc','kHlcVCkXzSk5WRW','E8oDWRK1WQmKbCoyuSki','oSo5WOhcT2hcO8oUWRK','WRlcLeX6W4rgnaPXW6K','dLCIW5G2ocBcMYCb','cSo5W44Y','mCkDWOqIqG','CmkegSkhASoqW4BcMCoZlG','hIauW7O','W5xcNwVcOKy','W6xdISo2W60oW60/W5VcVmk9','jK5BWQ5C','WOTmfSkzeG','j8k/WRHOW6zWwwZcUCoQ','WOXVj8kHW6RdK8o5','W6WFW5H7xHDXxsVcPW','hK7dVguU','W7FcNhldS8oj','5ywp5l2m6iYc5B+LWQu','WQH6Eda','W4PYmCoMe03dQKC','xSovW5pcTvNdHq','lvZdIhVdOa','WPVdHSk6omk7','dr3dKgmT','imopqZFcJuddRG','WQqEvY0stmojWP7cHSks','mKtdImkGfG','W6KEW491CXfPDJ3cGa','56Yp5yIz5OQF5yMXxEIoHUw/Pa','WQdcILPqW4X8WOq','sG/dIbCKcmooDmkZhq','WQ5LCZP3','jCo7zrHA','gZOjW5iuWPxdNW','W5FdSmovW4SyW4iEW7e','E1O/WRa','6lYw5ysu5QoQ5l+W5Psv5yE35A67i+w6OUITGa','WRTXCdnl','WR10Dt0','fSoQWQ1EW7O','WRRdKhhdLmkowSk2W4u','imocFIRcTG','WRldUgS','ESksamoiDq','W4b8W7zXaCk2','W6hcQ1JcKw8','bxVdQmowW5G','WQL5gCkTmdG','yCoIW4dcR8kMW4GpBwtdVq','WOn5W6GKvG','WR8rtsWpra','gmozvtBcOKBdPMS','5AAC56w9ppcTNQG','kfddGSkfoq','W5FcLMpcIKa','WOtcRL5sWQG','WR84WQT2WO4','eJOrW7GXWPa','WRhcNffFWQm','uGFcShr4','prfdaSkM','W6KEW4S','W57dIKS','WPL/WRDHz8kJW5vQW6n4','nLTNfW8','mCk6WQK7uW','WOjLmmk3','f8oRFaRcVhddIeVdImkf','WQZcJK9v','ySk9WQNcL3hcLa','W5yWW517ya','cvRdTc8ykmo9oa','WQnYCIrMWR8xegG','n8oMWQ1OW7XNeYRcRCk1','W4NcTmosW5G0W4im','x8oDW4pdRmkw','gbr+iSkAimoWgYTN','uhNcG2L9WQNdIeXUW44','ACkcW5mssG','e8oVdSoWW6K','gmolwIPxEq','44gK5O6F56wh44kf6k6p5yA86iYp5y6b5lM25lIp','WQH8CI1uWRGxmvRcMW','geJdNgGL','xSozW5pcUwtdIq','rSkeq8omAmo7WPxcI8kUEa','fhxdPbpdQrBdTmkKccO','WQVdPgLcbfldLMv8W6G','W6pdQLhcG8ki','WPddHSksemk7lfiHWO7dSq','WRj1W64cxG','FSkygSomk8kFW4BcMCo5Bq','rmozW4/cRxNdJSoP','aY4tW60rWOpdMtNcHwa','nHORWRzKjGDnW4S2','WOSZWPycvq','ACkoWQLhCG','bSoluIHrDmo5','DbhcG2f6','WRGOWQ8aFG','fftdS30u','kColrcu','BK8vWQXC','W6ddQmoCW50M','W5/dLKS','W5BdVH3cPmovtq','B8kdkCo2uConW5JcMCo0oq','W
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