mirror of https://github.com/6dylan6/jdpro.git
7 lines
80 KiB
JavaScript
7 lines
80 KiB
JavaScript
|
/*
|
||
|
33 3,16 * * * jd_plantBean_help.js
|
||
|
*/
|
||
|
const $ = new Env('种豆得豆内部互助');
|
||
|
var _0xod9='jsjiami.com.v7';const _0x5e59a4=_0x2c2d;(function(_0x4636c6,_0x19395e,_0x58ef8a,_0x30323a,_0x355d5d,_0x5be15c,_0x4f9403){return _0x4636c6=_0x4636c6>>0x7,_0x5be15c='hs',_0x4f9403='hs',function(_0x351cfb,_0x38bf08,_0x1ef2c3,_0x2e5b20,_0x40d2bb){const _0x2c6c6a=_0x2c2d;_0x2e5b20='tfi',_0x5be15c=_0x2e5b20+_0x5be15c,_0x40d2bb='up',_0x4f9403+=_0x40d2bb,_0x5be15c=_0x1ef2c3(_0x5be15c),_0x4f9403=_0x1ef2c3(_0x4f9403),_0x1ef2c3=0x0;const _0x3def6d=_0x351cfb();while(!![]&&--_0x30323a+_0x38bf08){try{_0x2e5b20=parseInt(_0x2c6c6a(0x46b,'sgl8'))/0x1*(parseInt(_0x2c6c6a(0x3e3,'cWHK'))/0x2)+-parseInt(_0x2c6c6a(0x3f4,'1*56'))/0x3*(-parseInt(_0x2c6c6a(0x1e3,'1*56'))/0x4)+parseInt(_0x2c6c6a(0x1c5,'gv@^'))/0x5+parseInt(_0x2c6c6a(0x381,'X9h&'))/0x6*(parseInt(_0x2c6c6a(0x277,'L&Xg'))/0x7)+-parseInt(_0x2c6c6a(0x52e,'3))h'))/0x8+parseInt(_0x2c6c6a(0x362,'s(QB'))/0x9+-parseInt(_0x2c6c6a(0x1ee,'AML6'))/0xa;}catch(_0x47d7dd){_0x2e5b20=_0x1ef2c3;}finally{_0x40d2bb=_0x3def6d[_0x5be15c]();if(_0x4636c6<=_0x30323a)_0x1ef2c3?_0x355d5d?_0x2e5b20=_0x40d2bb:_0x355d5d=_0x40d2bb:_0x1ef2c3=_0x40d2bb;else{if(_0x1ef2c3==_0x355d5d['replace'](/[EIKWJlTxCkRtqydMnrFU=]/g,'')){if(_0x2e5b20===_0x38bf08){_0x3def6d['un'+_0x5be15c](_0x40d2bb);break;}_0x3def6d[_0x4f9403](_0x40d2bb);}}}}}(_0x58ef8a,_0x19395e,function(_0x210505,_0x1fa349,_0x1715c1,_0x5f3ba9,_0x54cd5c,_0x31b7b4,_0xb66604){return _0x1fa349='\x73\x70\x6c\x69\x74',_0x210505=arguments[0x0],_0x210505=_0x210505[_0x1fa349](''),_0x1715c1=`\x72\x65\x76\x65\x72\x73\x65`,_0x210505=_0x210505[_0x1715c1]('\x76'),_0x5f3ba9=`\x6a\x6f\x69\x6e`,(0x159e50,_0x210505[_0x5f3ba9](''));});}(0x6680,0x2d9e4,_0x33fd,0xcf),_0x33fd)&&(_0xod9=0x4951);const _0x359d34=(function(){const _0x8e1f65=_0x2c2d,_0xf12c9e={'pmXnw':function(_0x42cc83,_0x5285a4){return _0x42cc83===_0x5285a4;},'qyXRa':_0x8e1f65(0x26a,'mCN*'),'rfdFV':_0x8e1f65(0x30c,'1vQ0'),'XEHdQ':function(_0xe4b070,_0x278ef0){return _0xe4b070(_0x278ef0);}};let _0x89c77d=!![];return function(_0x5901e8,_0x4dc6da){const _0x44a536={'ACchP':function(_0x41c8b8,_0xf1729c){const _0x4a95e9=_0x2c2d;return _0xf12c9e[_0x4a95e9(0x257,'62]G')](_0x41c8b8,_0xf1729c);}},_0x21394a=_0x89c77d?function(){const _0x5af7fa=_0x2c2d;if(_0xf12c9e[_0x5af7fa(0x370,'X9h&')](_0xf12c9e[_0x5af7fa(0x32b,'UjN6')],_0xf12c9e[_0x5af7fa(0x421,'x(JN')]))_0x44a536[_0x5af7fa(0x3d6,'HCx8')](_0x4c0611,_0x57ae3f);else{if(_0x4dc6da){const _0x130e2a=_0x4dc6da[_0x5af7fa(0x1da,'xaOc')](_0x5901e8,arguments);return _0x4dc6da=null,_0x130e2a;}}}:function(){};return _0x89c77d=![],_0x21394a;};}()),_0x2e3298=_0x359d34(this,function(){const _0x5da767=_0x2c2d,_0x1ec7cc={'RLjUY':_0x5da767(0x46e,'j]%n')};return _0x2e3298[_0x5da767(0x4d2,'xaOc')]()[_0x5da767(0x552,'N&Pt')](_0x1ec7cc[_0x5da767(0x392,'CHKN')])[_0x5da767(0x3f1,'sgl8')]()[_0x5da767(0x481,'L1(*')](_0x2e3298)[_0x5da767(0x37c,'CHKN')](_0x1ec7cc[_0x5da767(0x50e,'OFpg')]);});_0x2e3298();let _0x4c944a=!![],_0x352e72=[],_0x22305d='',_0x3fd812,_0x233199=[],_0x59a9f9=[],_0x51c99c=[];const _0x2691bb=require('fs'),_0x5b147e=require(_0x5e59a4(0x308,'W93(')),_0x58a5eb=_0x5e59a4(0x3f5,'DYpy'),_0x46ff28=process[_0x5e59a4(0x251,'j]%n')][_0x5e59a4(0x269,'XWts')]?process[_0x5e59a4(0x399,'bi^q')][_0x5e59a4(0x4b2,'H2&t')]*0x1:0x7d0;let _0x12abb1=new Date()[_0x5e59a4(0x328,'UjN6')](),_0x36cc9e=!![];$[_0x5e59a4(0x233,'AML6')]()&&process[_0x5e59a4(0x261,')V1i')][_0x5e59a4(0x3f7,'C#w]')]&&(process[_0x5e59a4(0x23a,'gv@^')][_0x5e59a4(0x34a,'$FFE')]==_0x5e59a4(0x480,'$Vd1')&&(_0x12abb1>0x9&&(_0x36cc9e=![],console[_0x5e59a4(0x526,'C#w]')](_0x5e59a4(0x466,'N&Pt')))));$[_0x5e59a4(0x214,'C#w]')]=0x1,!(async()=>{const _0x45732c=_0x5e59a4,_0x4e1d61={'JJqDv':_0x45732c(0x38b,'Tb1R'),'ELcew':function(_0x5ea596,_0x347195){return _0x5ea596*_0x347195;},'UplFR':function(_0x4cfce7,_0x1fd180){return _0x4cfce7-_0x1fd180;},'ybIAL':function(_0x21f17a,_0x10e144){return _0x21f17a+_0x10e144;},'ctjVC':_0x45732c(0x441,'x(JN'),'ogmRU':_0x45732c(0x515,'@Y2E'),'zNxnD':function(_0x108e56){return _0x108e56();},'vTaSA':function(_0x5e14ca,_0xfc5f52){return _0x5e14ca===_0xfc5f52;},'zSnKT':_0x45732c(0x2e3,'gv@^'),'zJgfV':_0x45
|
||
|
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
|