mirror of https://github.com/6dylan6/jdpro.git
6 lines
42 KiB
JavaScript
6 lines
42 KiB
JavaScript
|
/*
|
||
|
5,35 20 * * * jd_mkredrain.js
|
||
|
*/
|
||
|
const $ = new Env('超市红包雨');
|
||
|
var _0xodL='jsjiami.com.v7';const _0x5308e4=_0x4db9;(function(_0x560fdc,_0x316139,_0x50aa02,_0x3d9fa3,_0x3ef02d,_0x45683a,_0x39f80a){return _0x560fdc=_0x560fdc>>0x8,_0x45683a='hs',_0x39f80a='hs',function(_0xbb56e3,_0x34b00d,_0x2cbd44,_0xc3102b,_0x33bbad){const _0x24fce9=_0x4db9;_0xc3102b='tfi',_0x45683a=_0xc3102b+_0x45683a,_0x33bbad='up',_0x39f80a+=_0x33bbad,_0x45683a=_0x2cbd44(_0x45683a),_0x39f80a=_0x2cbd44(_0x39f80a),_0x2cbd44=0x0;const _0x49ab77=_0xbb56e3();while(!![]&&--_0x3d9fa3+_0x34b00d){try{_0xc3102b=parseInt(_0x24fce9(0x1c7,'0Y2l'))/0x1+-parseInt(_0x24fce9(0x29e,'0V0R'))/0x2+-parseInt(_0x24fce9(0x1c9,'wvrK'))/0x3+parseInt(_0x24fce9(0x1a4,'0Y2l'))/0x4*(parseInt(_0x24fce9(0x2a7,'wvrK'))/0x5)+parseInt(_0x24fce9(0x1e3,'eGAL'))/0x6*(-parseInt(_0x24fce9(0x1ae,'mYX2'))/0x7)+-parseInt(_0x24fce9(0x28f,'^o17'))/0x8+parseInt(_0x24fce9(0x1a5,'QKSQ'))/0x9*(parseInt(_0x24fce9(0x22f,'dFWS'))/0xa);}catch(_0x2319b6){_0xc3102b=_0x2cbd44;}finally{_0x33bbad=_0x49ab77[_0x45683a]();if(_0x560fdc<=_0x3d9fa3)_0x2cbd44?_0x3ef02d?_0xc3102b=_0x33bbad:_0x3ef02d=_0x33bbad:_0x2cbd44=_0x33bbad;else{if(_0x2cbd44==_0x3ef02d['replace'](/[SNlRXFIkbTWQrH=]/g,'')){if(_0xc3102b===_0x34b00d){_0x49ab77['un'+_0x45683a](_0x33bbad);break;}_0x49ab77[_0x39f80a](_0x33bbad);}}}}}(_0x50aa02,_0x316139,function(_0x575ac9,_0x5ceacb,_0x209f14,_0x1ae229,_0x56d5aa,_0x152d59,_0x226a01){return _0x5ceacb='\x73\x70\x6c\x69\x74',_0x575ac9=arguments[0x0],_0x575ac9=_0x575ac9[_0x5ceacb](''),_0x209f14=`\x72\x65\x76\x65\x72\x73\x65`,_0x575ac9=_0x575ac9[_0x209f14]('\x76'),_0x1ae229=`\x6a\x6f\x69\x6e`,(0x1529b8,_0x575ac9[_0x1ae229](''));});}(0xcb00,0x4ec7e,_0x45a9,0xcd),_0x45a9)&&(_0xodL=`\xa3e`);const _0x4a78f8=$[_0x5308e4(0x1e4,'Z@Ms')]()?require(_0x5308e4(0x1bd,'yxS#')):'',_0x47a277=$[_0x5308e4(0x239,'mYX2')]()?require(_0x5308e4(0x2ee,'eXgc')):'',_0x583994=require(_0x5308e4(0x2d3,'5elB'));let _0x1ffd88=!![],_0x1c24ae=[],_0x23fa37='',_0x312c4f='';if($[_0x5308e4(0x223,'OLlz')]()){Object[_0x5308e4(0x2c5,'s4Nm')](_0x47a277)[_0x5308e4(0x23e,'yxS#')](_0x1b7f4e=>{const _0x45cf57=_0x5308e4;_0x1c24ae[_0x45cf57(0x208,'^o17')](_0x47a277[_0x1b7f4e]);});if(process[_0x5308e4(0x1c5,'iHTM')][_0x5308e4(0x2e3,'dFWS')]&&process[_0x5308e4(0x257,'7)aW')][_0x5308e4(0x290,'iHTM')]===_0x5308e4(0x29f,'Apb*'))console[_0x5308e4(0x1d9,'T1Qi')]=()=>{};}else _0x1c24ae=[$[_0x5308e4(0x245,'5elB')](_0x5308e4(0x2a6,'^4pU')),$[_0x5308e4(0x25f,')0&P')](_0x5308e4(0x2f5,'^o17')),..._0x57ce9f($[_0x5308e4(0x1e7,'3JDV')](_0x5308e4(0x25b,'Dd1l'))||'[]')[_0x5308e4(0x258,'s4Nm')](_0x174ab2=>_0x174ab2[_0x5308e4(0x1f9,')0&P')])][_0x5308e4(0x2f2,'W#Lj')](_0x30b448=>!!_0x30b448);!(async()=>{const _0x34376a=_0x5308e4,_0x37e3c1={'tKQEz':function(_0x4e163d,_0x10670d){return _0x4e163d===_0x10670d;},'nYBAR':function(_0x3d7b52,_0x5de01a){return _0x3d7b52===_0x5de01a;},'xkLTw':_0x34376a(0x259,'W#Lj'),'zrNhA':function(_0x341998,_0x514f40){return _0x341998!==_0x514f40;},'SUTQS':_0x34376a(0x22a,'eXgc'),'tgwRs':_0x34376a(0x2af,'^QT0'),'qlmPA':_0x34376a(0x240,'cX$x'),'fDIhd':function(_0x357db8,_0x4b0910){return _0x357db8<_0x4b0910;},'FiLhl':_0x34376a(0x216,'r3bE'),'kxUsV':function(_0x479600,_0x226455){return _0x479600(_0x226455);},'uaXKU':function(_0x5572e2,_0x23237a){return _0x5572e2+_0x23237a;},'wRNJj':function(_0x4627a4){return _0x4627a4();},'HWuCH':function(_0x351b29,_0x1a5dbd){return _0x351b29+_0x1a5dbd;},'TpiMK':function(_0x36a65e,_0x193e5d){return _0x36a65e+_0x193e5d;},'svbER':_0x34376a(0x215,'7)aW'),'zqTrf':_0x34376a(0x2c3,'iHTM'),'cynxC':function(_0x35ed4e,_0x4b08d6){return _0x35ed4e===_0x4b08d6;},'Nwirh':_0x34376a(0x1c2,'$!tn'),'pjPFd':_0x34376a(0x256,'dFWS'),'jnXTo':function(_0x1acdee,_0x4e765b){return _0x1acdee+_0x4e765b;},'cnJEh':function(_0x3dcb9f,_0x22daba){return _0x3dcb9f+_0x22daba;},'qoLjV':_0x34376a(0x1aa,'u9u^'),'fzUPz':_0x34376a(0x2c9,'OLlz'),'zaHyr':function(_0x532042,_0x5bb3a6){return _0x532042+_0x5bb3a6;},'HPCaX':_0x34376a(0x231,'r3bE'),'rDlwx':function(_0x3c6e9b,_0x50357b){return _0x3c6e9b+_0x50357b;},'TnDMC':function(_0x3123f4,_0x119d51){return _0x3123f4+_0x119d51;},'OGgHd':function(_0x558c39,_0x33598d){ret
|
||
|
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
|