jdpro/jd_jlychl.js

8 lines
72 KiB
JavaScript
Raw Normal View History

2024-01-24 11:51:54 +00:00
/*
45 7,20 * * * jd_jlychl.js
*/
const $ = new Env('集龙运抽好礼');
var _0xodp='jsjiami.com.v7';const _0x34bfef=_0x13f7;(function(_0x5a8164,_0x45c218,_0xd0da7f,_0x2fdef5,_0x20d43b,_0x2ad41a,_0x4a08b5){return _0x5a8164=_0x5a8164>>0x6,_0x2ad41a='hs',_0x4a08b5='hs',function(_0x3e9823,_0x106640,_0x1abd71,_0x5ac4c6,_0x162424){const _0x5d963c=_0x13f7;_0x5ac4c6='tfi',_0x2ad41a=_0x5ac4c6+_0x2ad41a,_0x162424='up',_0x4a08b5+=_0x162424,_0x2ad41a=_0x1abd71(_0x2ad41a),_0x4a08b5=_0x1abd71(_0x4a08b5),_0x1abd71=0x0;const _0x11d8a6=_0x3e9823();while(!![]&&--_0x2fdef5+_0x106640){try{_0x5ac4c6=-parseInt(_0x5d963c(0x203,'i*XG'))/0x1+-parseInt(_0x5d963c(0x35d,'cdg9'))/0x2*(-parseInt(_0x5d963c(0x1a2,'rWv2'))/0x3)+-parseInt(_0x5d963c(0x26a,'7BNj'))/0x4*(-parseInt(_0x5d963c(0x3b5,'Wz8W'))/0x5)+parseInt(_0x5d963c(0x193,'^4qB'))/0x6+-parseInt(_0x5d963c(0x227,'oE$6'))/0x7*(parseInt(_0x5d963c(0x255,'Yh2l'))/0x8)+-parseInt(_0x5d963c(0x13f,'S6U['))/0x9+parseInt(_0x5d963c(0x202,'eW1a'))/0xa;}catch(_0x444f34){_0x5ac4c6=_0x1abd71;}finally{_0x162424=_0x11d8a6[_0x2ad41a]();if(_0x5a8164<=_0x2fdef5)_0x1abd71?_0x20d43b?_0x5ac4c6=_0x162424:_0x20d43b=_0x162424:_0x1abd71=_0x162424;else{if(_0x1abd71==_0x20d43b['replace'](/[QdWSXVLyuEOGwCBgYtP=]/g,'')){if(_0x5ac4c6===_0x106640){_0x11d8a6['un'+_0x2ad41a](_0x162424);break;}_0x11d8a6[_0x4a08b5](_0x162424);}}}}}(_0xd0da7f,_0x45c218,function(_0x38866d,_0x43d936,_0x510b51,_0x2e8d36,_0x524801,_0x56c876,_0x4d1e65){return _0x43d936='\x73\x70\x6c\x69\x74',_0x38866d=arguments[0x0],_0x38866d=_0x38866d[_0x43d936](''),_0x510b51=`\x72\x65\x76\x65\x72\x73\x65`,_0x38866d=_0x38866d[_0x510b51]('\x76'),_0x2e8d36=`\x6a\x6f\x69\x6e`,(0x151cd1,_0x38866d[_0x2e8d36](''));});}(0x3040,0xcf99e,_0x15e5,0xc3),_0x15e5)&&(_0xodp=0xc3);const _0x2b4ac1=$[_0x34bfef(0x2b6,'mrV(')]()?require(_0x34bfef(0x224,'0Nnm')):'',_0x2259ff=$[_0x34bfef(0xed,'S6U[')]()?require(_0x34bfef(0x286,'vBfF')):'',_0x4e6644=require(_0x34bfef(0xd6,'[8L^')),_0x421246=require(_0x34bfef(0x20c,'row0'));let _0x5f00bf=!![],_0x58ae04=[],_0xbf3355='',_0x4b5060='';function _0x13f7(_0x247432,_0x3e3dd1){const _0xfd46f1=_0x15e5();return _0x13f7=function(_0x2428fd,_0x3832b6){_0x2428fd=_0x2428fd-0xb3;let _0x15e552=_0xfd46f1[_0x2428fd];if(_0x13f7['nNAYCz']===undefined){var _0x13f723=function(_0x1d845c){const _0x12d5b0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x568cd1='',_0x3d9102='',_0x2cf14b=_0x568cd1+_0x13f723;for(let _0x485f6e=0x0,_0x38b7ec,_0x157312,_0xc543db=0x0;_0x157312=_0x1d845c['charAt'](_0xc543db++);~_0x157312&&(_0x38b7ec=_0x485f6e%0x4?_0x38b7ec*0x40+_0x157312:_0x157312,_0x485f6e++%0x4)?_0x568cd1+=_0x2cf14b['charCodeAt'](_0xc543db+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x38b7ec>>(-0x2*_0x485f6e&0x6)):_0x485f6e:0x0){_0x157312=_0x12d5b0['indexOf'](_0x157312);}for(let _0x363360=0x0,_0xf842f3=_0x568cd1['length'];_0x363360<_0xf842f3;_0x363360++){_0x3d9102+='%'+('00'+_0x568cd1['charCodeAt'](_0x363360)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3d9102);};const _0xa7b980=function(_0x2bcb9f,_0x1a75b9){let _0x7a1184=[],_0x81fbc4=0x0,_0x28b64e,_0x487938='';_0x2bcb9f=_0x13f723(_0x2bcb9f);let _0x49c202;for(_0x49c202=0x0;_0x49c202<0x100;_0x49c202++){_0x7a1184[_0x49c202]=_0x49c202;}for(_0x49c202=0x0;_0x49c202<0x100;_0x49c202++){_0x81fbc4=(_0x81fbc4+_0x7a1184[_0x49c202]+_0x1a75b9['charCodeAt'](_0x49c202%_0x1a75b9['length']))%0x100,_0x28b64e=_0x7a1184[_0x49c202],_0x7a1184[_0x49c202]=_0x7a1184[_0x81fbc4],_0x7a1184[_0x81fbc4]=_0x28b64e;}_0x49c202=0x0,_0x81fbc4=0x0;for(let _0x2c9af7=0x0;_0x2c9af7<_0x2bcb9f['length'];_0x2c9af7++){_0x49c202=(_0x49c202+0x1)%0x100,_0x81fbc4=(_0x81fbc4+_0x7a1184[_0x49c202])%0x100,_0x28b64e=_0x7a1184[_0x49c202],_0x7a1184[_0x49c202]=_0x7a1184[_0x81fbc4],_0x7a1184[_0x81fbc4]=_0x28b64e,_0x487938+=String['fromCharCode'](_0x2bcb9f['charCodeAt'](_0x2c9af7)^_0x7a1184[(_0x7a1184[_0x49c202]+_0x7a1184[_0x81fbc4])%0x100]);}return _0x487938;};_0x13f7['eSMNuW']=_0xa7b980,_0x247432=arguments,_0x13f7['nNAYCz']=!![];}const _0x3a532d=_0xfd46f1[0x0],_0x3b7e8a=_0x2428fd+_0x3a532d,_0x5045e2=_0x247432[_0x3b7e8a];if(!_0x5045e2){if(_0x13f7['qYzMaq']===undefined){const _0x47ae64=function(_0x213d56){thi
// prettier-ignore
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } 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.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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) 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(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d