jdpro/jd_fruit_new.js

11 lines
200 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
活动入口京东APP我的--东东农场
==========================Quantumultx=========================
[task_local]
#jd新农场
15 6,16 * * * jd_fruit_new.js
*/
const $ = new Env('新农场任务');
2024-01-14 08:43:00 +00:00
var _0xodc='jsjiami.com.v7';const _0xdba1c2=_0x4e40;if(function(_0x5da3a0,_0x18f2ae,_0x1e85c0,_0x4b98a2,_0x3df5bf,_0x101bdc,_0x1f8d73){return _0x5da3a0=_0x5da3a0>>0x8,_0x101bdc='hs',_0x1f8d73='hs',function(_0x46b79b,_0x16f340,_0x35f0a3,_0x4ef7bf,_0x5d12e3){const _0x480c4e=_0x4e40;_0x4ef7bf='tfi',_0x101bdc=_0x4ef7bf+_0x101bdc,_0x5d12e3='up',_0x1f8d73+=_0x5d12e3,_0x101bdc=_0x35f0a3(_0x101bdc),_0x1f8d73=_0x35f0a3(_0x1f8d73),_0x35f0a3=0x0;const _0x121b83=_0x46b79b();while(!![]&&--_0x4b98a2+_0x16f340){try{_0x4ef7bf=parseInt(_0x480c4e(0xeb,'G!Hk'))/0x1*(-parseInt(_0x480c4e(0x9dd,')IOP'))/0x2)+parseInt(_0x480c4e(0x8bd,'MQIA'))/0x3*(parseInt(_0x480c4e(0x438,'yczw'))/0x4)+parseInt(_0x480c4e(0x288,'@bP%'))/0x5*(parseInt(_0x480c4e(0x2a3,'#AX@'))/0x6)+parseInt(_0x480c4e(0x805,'0pKC'))/0x7+-parseInt(_0x480c4e(0x581,'#AX@'))/0x8+-parseInt(_0x480c4e(0x254,'IS&c'))/0x9*(-parseInt(_0x480c4e(0x9b6,'Uu*]'))/0xa)+-parseInt(_0x480c4e(0x325,'MQIA'))/0xb*(parseInt(_0x480c4e(0x2f7,'Z4t8'))/0xc);}catch(_0x1173df){_0x4ef7bf=_0x35f0a3;}finally{_0x5d12e3=_0x121b83[_0x101bdc]();if(_0x5da3a0<=_0x4b98a2)_0x35f0a3?_0x3df5bf?_0x4ef7bf=_0x5d12e3:_0x3df5bf=_0x5d12e3:_0x35f0a3=_0x5d12e3;else{if(_0x35f0a3==_0x3df5bf['replace'](/[HnweFWDyqhXTIJSYUKBfgM=]/g,'')){if(_0x4ef7bf===_0x16f340){_0x121b83['un'+_0x101bdc](_0x5d12e3);break;}_0x121b83[_0x1f8d73](_0x5d12e3);}}}}}(_0x1e85c0,_0x18f2ae,function(_0x544d48,_0xb0eb08,_0x476cc1,_0x5e1002,_0x127b3f,_0x4257ff,_0x290143){return _0xb0eb08='\x73\x70\x6c\x69\x74',_0x544d48=arguments[0x0],_0x544d48=_0x544d48[_0xb0eb08](''),_0x476cc1=`\x72\x65\x76\x65\x72\x73\x65`,_0x544d48=_0x544d48[_0x476cc1]('\x76'),_0x5e1002=`\x6a\x6f\x69\x6e`,(0x150306,_0x544d48[_0x5e1002](''));});}(0xc800,0x2bbd2,_0x36c3,0xca),_0x36c3){}const _0x5430ea=(function(){const _0x47f5da=_0x4e40,_0x3d52b0={'owfrb':function(_0x1d183c,_0x30f04c){return _0x1d183c(_0x30f04c);},'qVoqC':function(_0x2aa1d3,_0x1d7c5e){return _0x2aa1d3===_0x1d7c5e;},'idOXt':_0x47f5da(0x51a,'vb(i'),'TmlYG':_0x47f5da(0x678,'FtMv')};let _0x5ec8f2=!![];return function(_0x16787a,_0x2c2db8){const _0x46aed2=_0x47f5da,_0x231045={'YGlGw':function(_0xd226ba,_0x561027){const _0x2afaaa=_0x4e40;return _0x3d52b0[_0x2afaaa(0x9a5,'Aw0&')](_0xd226ba,_0x561027);}};if(_0x3d52b0[_0x46aed2(0xa30,'@bP%')](_0x3d52b0[_0x46aed2(0x329,'nHrH')],_0x3d52b0[_0x46aed2(0x26a,'y&Ej')]))_0x231045[_0x46aed2(0x151,'sRIz')](_0x41ffdd,_0xb2eef4);else{const _0x4b411b=_0x5ec8f2?function(){const _0x298178=_0x46aed2;if(_0x2c2db8){const _0x493b63=_0x2c2db8[_0x298178(0x8a0,'sRIz')](_0x16787a,arguments);return _0x2c2db8=null,_0x493b63;}}:function(){};return _0x5ec8f2=![],_0x4b411b;}};}()),_0x281df5=_0x5430ea(this,function(){const _0x2bd0f8=_0x4e40,_0x4d56e4={'LKpZj':_0x2bd0f8(0x823,'nHrH')};return _0x281df5[_0x2bd0f8(0x6d5,'IS&c')]()[_0x2bd0f8(0x7f5,')IOP')](_0x4d56e4[_0x2bd0f8(0x25b,'IS&c')])[_0x2bd0f8(0x456,'&O(H')]()[_0x2bd0f8(0x283,'0pKC')](_0x281df5)[_0x2bd0f8(0x23c,'0j^C')](_0x4d56e4[_0x2bd0f8(0x306,'^kB&')]);});_0x281df5();const _0x287d21=0x64;let _0x3a40b9=![],_0x2721f2=[],_0x125da6='',_0x5a0a9a,_0x12d915,_0x493946='',_0x57f714='',_0x1e67bd='',_0x565be6={},_0x40a591=![],_0x436832=0x0;const _0x1cd902=_0xdba1c2(0x722,'NJTu'),_0x4ba305=_0xdba1c2(0x5aa,'BuLR');let _0x13829f=process[_0xdba1c2(0x928,'DdDY')][_0xdba1c2(0x66f,'&O(H')]?process[_0xdba1c2(0x228,'nHrH')][_0xdba1c2(0x82a,'Dy[j')]:'';const _0x1479cb=require(_0xdba1c2(0xa41,'U%%V')),_0x2ef4dd=require('fs'),_0xe96872=require(_0xdba1c2(0x755,'FtMv')),_0x2722ab=require(_0xdba1c2(0x654,'Z4t8'));if(process[_0xdba1c2(0x440,'0pKC')][_0xdba1c2(0x8f8,'Aw0&')]){const _0x491626=require(_0xdba1c2(0x4c1,'aiWz'));$[_0xdba1c2(0x301,'o(5g')]=_0x491626[_0xdba1c2(0x5db,'#AX@')]($[_0xdba1c2(0x97e,'vb(i')][_0xdba1c2(0x4bb,'DdDY')]($)),$[_0xdba1c2(0x73d,'G!Hk')]=_0x491626[_0xdba1c2(0x265,'1kzt')]($[_0xdba1c2(0x7e6,'@bP%')][_0xdba1c2(0x9df,'Dy[j')]($));}let _0x2f8c72=[];$[_0xdba1c2(0x28a,'3pGC')]=0x1;const _0x405733={'farm_home':_0xdba1c2(0xa24,'48C&'),'farm_do_task':_0xdba1c2(0x7b1,'#3h5'),'farm_task_receive_award':_0xdba1c2(0x8ac,'G!Hk'),'farm_water':_0xdba1c2(0x4a9,'NJTu'),'farm_as
2024-01-02 12:59:48 +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