mirror of https://github.com/6dylan6/jdpro.git
11 lines
200 KiB
JavaScript
11 lines
200 KiB
JavaScript
|
/*
|
|||
|
活动入口:京东APP我的--东东农场
|
|||
|
==========================Quantumultx=========================
|
|||
|
[task_local]
|
|||
|
#jd新农场
|
|||
|
15 6,16 * * * jd_fruit_new.js
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('新农场任务');
|
|||
|
var _0xodQ='jsjiami.com.v7';const _0x34aacb=_0x2301;(function(_0x5b5a6a,_0x338952,_0x4eade8,_0x49f379,_0x439a2d,_0x1e4a7,_0x204e5d){return _0x5b5a6a=_0x5b5a6a>>0x9,_0x1e4a7='hs',_0x204e5d='hs',function(_0x552900,_0x514f99,_0x38441e,_0x29b369,_0x39d74e){const _0x2d8331=_0x2301;_0x29b369='tfi',_0x1e4a7=_0x29b369+_0x1e4a7,_0x39d74e='up',_0x204e5d+=_0x39d74e,_0x1e4a7=_0x38441e(_0x1e4a7),_0x204e5d=_0x38441e(_0x204e5d),_0x38441e=0x0;const _0x2fbf7a=_0x552900();while(!![]&&--_0x49f379+_0x514f99){try{_0x29b369=parseInt(_0x2d8331(0x10a,'Eq(J'))/0x1*(parseInt(_0x2d8331(0xa21,'I9#e'))/0x2)+-parseInt(_0x2d8331(0x88a,'LbUL'))/0x3+-parseInt(_0x2d8331(0xac,'YmbZ'))/0x4+parseInt(_0x2d8331(0x213,'LbUL'))/0x5*(-parseInt(_0x2d8331(0x9b6,'7X5G'))/0x6)+parseInt(_0x2d8331(0x1fe,'Eq(J'))/0x7+-parseInt(_0x2d8331(0x160,'LbUL'))/0x8+-parseInt(_0x2d8331(0x73d,'(6Pv'))/0x9*(-parseInt(_0x2d8331(0x37b,'8gps'))/0xa);}catch(_0x470a1d){_0x29b369=_0x38441e;}finally{_0x39d74e=_0x2fbf7a[_0x1e4a7]();if(_0x5b5a6a<=_0x49f379)_0x38441e?_0x439a2d?_0x29b369=_0x39d74e:_0x439a2d=_0x39d74e:_0x38441e=_0x39d74e;else{if(_0x38441e==_0x439a2d['replace'](/[MehVSBOHryTEgNftlRLX=]/g,'')){if(_0x29b369===_0x514f99){_0x2fbf7a['un'+_0x1e4a7](_0x39d74e);break;}_0x2fbf7a[_0x204e5d](_0x39d74e);}}}}}(_0x4eade8,_0x338952,function(_0x9ed885,_0x4826a9,_0x2305a9,_0x37c7d6,_0x122279,_0x4548ff,_0x46c7d4){return _0x4826a9='\x73\x70\x6c\x69\x74',_0x9ed885=arguments[0x0],_0x9ed885=_0x9ed885[_0x4826a9](''),_0x2305a9=`\x72\x65\x76\x65\x72\x73\x65`,_0x9ed885=_0x9ed885[_0x2305a9]('\x76'),_0x37c7d6=`\x6a\x6f\x69\x6e`,(0x148ccb,_0x9ed885[_0x37c7d6](''));});}(0x18e00,0x1c12e,_0x2939,0xc9),_0x2939)&&(_0xodQ=0x32b4);const _0x442a63=(function(){const _0x5f4f32=_0x2301,_0x3f85fc={'yqghI':function(_0x134dcf,_0x37e893){return _0x134dcf!==_0x37e893;},'hwcsk':_0x5f4f32(0x627,'YmbZ'),'yGytC':_0x5f4f32(0xa09,'HkJ!')};let _0x13bdc0=!![];return function(_0x4101d1,_0x19c879){const _0x445e25=_0x5f4f32;if(_0x3f85fc[_0x445e25(0x18d,'wACt')](_0x3f85fc[_0x445e25(0x15e,'HkJ!')],_0x3f85fc[_0x445e25(0x47d,']Mx(')])){const _0x4e8777=_0x13bdc0?function(){const _0x79dadc=_0x445e25;if(_0x19c879){const _0x210263=_0x19c879[_0x79dadc(0x1ba,'eldz')](_0x4101d1,arguments);return _0x19c879=null,_0x210263;}}:function(){};return _0x13bdc0=![],_0x4e8777;}else return _0x7cbd15[_0x445e25(0x615,'uaF*')](_0x3c5da4);};}()),_0x44cd75=_0x442a63(this,function(){const _0x33e71b=_0x2301,_0x2e11a4={'AcCJi':_0x33e71b(0x8bb,'ZI*D')};return _0x44cd75[_0x33e71b(0xa60,'(6Pv')]()[_0x33e71b(0x262,'Bo6c')](_0x2e11a4[_0x33e71b(0x610,'g!0B')])[_0x33e71b(0x68e,'Eq(J')]()[_0x33e71b(0x5d1,'^6aq')](_0x44cd75)[_0x33e71b(0x3cc,'lp*c')](_0x2e11a4[_0x33e71b(0x65c,'7X5G')]);});_0x44cd75();const _0x48c28d=0x64;let _0x5aea6b=![],_0x4bb719=[],_0x55627d='',_0x597efe,_0x2ff805,_0x435dee='',_0x467eb1='',_0xad6af2='',_0x111400={},_0x54483e=![],_0x180206=0x0;const _0x20ae1d=_0x34aacb(0x182,'J3km'),_0x3a43e1=_0x34aacb(0x2e4,'n[jd'),_0x45720a=process[_0x34aacb(0x9ab,'QRy[')][_0x34aacb(0x6b8,'ZdW)')]?process[_0x34aacb(0x521,'wACt')][_0x34aacb(0x285,'K7IE')]:'',_0x483a5e=require(_0x34aacb(0x489,'7X5G')),_0x1b8329=require('fs'),_0x34d938=require(_0x34aacb(0x99d,'[XaL')),_0x2ff49c=require(_0x34aacb(0x4e3,'uaF*'));if(process[_0x34aacb(0xa2,'g!0B')][_0x34aacb(0x2cf,'eldz')]){const _0x1706d4=require(_0x34aacb(0x891,'stHn'));$[_0x34aacb(0x5f7,'O5G[')]=_0x1706d4[_0x34aacb(0x2fa,'lp*c')]($[_0x34aacb(0x235,'ZdW)')][_0x34aacb(0x977,'^6aq')]($)),$[_0x34aacb(0x23b,'stHn')]=_0x1706d4[_0x34aacb(0x56d,'ZdW)')]($[_0x34aacb(0xb6,'wACt')][_0x34aacb(0xa1d,'[XaL')]($));}let _0x5121e6=[];$[_0x34aacb(0x5c3,'^6aq')]=0x1;const _0x2a715a={'farm_home':_0x34aacb(0x212,'(6Pv'),'farm_do_task':_0x34aacb(0x384,'^#QY'),'farm_task_receive_award':_0x34aacb(0x427,'QRy['),'farm_water':_0x34aacb(0x5d2,'49E]'),'farm_assist_receive_award':_0x34aacb(0x954,'49E]')},_0x1fd10d={'wheelsHome':_0x34aacb(0x3b8,'UUbt'),'wheelsLottery':_0x34aacb(0x1ac,'49E]'),'apsDoTask':_0x34aacb(0x737,'^#QY')};!(async()=>{const _0x313e39=_0x34aacb,_0x3082ff={'dNVWz':function(_0xfeed68){return _0xfeed68();},'TyOVd':function(_0x49c5b9,
|
|||
|
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
|