2024-06-28 07:47:44 +00:00
|
|
|
/*
|
|
|
|
33 3,16 * * * jd_plantBean_help.js
|
|
|
|
*/
|
2024-08-19 14:31:26 +00:00
|
|
|
const $ = new Env('种豆得豆互助');
|
|
|
|
var _0xodN='jsjiami.com.v7';const _0x4bc5ac=_0x5aec;(function(_0x3d9db1,_0xda35ea,_0xa289bb,_0x4228e3,_0x17a2ce,_0x5c88f3,_0xaca285){return _0x3d9db1=_0x3d9db1>>0x4,_0x5c88f3='hs',_0xaca285='hs',function(_0x5637e4,_0x53c1ab,_0x24ce2a,_0x17fb32,_0xa93494){const _0x2cf07b=_0x5aec;_0x17fb32='tfi',_0x5c88f3=_0x17fb32+_0x5c88f3,_0xa93494='up',_0xaca285+=_0xa93494,_0x5c88f3=_0x24ce2a(_0x5c88f3),_0xaca285=_0x24ce2a(_0xaca285),_0x24ce2a=0x0;const _0x969c0=_0x5637e4();while(!![]&&--_0x4228e3+_0x53c1ab){try{_0x17fb32=-parseInt(_0x2cf07b(0x311,'f(J6'))/0x1*(parseInt(_0x2cf07b(0x325,'T1q$'))/0x2)+parseInt(_0x2cf07b(0x130,'zprv'))/0x3*(parseInt(_0x2cf07b(0x287,'b6Qo'))/0x4)+parseInt(_0x2cf07b(0xe6,'!I2r'))/0x5+parseInt(_0x2cf07b(0x392,'4GOY'))/0x6+-parseInt(_0x2cf07b(0xae,'pN$q'))/0x7*(parseInt(_0x2cf07b(0x160,'pN$q'))/0x8)+-parseInt(_0x2cf07b(0x235,'hkw7'))/0x9*(-parseInt(_0x2cf07b(0x2a1,'kyRy'))/0xa)+-parseInt(_0x2cf07b(0xb6,'E*SQ'))/0xb*(-parseInt(_0x2cf07b(0x2b6,'yhUw'))/0xc);}catch(_0x5b9817){_0x17fb32=_0x24ce2a;}finally{_0xa93494=_0x969c0[_0x5c88f3]();if(_0x3d9db1<=_0x4228e3)_0x24ce2a?_0x17a2ce?_0x17fb32=_0xa93494:_0x17a2ce=_0xa93494:_0x24ce2a=_0xa93494;else{if(_0x24ce2a==_0x17a2ce['replace'](/[EQDAkfMOTWYbRdFtUxBrugp=]/g,'')){if(_0x17fb32===_0x53c1ab){_0x969c0['un'+_0x5c88f3](_0xa93494);break;}_0x969c0[_0xaca285](_0xa93494);}}}}}(_0xa289bb,_0xda35ea,function(_0x3da248,_0x5a9615,_0xff1abb,_0xd3ee38,_0x9b14,_0x302ddf,_0x43f5f3){return _0x5a9615='\x73\x70\x6c\x69\x74',_0x3da248=arguments[0x0],_0x3da248=_0x3da248[_0x5a9615](''),_0xff1abb=`\x72\x65\x76\x65\x72\x73\x65`,_0x3da248=_0x3da248[_0xff1abb]('\x76'),_0xd3ee38=`\x6a\x6f\x69\x6e`,(0x17eee6,_0x3da248[_0xd3ee38](''));});}(0xc80,0xdb287,_0x5007,0xca),_0x5007)&&(_0xodN=_0x5007);const _0x252ba5=(function(){let _0x1b69b4=!![];return function(_0x284817,_0xdbd147){const _0x1fec91=_0x1b69b4?function(){const _0x3168c2=_0x5aec;if(_0xdbd147){const _0xc92dd8=_0xdbd147[_0x3168c2(0x221,'dtr)')](_0x284817,arguments);return _0xdbd147=null,_0xc92dd8;}}:function(){};return _0x1b69b4=![],_0x1fec91;};}()),_0x50a548=_0x252ba5(this,function(){const _0x309444=_0x5aec,_0x367be6={'yPEpa':_0x309444(0x323,'x)Ti')};return _0x50a548[_0x309444(0x174,'UC)i')]()[_0x309444(0xc2,'Jz9S')](_0x367be6[_0x309444(0x1b4,'Y7y6')])[_0x309444(0x2b5,'E^!W')]()[_0x309444(0x28f,'2v]E')](_0x50a548)[_0x309444(0x3b6,'yhUw')](_0x367be6[_0x309444(0x309,'kyRy')]);});_0x50a548();let _0x2bfb75=!![],_0x51dd75=[],_0x2e5723='',_0x501c90,_0x2d659d=[],_0x4e17c2=[],_0x1866a7=[];const _0x408f74=require('fs'),_0x4ca228=require(_0x4bc5ac(0x274,'x)Ti')),_0xe85a22=_0x4bc5ac(0x3c2,'k1nL'),_0x4d94e9=process[_0x4bc5ac(0x1a2,'Khbt')][_0x4bc5ac(0x124,'v0yf')]?process[_0x4bc5ac(0xaa,')tDX')][_0x4bc5ac(0x2d9,'yhUw')]*0x1:0x7d0;let _0xe70e52=!![];function _0x5aec(_0x2d6349,_0xd61937){const _0xeb748f=_0x5007();return _0x5aec=function(_0x15d717,_0x2416c5){_0x15d717=_0x15d717-0x76;let _0x500701=_0xeb748f[_0x15d717];if(_0x5aec['OLsxTA']===undefined){var _0x5aec51=function(_0x280809){const _0x319e75='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x56d6e9='',_0x11237d='',_0x520908=_0x56d6e9+_0x5aec51;for(let _0x31cc5d=0x0,_0x37736c,_0x2c8791,_0x5e2daf=0x0;_0x2c8791=_0x280809['charAt'](_0x5e2daf++);~_0x2c8791&&(_0x37736c=_0x31cc5d%0x4?_0x37736c*0x40+_0x2c8791:_0x2c8791,_0x31cc5d++%0x4)?_0x56d6e9+=_0x520908['charCodeAt'](_0x5e2daf+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x37736c>>(-0x2*_0x31cc5d&0x6)):_0x31cc5d:0x0){_0x2c8791=_0x319e75['indexOf'](_0x2c8791);}for(let _0x22779d=0x0,_0x2593f4=_0x56d6e9['length'];_0x22779d<_0x2593f4;_0x22779d++){_0x11237d+='%'+('00'+_0x56d6e9['charCodeAt'](_0x22779d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x11237d);};const _0x39e572=function(_0x5e732f,_0x534fab){let _0x571f77=[],_0x13c972=0x0,_0x12b686,_0x16f67e='';_0x5e732f=_0x5aec51(_0x5e732f);let _0x26d57b;for(_0x26d57b=0x0;_0x26d57b<0x100;_0x26d57b++){_0x571f77[_0x26d57b]=_0x26d57b;}for(_0x26d57b=0x0;_0x26d57b<0x100;_0x26d57b++){_0x13c972=(_0x13c972+_0x571f77[_0x26d57b]+_0x534fab['charCodeAt'](_0x26d57b%_0x534fab['length
|
2024-06-28 07:47:44 +00:00
|
|
|
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
|