jdpro/jd_fruit_plant.js

9 lines
57 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
8 8 8 11 * jd_fruit_plant.js
变量
epxort FRUIT_LEVEL = '2' 种植水果等级默认2级
*/
const $ = new Env('农场自动兑换种植');
var _0xod0='jsjiami.com.v7';const _0x29c27e=_0x36e0;(function(_0x1960ec,_0x70eedf,_0x2818b7,_0x4a987f,_0xc63038,_0x8b8196,_0x4ed73a){return _0x1960ec=_0x1960ec>>0x3,_0x8b8196='hs',_0x4ed73a='hs',function(_0xe31237,_0x288b47,_0x175330,_0x189379,_0x472984){const _0x2a4947=_0x36e0;_0x189379='tfi',_0x8b8196=_0x189379+_0x8b8196,_0x472984='up',_0x4ed73a+=_0x472984,_0x8b8196=_0x175330(_0x8b8196),_0x4ed73a=_0x175330(_0x4ed73a),_0x175330=0x0;const _0x116f35=_0xe31237();while(!![]&&--_0x4a987f+_0x288b47){try{_0x189379=-parseInt(_0x2a4947(0x117,'&CbP'))/0x1*(parseInt(_0x2a4947(0x1f7,'xeT^'))/0x2)+-parseInt(_0x2a4947(0x2cd,'g78C'))/0x3*(parseInt(_0x2a4947(0x248,'hk@Q'))/0x4)+parseInt(_0x2a4947(0x13f,'VHx]'))/0x5*(-parseInt(_0x2a4947(0x14f,'EEMh'))/0x6)+-parseInt(_0x2a4947(0x2b6,'&VdC'))/0x7*(-parseInt(_0x2a4947(0x134,'3fTn'))/0x8)+parseInt(_0x2a4947(0x15b,'EEMh'))/0x9+parseInt(_0x2a4947(0x1ba,'qn$j'))/0xa*(-parseInt(_0x2a4947(0x1f5,'3fTn'))/0xb)+parseInt(_0x2a4947(0x178,'b0*l'))/0xc*(parseInt(_0x2a4947(0x280,'5gex'))/0xd);}catch(_0x55b3e5){_0x189379=_0x175330;}finally{_0x472984=_0x116f35[_0x8b8196]();if(_0x1960ec<=_0x4a987f)_0x175330?_0xc63038?_0x189379=_0x472984:_0xc63038=_0x472984:_0x175330=_0x472984;else{if(_0x175330==_0xc63038['replace'](/[flCLHOQhgnDAFPBqNd=]/g,'')){if(_0x189379===_0x288b47){_0x116f35['un'+_0x8b8196](_0x472984);break;}_0x116f35[_0x4ed73a](_0x472984);}}}}}(_0x2818b7,_0x70eedf,function(_0x3c855f,_0x6b12c4,_0x15b3e0,_0x48ce29,_0x4b2a07,_0x2df13e,_0x1f133e){return _0x6b12c4='\x73\x70\x6c\x69\x74',_0x3c855f=arguments[0x0],_0x3c855f=_0x3c855f[_0x6b12c4](''),_0x15b3e0=`\x72\x65\x76\x65\x72\x73\x65`,_0x3c855f=_0x3c855f[_0x15b3e0]('\x76'),_0x48ce29=`\x6a\x6f\x69\x6e`,(0x148cd4,_0x3c855f[_0x48ce29](''));});}(0x638,0xe2f4d,_0x34f2,0xc9),_0x34f2)&&(_0xod0=0x1979);function _0x36e0(_0x574b9d,_0xecae15){const _0x1df903=_0x34f2();return _0x36e0=function(_0x51386d,_0x1d58e7){_0x51386d=_0x51386d-0xb7;let _0x34f231=_0x1df903[_0x51386d];if(_0x36e0['uEAblY']===undefined){var _0x36e065=function(_0x2dd29e){const _0x479e31='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x556759='',_0xbfa191='',_0x1de59a=_0x556759+_0x36e065;for(let _0x26487e=0x0,_0x59bf2c,_0x129c75,_0x3404c5=0x0;_0x129c75=_0x2dd29e['charAt'](_0x3404c5++);~_0x129c75&&(_0x59bf2c=_0x26487e%0x4?_0x59bf2c*0x40+_0x129c75:_0x129c75,_0x26487e++%0x4)?_0x556759+=_0x1de59a['charCodeAt'](_0x3404c5+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x59bf2c>>(-0x2*_0x26487e&0x6)):_0x26487e:0x0){_0x129c75=_0x479e31['indexOf'](_0x129c75);}for(let _0x154e5d=0x0,_0x408a13=_0x556759['length'];_0x154e5d<_0x408a13;_0x154e5d++){_0xbfa191+='%'+('00'+_0x556759['charCodeAt'](_0x154e5d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbfa191);};const _0x5d7083=function(_0x576bb6,_0x3606cc){let _0xbef8ae=[],_0x1e11f1=0x0,_0x1d7081,_0x546262='';_0x576bb6=_0x36e065(_0x576bb6);let _0xe3dd01;for(_0xe3dd01=0x0;_0xe3dd01<0x100;_0xe3dd01++){_0xbef8ae[_0xe3dd01]=_0xe3dd01;}for(_0xe3dd01=0x0;_0xe3dd01<0x100;_0xe3dd01++){_0x1e11f1=(_0x1e11f1+_0xbef8ae[_0xe3dd01]+_0x3606cc['charCodeAt'](_0xe3dd01%_0x3606cc['length']))%0x100,_0x1d7081=_0xbef8ae[_0xe3dd01],_0xbef8ae[_0xe3dd01]=_0xbef8ae[_0x1e11f1],_0xbef8ae[_0x1e11f1]=_0x1d7081;}_0xe3dd01=0x0,_0x1e11f1=0x0;for(let _0x9eec82=0x0;_0x9eec82<_0x576bb6['length'];_0x9eec82++){_0xe3dd01=(_0xe3dd01+0x1)%0x100,_0x1e11f1=(_0x1e11f1+_0xbef8ae[_0xe3dd01])%0x100,_0x1d7081=_0xbef8ae[_0xe3dd01],_0xbef8ae[_0xe3dd01]=_0xbef8ae[_0x1e11f1],_0xbef8ae[_0x1e11f1]=_0x1d7081,_0x546262+=String['fromCharCode'](_0x576bb6['charCodeAt'](_0x9eec82)^_0xbef8ae[(_0xbef8ae[_0xe3dd01]+_0xbef8ae[_0x1e11f1])%0x100]);}return _0x546262;};_0x36e0['FMUrCS']=_0x5d7083,_0x574b9d=arguments,_0x36e0['uEAblY']=!![];}const _0x3d19c7=_0x1df903[0x0],_0x2bd2df=_0x51386d+_0x3d19c7,_0x4e6d1b=_0x574b9d[_0x2bd2df];if(!_0x4e6d1b){if(_0x36e0['Enygyd']===undefined){const _0x5585c5=function(_0x162064){this['WThIGX']=_0x162064,this['TbmddS']=[0x1,0x0,0x0],this['wrHAGk']=function(){return'newState';},this['JPBypt']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['NRTyWR']='[\x27|\x22]
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