jdpro/jd_wanyiwan.js

7 lines
118 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
23 5,10 * * * jd_wanyiwan.js
*/
const $ = new Env('玩一玩_任务');
2024-08-17 07:14:20 +00:00
var _0xodX='jsjiami.com.v7';const _0x4b7e75=_0x1bd9;(function(_0x2c61f3,_0x4fab59,_0x31a31f,_0xe38571,_0x5cdfcd,_0xbc9231,_0x3dd3e9){return _0x2c61f3=_0x2c61f3>>0x9,_0xbc9231='hs',_0x3dd3e9='hs',function(_0xa83204,_0x15aa4f,_0x376841,_0x5d9e44,_0x486084){const _0x4db54b=_0x1bd9;_0x5d9e44='tfi',_0xbc9231=_0x5d9e44+_0xbc9231,_0x486084='up',_0x3dd3e9+=_0x486084,_0xbc9231=_0x376841(_0xbc9231),_0x3dd3e9=_0x376841(_0x3dd3e9),_0x376841=0x0;const _0x1d9187=_0xa83204();while(!![]&&--_0xe38571+_0x15aa4f){try{_0x5d9e44=-parseInt(_0x4db54b(0x1b7,'NJkP'))/0x1+-parseInt(_0x4db54b(0x3b1,'KoIN'))/0x2+parseInt(_0x4db54b(0x472,'Pz6z'))/0x3*(parseInt(_0x4db54b(0x111,'tS#('))/0x4)+-parseInt(_0x4db54b(0x5b3,'A9lv'))/0x5*(-parseInt(_0x4db54b(0x20b,'NJkP'))/0x6)+parseInt(_0x4db54b(0x1a5,'fxST'))/0x7*(-parseInt(_0x4db54b(0x2ed,'ESb^'))/0x8)+parseInt(_0x4db54b(0x40d,'7e%m'))/0x9*(parseInt(_0x4db54b(0x2eb,'ZY1l'))/0xa)+-parseInt(_0x4db54b(0x5f5,'KoIN'))/0xb*(parseInt(_0x4db54b(0x106,'qvU2'))/0xc);}catch(_0x5e56b5){_0x5d9e44=_0x376841;}finally{_0x486084=_0x1d9187[_0xbc9231]();if(_0x2c61f3<=_0xe38571)_0x376841?_0x5cdfcd?_0x5d9e44=_0x486084:_0x5cdfcd=_0x486084:_0x376841=_0x486084;else{if(_0x376841==_0x5cdfcd['replace'](/[tgPkfpAUGBDQWxbKLMTr=]/g,'')){if(_0x5d9e44===_0x15aa4f){_0x1d9187['un'+_0xbc9231](_0x486084);break;}_0x1d9187[_0x3dd3e9](_0x486084);}}}}}(_0x31a31f,_0x4fab59,function(_0x324888,_0x50adfc,_0x15d2dd,_0x4ce6d9,_0x5a1d79,_0x5944cb,_0x4fc2d7){return _0x50adfc='\x73\x70\x6c\x69\x74',_0x324888=arguments[0x0],_0x324888=_0x324888[_0x50adfc](''),_0x15d2dd=`\x72\x65\x76\x65\x72\x73\x65`,_0x324888=_0x324888[_0x15d2dd]('\x76'),_0x4ce6d9=`\x6a\x6f\x69\x6e`,(0x17e87b,_0x324888[_0x4ce6d9](''));});}(0x18e00,0x532ff,_0x2acb,0xc9),_0x2acb)&&(_0xodX=_0x4b7e75(0x61e,'^sgq'));function _0x2acb(){const _0x2cdffe=(function(){return[...[_0xodX,'MKpjPtxsjWQifAamfQWi.DUcboAMmg.kBvrLK7GT==','WQldQ8ohyCkJWO95bqVdRCkwWRvjWOCbWPLX','aCoMowRdPq','W5L1W5jxW6K','z8o8WRC9WPa','FCo/ASo5o3LwW5Oji8kSW4H7W5hdHSkpWOe','CmkcdvdcPXPuW4i','kCkIWO7cVSkV','v8kuh0pcMX9QW5nLpXK','jhqgWPL3hq','W5Tfru/dRW','W5VdG8oHpmoL','vmkMsrmCtSkawKmsnCkVWPZcTCkVW6WrfvldKmoYo8kuWRL0W5zmqG','WQWpba','WQ8+jgfH','WOmpdmkNW5zjhvuq','tmkmWPXrW7NdQCkx','W4bbwKddRGRdP0xdJmoTnXC','q8o9CSkgW6m','lSk7WQJcMmkY','5y2a5yUH5yEzWO0nk8k2','WPaqW7/dP0e','WO4KfCkgW5C','WRG4gCk9W6y','lmkvWQONW4C','bmoIW5i','W5VdPmogimohaq','WPOHWRXwsW','z8oTpSommqq','5y2T5lQX776z57+05ykq5AEg6lwG77YI5yEV5OYZ5yAo5y6C772H','W7nCW4FdK8k6','W41uwL7cLe/dRutdJ8oZhWCpWRBcISkDW4m','W79Pih3dVZGjbmoTcq','CxFdHSo7','va7dHmofka','vMCk','oJ/cOXRdHG','cMWBt8o9','W5HVW4idkG','nSkRWRaZW5FcRmocWOC','n0a9','dmkekSkrW6lcQs3cKG','yZ9JWPGG','WR3dLSo0u8kh','v8ohW6pdTSkoWPK','iLGtW4JdQG','w8kOvbndvmolefywo8kRWPtdVmoIW6Wg','W5LzwL4','xSkPDSkWg159WO8gWPK4WOZdLmoTWOdcTsK','WP57k8ofrG','mSkWW4BdLmop','pCo5jftdLG','W4RdQ0W','WQaaWRvuC8ocosW','WQnrW7xcNXXY','DhNdJSoTtG','qdtdVCo0nG','amoIW63cSJq','bmoZpg7dSGtcTmo4ESohqwBcMJZcHSoHm8o3rY/dO8ogvIffWPNcMW','W6fNpu8','W4NdHSkhWPm','WO5apmooFrZcQ3JcLdtcSLa','W7jpW4ddJ8oUkYS156wk55wk6BU25y6l57YG57+25lQHW4i','yqv7WOhdKG','c8kvnCktW5O','W7vma0ldJa','WQpdTSoYzCkNmtxdOSko','hmoYlMVdRKS','q3WpBq','WQGklSkTW40','W7nEW69mW7lcKYa','ALtcQvKVWPhdUYBcLmo7W5hdRmkWnG','WO/cUmkkkq','fCkiW7hdT8oYla','xCkKy8kyca','WQX6oSoOxa','tqZdUmoqiq','tmorW57dRmkgWOG','WOHIj8ouFq','WO5jW7hcObi','DfpdU8oXuq','WPxdRrxcLCodW7CUWQSJ','W4b1W7/dV8kktMjzWP4SCW','E8ksBSkCgq','W67cRCoBv8kIWOHO','bSkIaI/cRa/dS8ky','WRFdQSousSk4','5AE656wdWQBWOA+W','d8oNlxldQ1ZcVmoCE8ohqsZdMsddGCk4DCo0fhVcOmkyvwuzW4FdHrfvWPSzoSk5','z8o4ECoYoMHeW5OpaG','nSkNW5xdHCou','DSoYW4pdQ8kf','WQRdRSoyFCk6','BIL1WR3dQa','rM4Utmko','bvq6WOb3','WOZcUmkqnSkGlSkuyG','gmkaWOpcLSkO','WPyJW7/dTxm','ySkur8khnNPjWR47WP8','pCkSWQKCW43cRmoc','5ys65l+F6i2K5B+iWPG','dSkAW5pdVmo6kcC','hSkIWPOTW48','FmoSvCkjW7j1','m8kcWPBcJCkz','qwWpCmojEa','WOxdRrlcNW','yrfGWQJdJ8kDW4ldQW','q8kOuCkHgW','5BYf5yMC5AsJ56Ae5OcG6yAM77Yh','DCkii3JcIa','WPK2nx5n','sqv/WOSe','vefLxCkx','bCo+W5i','t33cVeu3','WOddGmodu8ke','C2rMBCksW6TDWOjHW60','W5xcTmkJWPZcMYVdMW','chm8vSoY','WR3cGZZdGmkZW5aE','W6THnv4','dmkoWQBcUmkt','r
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