jdpro/jd_wanyiwan.js

7 lines
146 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
23 5,10 * * * jd_wanyiwan.js
*/
const $ = new Env('玩一玩_任务');
2024-06-30 10:40:42 +00:00
function bdy_0x2f18(){const _0x316f79=['WP/dT8oQW5rEW5u0','v8oeWOhcUXnz','WPldUmo0rG','Fmk1WQ9MW4iw','WQmfhmkyoG','oJVdUbZcIJbTW5bgW4RcUMxcUt92lmkBqrKw','bWRcObxcN8k9WQJdTmkqWQK','ie7dNmkHh8oGWOXFW5Xa','ACkLaCoiW7O','W7ddRSkgFG4','W4pcGCkZfrq','W5dcKCoGr1GbW6ldHmkf','pCogWRi','W5DbrLldVW','BXhdVvDN','W6/cJmk6yXpdK3q','w3dcNNxdQMLdW7iLW70','ErxdMGFdSq7cMCkBW4lcMCkMW4pcNbhcSmkVWPi','WOZdNLznsSoIW5q','W53cR8kZWR8FWPLz','CCkGWR5Q','rCkxWRVcQMddRCkgFW','DHXeW6NdMG','W7/dKblcV8kcgb3cSmkmW5PEWRBdLq','5y2f5yUg5yEbW4qXWO8B','W4WkW7POW7ZcVmkMgWRdHM/dKSkiW40','gNPtW57cJmohW58xsSkiWOBdPNnvW43dIG','ceeQW7igqCoA','rx7cHhddUgLzW7CPW6miDG','WOZdG1LowmoVW59Z','q37cIG','eCk1wmkGW5iQaCkio8o/fq','tCoQWOxcMsK','bcVcUJVcNa','5Asg56EDhFcGN7i','qSohfSo6ja','dL0QW6Kw','EW5PW7q','W5NdQvXSWP7dNCoPW40izCkCWPi','WPucW54eiq','WOpdQSo/W7LxW7G2jNPdWR/dQMW','WRbcj8kcvHJcQNe','W5BdOCoYW7TxW5ONFw9NWQBdQ2ZcPCoYWO/dNSk5WQfPyCk4xmk7WQBcLbRdQW','x2pcHgtdI0jwW74P','W5zoW7joW7xcVCkX','qCorWP3cVqS','WRRdKSo3BJy','kSkCwrilWPC','nIpdHbNcVa','W6lcOSoFtLW','WOGdW5BcL3xdNLu','Db9TW6xdMmkVWR0k','hCkbWR5ty11UWRrn','yNtcS8oiWQ1l','tmopWPhcOGPjW4LK','tmopWPBcQWDIW4O','WO/dN8kTdG','nSomWQfmCqddVq','fvSNW6qo','WPtcUSkHdY7cOsGAWQ8eW4P1W7ZdNWTpW4ddM2NdPmkAW41AWOaYCJPSvX7cICkxkrmrzSouWRhcLCoFWPtcVGXsWRn5WPaOqSoPW7zWWQ4HbSo7pmk5AY1MW4mkkCkFWQVdMSkhF8olC8oEWQldLSkHWOH9WRFcOCooESoeWQe','dSk1xmkYW4ePmG','WRqmW5BcQmo6','hJFcHqxcHW','vdbtW60','WQtcPtnYW59qA8oXsgNcPSoagSkT','tghcNMRdNa','W6baW4PeW7C','WPNdRmoUW6Dg','WPCKW4Ooaq','5lYW6kEc5B6S5Ocf55295lMo5lQG5zgs','ag/dQmkJpG','W4VcRCk4lcJdLK5XeSofosldNf/cHmoUu8oiW5JdPXug','pComWRTjAGW','WO8to8kgcmobfa','WPJcSHOuv8o8WRi','wWnqW6JdMq','5lQF5y+O5lIj5yQV6lAt6l2O','W67cTSoMWQCtmJWuW64','W7zkW4rpW5y','WOeqW7NcGSogjq','WRZdL8o0wIq','562N5yUG5OU35yIJrEImLEw+Sa','BmocWRBcJXm','WRddRgHJya','WReYWRDZWQxcU8kHnv9vCCkReCksW5ZcOvfpua','WQlcMIBcNSkKiG','bCo2j8ollG','WPfXWQW','FSo1WRBdKaO','WOCEW53cTCoMbG','WP3dJmk2n2hdTa','WRVcRZC','W40pWRr4W58','yKBcKSomWP0','emkKtSk1W5u9fmkgm8oV','nSotWRXEmKtdOgL/W7xcMCkzcCk+WPr6WPy','xNtcMmovWODprCoo','mSkvymkdW4W','sI7dJMXu','W4RcLSoZtgGlW7ddGSkshfVdVSoQlmkNDM0','WPZcSGKxsCoV','lg0EW44RD8oLW7JdHbi','rmkQkCoe','pe7dIW','WOmCgmorWRu','vIveW5ldI1O','W5/cVCkNfspcONa','WR5KvKldLXJcJqmnW5Oa','ymo7WQJdRIW','WRRdU8oYW6bB','gCk+WRT3CW','nSkAWQviEqiYW5fOWR8loH9Ib8ovESkVWRVdN8ocECkokKChW5dcT18KzmkKWQui','lCklDHyy','WOeEW4dcUSoDeSk/FW','WPKAW53cTSo9aW','W67cPmk6qCkzeHTrx8omk8kVWONcNSoFWRzAWRdcIG','o8o/j8oTlW','putdN8kff8oPWO0','W6BcS8kRrCkMhW','W4ZcR8kpECkg','W7pdMmkg','W5/cUSoGWRqZ','qwJcUSoPWQ8','WPOdW4BcKq','W6a8uvVcNKBdMvjqWOXm','FqPLW7xdKSk2WQS','kCogBWqy','n8k3WRHutq','pg3dUCkgla','nNlcQXy1BMqFWQvoWRuztG','WRmbW4VcQM0','lmklWQzzEfXoWOPOWRSh','W514W6uSbSkBk8k+ymosWOddVSom','rWddLGpcQa','WPn8k8kyAq','i8omWQzBCHa','z8kHc8o7W5ZdSh7cGW','WPtcVX0Nwa','umkIj8oyW4e','W7JcQ8kyEYK','5lM75lUC6lw25y6O','WRfcl8kxCXRcTq','WO8oi8kmhConcCk0bN5AWPKO','feadW7aR','isRdRr7cMMi','WRZdLCo/DbK','lmoPhCki','WQOXhCo0','u8o0cSou','WPJWUA6e','jmoutHynWONcQSo9','qUwmS+waS+s4KUwiPCkke8k7','W6yBCq','W5ZcGSobWOWU','WPafjCkAbSohfa','sCooWPu','5ywi5l646i2t5BYmDa','W5DiW6z+W67cQ8kHhqZcHg0','W67dI8kqDYu','pmoAwG','W74UWQf1W6W','WOZdNNznsSoIW5q','fKCU','amkXq8kT','C8k8WPBdRHK','W4zgW6zPW7xcTa','W51LCuFdLG','smocWPZcPG0','W7FdLCktFchdMW','gqldRstcNW','whdcHgO','ut5mW5BdNa','W7fIB0tdLeZdMW','iKtdM8kxbmoQWR5rW4DgdG','W6ddLmkFAW/dMHu','WO4jW5tcS3xdN189WO3dMa','WO5RWPXRzq','WO8+pmodWOS','WPBdIfLnq8oVW7zPWR/dTmo8nW/cUq','W7rS5B6K5AsV5yAz6ygz5yQs5yUjW5tcHqS','WPCwW4NcKSoMd8kQ','WP5KaSkhCG','WP0hW5dcH3q','qCkGl8objq','zIBdR0LWpYqLWO5wWOWZDx7dPMtdUCkJca','W7X2rL8','f1SUW5qrqa','WOyHmSoCWPi','WQtcJsS','W4NcNmoywNibW7pdQCkmk0pdSmoQeG','eSogWP1Fra','lv4XW4Cq','WRlcRJq5W5vuEa','xxdcG3RdGwe','dSk7wZKe','zsrZW4JdIG','W7yWWQfSW6e','WQK7emo1WOG6W5zUfuzSW6dcHXpdGG','W7RdV2n0WP8','y8k3vCk2W5i','x3dcN23dIW','W5/dTLT9WPu','gxPoW4ZcP8oFW58lCq','wYDEW7ddJfVdRSkVka','W7aLWQvKW7NdV8oW','bmkThCoTmcBcVbG','WOhdNN9KAq','x8oWeSofiaK','W4hcLCkct8kI','eahdNWhcVW','W4VcISocWO07ba','q8oWdCob','g8k7WRT6BW','WRnknCkx','WO3dLbVdH8oNygRdJSoXW4rXW4/dVmoGWOZcRduPd8oxW6ddRCoCANDqWOzgmmoqa8oY
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