jdpro/jd_wyw_help.js

7 lines
117 KiB
JavaScript
Raw Normal View History

2024-07-19 09:37:29 +00:00
/*
1 6 29 2 * jd_wyw_help.js
*/
const $ = new Env('玩一玩_指定助力');
var _0xodl='jsjiami.com.v7';const _0x1afbf6=_0x3c87;(function(_0x5eafc3,_0xecb690,_0x1d2290,_0x294ae7,_0x1d6c6d,_0x4a0c20,_0x1a2738){return _0x5eafc3=_0x5eafc3>>0x4,_0x4a0c20='hs',_0x1a2738='hs',function(_0x4f4308,_0x4173af,_0x186433,_0x19493f,_0x115359){const _0x10d6af=_0x3c87;_0x19493f='tfi',_0x4a0c20=_0x19493f+_0x4a0c20,_0x115359='up',_0x1a2738+=_0x115359,_0x4a0c20=_0x186433(_0x4a0c20),_0x1a2738=_0x186433(_0x1a2738),_0x186433=0x0;const _0x2b7314=_0x4f4308();while(!![]&&--_0x294ae7+_0x4173af){try{_0x19493f=-parseInt(_0x10d6af(0x35c,'Ydjg'))/0x1*(parseInt(_0x10d6af(0x26a,'dhGJ'))/0x2)+parseInt(_0x10d6af(0x4ef,'Y)nc'))/0x3*(-parseInt(_0x10d6af(0x6a9,'JbI4'))/0x4)+parseInt(_0x10d6af(0x1d6,'fB7t'))/0x5+-parseInt(_0x10d6af(0x298,'fGNU'))/0x6+-parseInt(_0x10d6af(0x2ff,'JPg2'))/0x7+-parseInt(_0x10d6af(0x42d,'**(u'))/0x8+parseInt(_0x10d6af(0x4db,'^hFY'))/0x9;}catch(_0x2c22b8){_0x19493f=_0x186433;}finally{_0x115359=_0x2b7314[_0x4a0c20]();if(_0x5eafc3<=_0x294ae7)_0x186433?_0x1d6c6d?_0x19493f=_0x115359:_0x1d6c6d=_0x115359:_0x186433=_0x115359;else{if(_0x186433==_0x1d6c6d['replace'](/[TKAWVPOnqueNpJdYXfCM=]/g,'')){if(_0x19493f===_0x4173af){_0x2b7314['un'+_0x4a0c20](_0x115359);break;}_0x2b7314[_0x1a2738](_0x115359);}}}}}(_0x1d2290,_0xecb690,function(_0x37e17b,_0x1270a0,_0xb7b986,_0x1eb2d9,_0x4eef5f,_0x108005,_0x26a9a8){return _0x1270a0='\x73\x70\x6c\x69\x74',_0x37e17b=arguments[0x0],_0x37e17b=_0x37e17b[_0x1270a0](''),_0xb7b986=`\x72\x65\x76\x65\x72\x73\x65`,_0x37e17b=_0x37e17b[_0xb7b986]('\x76'),_0x1eb2d9=`\x6a\x6f\x69\x6e`,(0x179c5c,_0x37e17b[_0x1eb2d9](''));});}(0xc20,0xcb735,_0x2764,0xc4),_0x2764)&&(_0xodl=_0x1afbf6(0x3d6,'XmPC'));const _0x5b1ac2=(function(){const _0x1935ed=_0x1afbf6,_0x442227={'ayAhI':function(_0x35e47b,_0x357ca9){return _0x35e47b!==_0x357ca9;},'bgPNi':_0x1935ed(0x2e0,'VJW^'),'RkmvE':function(_0x54ad43){return _0x54ad43();},'Jjqik':function(_0x4ae353,_0x54d2bf){return _0x4ae353===_0x54d2bf;},'DfJQl':_0x1935ed(0x3a2,'XK3h')};let _0x4b346a=!![];return function(_0x56219b,_0x30e41b){const _0x5864cf=_0x1935ed,_0x573d03={'VZGDv':function(_0xfbbe75,_0x1f133b){const _0x3370b8=_0x3c87;return _0x442227[_0x3370b8(0x733,'rNEO')](_0xfbbe75,_0x1f133b);},'GRYki':_0x442227[_0x5864cf(0x1c8,'fB7t')],'WOhpX':function(_0x4af0fa){const _0x35d55c=_0x5864cf;return _0x442227[_0x35d55c(0x6ae,'fGNU')](_0x4af0fa);}};if(_0x442227[_0x5864cf(0x4c5,'^hFY')](_0x442227[_0x5864cf(0x250,'y^oz')],_0x442227[_0x5864cf(0x436,'O$N&')])){const _0x17d212=_0x4b346a?function(){const _0x3a7513=_0x5864cf;if(_0x30e41b){if(_0x573d03[_0x3a7513(0x6c5,'i7$@')](_0x573d03[_0x3a7513(0x517,'^*AH')],_0x573d03[_0x3a7513(0x72c,'JbI4')]))_0x9c8981[_0x3a7513(0x5a0,'LjJ^')](_0x25ce7b[_0x3a7513(0x1c9,'nJtN')]);else{const _0x53b205=_0x30e41b[_0x3a7513(0x37c,'i7$@')](_0x56219b,arguments);return _0x30e41b=null,_0x53b205;}}}:function(){};return _0x4b346a=![],_0x17d212;}else _0x573d03[_0x5864cf(0x1ff,']PaT')](_0x40e948);};}()),_0x482723=_0x5b1ac2(this,function(){const _0x522549=_0x1afbf6,_0x4f9bc6={'CJQpA':_0x522549(0x352,'bWuw')};return _0x482723[_0x522549(0x73c,'dhGJ')]()[_0x522549(0x33c,'8HO8')](_0x4f9bc6[_0x522549(0x70a,'^*AH')])[_0x522549(0x226,'fB7t')]()[_0x522549(0x68a,'UwAJ')](_0x482723)[_0x522549(0x1d0,'**(u')](_0x4f9bc6[_0x522549(0x3b3,'fB7t')]);});_0x482723();const _0x389188=$[_0x1afbf6(0x685,'8HFb')]()?require(_0x1afbf6(0x36b,'giUp')):'',_0x14f7c6=$[_0x1afbf6(0x6b3,'Nvo0')]()?require(_0x1afbf6(0x33e,'b@g$')):'',_0x47a783=require(_0x1afbf6(0x67f,'bQQ#')),_0x431caf=require(_0x1afbf6(0x41d,'VV%P')),_0x5486fb=require(_0x1afbf6(0x664,'@U5s')),_0x14709c=process[_0x1afbf6(0x387,')cT)')][_0x1afbf6(0x3a0,'t1Fy')]?process[_0x1afbf6(0x3cc,'8HFb')][_0x1afbf6(0x429,'nJtN')]:_0x1afbf6(0x6cc,'JPg2'),_0x2f4905=process[_0x1afbf6(0x5e1,'$N(C')][_0x1afbf6(0x23b,'@U5s')]?process[_0x1afbf6(0x3f9,'O$N&')][_0x1afbf6(0x2f9,'b@g$')]:'1',_0x23abef=process[_0x1afbf6(0x3c6,'Nvo0')][_0x1afbf6(0x281,'p2fR')]?process[_0x1afbf6(0x1a5,'2cU]')][_0x1afbf6(0x1ec,'VV%P')]:_0x1afbf6(0x392,'UwAJ');let _0x1ba02d=_0x1afbf6(0x467,'pxo0'),_0x3b3e38='',_0x3a0faa={};if(process[_0x1afbf6(0x647,'LjJ^')][_0x1afb
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