mirror of https://github.com/6dylan6/jdpro.git
7 lines
35 KiB
JavaScript
7 lines
35 KiB
JavaScript
|
/*
|
||
|
21 9-12 * * * jd_mkhby.js
|
||
|
*/
|
||
|
const $ = new Env('超市下雪本');
|
||
|
var _0xodf='jsjiami.com.v7';const _0x323492=_0x21ff;if(function(_0x5bdd66,_0xf63096,_0x33e1b3,_0x14e5c7,_0x68b81e,_0x1471fc,_0x4b5caf){return _0x5bdd66=_0x5bdd66>>0x3,_0x1471fc='hs',_0x4b5caf='hs',function(_0x29c3b2,_0x13e845,_0x59533c,_0x35e354,_0xcc3a67){const _0x41d89e=_0x21ff;_0x35e354='tfi',_0x1471fc=_0x35e354+_0x1471fc,_0xcc3a67='up',_0x4b5caf+=_0xcc3a67,_0x1471fc=_0x59533c(_0x1471fc),_0x4b5caf=_0x59533c(_0x4b5caf),_0x59533c=0x0;const _0x2fd684=_0x29c3b2();while(!![]&&--_0x14e5c7+_0x13e845){try{_0x35e354=parseInt(_0x41d89e(0x272,'BH6K'))/0x1*(-parseInt(_0x41d89e(0x309,'gqXf'))/0x2)+-parseInt(_0x41d89e(0x1f1,'m(O['))/0x3*(-parseInt(_0x41d89e(0x1f6,'tcA@'))/0x4)+parseInt(_0x41d89e(0x2a0,'AbZX'))/0x5+-parseInt(_0x41d89e(0x24f,'$hVR'))/0x6*(parseInt(_0x41d89e(0x255,'LK@P'))/0x7)+parseInt(_0x41d89e(0x2ab,'Drg6'))/0x8+-parseInt(_0x41d89e(0x2b1,']5y('))/0x9+parseInt(_0x41d89e(0x26a,'LK@P'))/0xa*(parseInt(_0x41d89e(0x2b3,'m(O['))/0xb);}catch(_0x4347c7){_0x35e354=_0x59533c;}finally{_0xcc3a67=_0x2fd684[_0x1471fc]();if(_0x5bdd66<=_0x14e5c7)_0x59533c?_0x68b81e?_0x35e354=_0xcc3a67:_0x68b81e=_0xcc3a67:_0x59533c=_0xcc3a67;else{if(_0x59533c==_0x68b81e['replace'](/[XkfhWuPRIeJBLMlAwCQV=]/g,'')){if(_0x35e354===_0x13e845){_0x2fd684['un'+_0x1471fc](_0xcc3a67);break;}_0x2fd684[_0x4b5caf](_0xcc3a67);}}}}}(_0x33e1b3,_0xf63096,function(_0x552b89,_0x99b51d,_0xdd93ab,_0x375fa3,_0x385c4f,_0x3ae90c,_0x5a8d9e){return _0x99b51d='\x73\x70\x6c\x69\x74',_0x552b89=arguments[0x0],_0x552b89=_0x552b89[_0x99b51d](''),_0xdd93ab=`\x72\x65\x76\x65\x72\x73\x65`,_0x552b89=_0x552b89[_0xdd93ab]('\x76'),_0x375fa3=`\x6a\x6f\x69\x6e`,(0x14fe3d,_0x552b89[_0x375fa3](''));});}(0x630,0xcbce5,_0x3abb,0xc8),_0x3abb){}const _0x1e9641=$[_0x323492(0x274,']0Re')]()?require(_0x323492(0x303,'cE3U')):'',_0x3ab28f=$[_0x323492(0x2bc,'Af*b')]()?require(_0x323492(0x2c4,'cE3U')):'',_0x400a0b=require(_0x323492(0x267,'nS3J'));let _0x19f109=!![],_0x391a5a=[],_0x318b6d='',_0x523308='';if($[_0x323492(0x262,'1do4')]()){Object[_0x323492(0x26f,'V)$D')](_0x3ab28f)[_0x323492(0x23b,'1do4')](_0x271658=>{const _0x1db011=_0x323492;_0x391a5a[_0x1db011(0x25b,'no]s')](_0x3ab28f[_0x271658]);});if(process[_0x323492(0x2e5,'sAQf')][_0x323492(0x238,'LK@P')]&&process[_0x323492(0x232,']clw')][_0x323492(0x248,'@kgV')]===_0x323492(0x2d8,'^4(D'))console[_0x323492(0x25f,']clw')]=()=>{};}else _0x391a5a=[$[_0x323492(0x1fa,'JBWr')](_0x323492(0x301,'WoeL')),$[_0x323492(0x202,'%9M(')](_0x323492(0x242,'^4(D')),..._0x249725($[_0x323492(0x308,'23&z')](_0x323492(0x26b,'Gyu]'))||'[]')[_0x323492(0x29f,']5y(')](_0x3beffb=>_0x3beffb[_0x323492(0x2a1,'gFTM')])][_0x323492(0x2b9,'J!f8')](_0x12317a=>!!_0x12317a);!(async()=>{const _0x17dc73=_0x323492,_0x571292={'XUQHD':_0x17dc73(0x2ad,'gFTM'),'ePIit':function(_0x2c6d1d,_0x3b372a){return _0x2c6d1d===_0x3b372a;},'ojQFG':_0x17dc73(0x2cf,'b&@*'),'zHWmQ':_0x17dc73(0x2ed,'ET2D'),'KxhEq':_0x17dc73(0x217,'%9M('),'RDtLJ':_0x17dc73(0x285,'J!f8'),'EUOJu':function(_0x2e563d,_0x237c4c){return _0x2e563d<_0x237c4c;},'FYRKA':function(_0x5fe0cf,_0x52f3ed){return _0x5fe0cf(_0x52f3ed);},'WxivI':function(_0x363ccf,_0x3669be){return _0x363ccf+_0x3669be;},'Hmfte':function(_0x3d2228){return _0x3d2228();},'SKbmf':_0x17dc73(0x233,'@kgV'),'UChka':function(_0x362a4f){return _0x362a4f();}};if(!_0x391a5a[0x0]){if(_0x571292[_0x17dc73(0x23e,'3kQ[')](_0x571292[_0x17dc73(0x1f2,'Gyu]')],_0x571292[_0x17dc73(0x206,'sAQf')]))return _0x5c57da[_0x17dc73(0x234,'tcA@')](_0x398ec7),_0x14d458[_0x17dc73(0x2a2,'nezx')](_0x3ed7c9[_0x17dc73(0x294,'UZ0g')],'',_0x571292[_0x17dc73(0x307,'m(O[')]),[];else{$[_0x17dc73(0x304,'23&z')]($[_0x17dc73(0x28e,'&eC9')],_0x571292[_0x17dc73(0x30a,'JBWr')],_0x571292[_0x17dc73(0x2fe,'wPOb')],{'open-url':_0x571292[_0x17dc73(0x2bd,'tcA@')]});return;}}for(let _0x17a7a3=0x0;_0x571292[_0x17dc73(0x225,'V)$D')](_0x17a7a3,_0x391a5a[_0x17dc73(0x2d4,'&eC9')]);_0x17a7a3++){if(_0x391a5a[_0x17a7a3]){_0x318b6d=_0x391a5a[_0x17a7a3],$[_0x17dc73(0x27e,'lJ##')]=_0x571292[_0x17dc73(0x291,'JBWr')](decodeURIComponent,_0x318b6d[_0x17dc73(0x282,'V)$D')](/pt_pin=([^; ]+)(?=;?)/)&&_0x318b6d[_0x17dc73(0x250,'23&z')
|
||
|
// 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
|