jdpro/jd_fruit_new.js

11 lines
232 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
活动入口京东APP我的--东东农场
==========================Quantumultx=========================
[task_local]
#jd新农场
10 6,12,17 * * * jd_fruit_new.js
*/
const $ = new Env('新农场任务');
2024-09-10 22:58:33 +00:00
var _0xodp='jsjiami.com.v7';const _0x8542ce=_0x37a8;(function(_0x48e3d1,_0x58a1c0,_0x250ee4,_0x170d74,_0x582bca,_0x33fdd7,_0xdbeb1c){return _0x48e3d1=_0x48e3d1>>0x8,_0x33fdd7='hs',_0xdbeb1c='hs',function(_0x12a5dc,_0x1ee952,_0x2449db,_0x3d9d5d,_0x4f846a){const _0x48cbec=_0x37a8;_0x3d9d5d='tfi',_0x33fdd7=_0x3d9d5d+_0x33fdd7,_0x4f846a='up',_0xdbeb1c+=_0x4f846a,_0x33fdd7=_0x2449db(_0x33fdd7),_0xdbeb1c=_0x2449db(_0xdbeb1c),_0x2449db=0x0;const _0x5d8fc3=_0x12a5dc();while(!![]&&--_0x170d74+_0x1ee952){try{_0x3d9d5d=-parseInt(_0x48cbec(0x45a,'7V%n'))/0x1+parseInt(_0x48cbec(0x785,'fEkO'))/0x2+parseInt(_0x48cbec(0x9a9,'xKu&'))/0x3+-parseInt(_0x48cbec(0x536,'V1Rd'))/0x4+parseInt(_0x48cbec(0x27c,'hyQ&'))/0x5+-parseInt(_0x48cbec(0xb9b,'BnIp'))/0x6+parseInt(_0x48cbec(0x93,'V1Rd'))/0x7;}catch(_0x1751ae){_0x3d9d5d=_0x2449db;}finally{_0x4f846a=_0x5d8fc3[_0x33fdd7]();if(_0x48e3d1<=_0x170d74)_0x2449db?_0x582bca?_0x3d9d5d=_0x4f846a:_0x582bca=_0x4f846a:_0x2449db=_0x4f846a;else{if(_0x2449db==_0x582bca['replace'](/[ByeLxNJQIhKfOWbAu=]/g,'')){if(_0x3d9d5d===_0x1ee952){_0x5d8fc3['un'+_0x33fdd7](_0x4f846a);break;}_0x5d8fc3[_0xdbeb1c](_0x4f846a);}}}}}(_0x250ee4,_0x58a1c0,function(_0x3ebfca,_0x2065de,_0x2f33f9,_0xfb2c45,_0x53f9ca,_0x16f22b,_0xa3bb1d){return _0x2065de='\x73\x70\x6c\x69\x74',_0x3ebfca=arguments[0x0],_0x3ebfca=_0x3ebfca[_0x2065de](''),_0x2f33f9=`\x72\x65\x76\x65\x72\x73\x65`,_0x3ebfca=_0x3ebfca[_0x2f33f9]('\x76'),_0xfb2c45=`\x6a\x6f\x69\x6e`,(0x181c35,_0x3ebfca[_0xfb2c45](''));});}(0xcb00,0xd93d3,_0x63f7,0xcd),_0x63f7)&&(_0xodp=0xcd);const _0xcf36ab=(function(){const _0x241082=_0x37a8,_0x427b2b={'UeoBo':function(_0x563e37,_0x14f319){return _0x563e37-_0x14f319;},'imWJL':function(_0x4065e6,_0x4d8338){return _0x4065e6===_0x4d8338;},'kJenL':_0x241082(0xb91,'ekE['),'xFxcK':function(_0x16eacc,_0x165d15){return _0x16eacc+_0x165d15;},'yokbE':function(_0xadb9f0,_0x57e335){return _0xadb9f0+_0x57e335;},'VolZN':_0x241082(0xb1f,'*W&z'),'cUKxd':_0x241082(0xab,'%4V9'),'FcGah':function(_0x3be935,_0x192c9f){return _0x3be935!==_0x192c9f;},'vxMXr':_0x241082(0x611,'aq(V'),'AIzIn':_0x241082(0x3e5,'4$OE'),'CkWtV':function(_0x44af4d,_0xee081f){return _0x44af4d!==_0xee081f;},'fevTp':_0x241082(0x117,'g!x]')};let _0x40ee46=!![];return function(_0x50cba7,_0x3a2ffb){const _0x17d96f=_0x241082,_0x30307d={'aAICQ':function(_0x33d5d3,_0x31879d){const _0x47f40e=_0x37a8;return _0x427b2b[_0x47f40e(0xbad,'*W&z')](_0x33d5d3,_0x31879d);},'SUIVe':function(_0x39f219,_0x476e08){const _0x2e6af9=_0x37a8;return _0x427b2b[_0x2e6af9(0x394,'%4V9')](_0x39f219,_0x476e08);},'kPlMR':function(_0x423eb2,_0x293159){const _0x361930=_0x37a8;return _0x427b2b[_0x361930(0x32e,'ZxBd')](_0x423eb2,_0x293159);},'MHWFR':_0x427b2b[_0x17d96f(0x285,'BumB')],'gNyxm':function(_0x45c543,_0x507cf2){const _0x2e7f07=_0x17d96f;return _0x427b2b[_0x2e7f07(0x352,'%4V9')](_0x45c543,_0x507cf2);},'uUZyY':function(_0x7cf221,_0x4cada4){const _0x4744b6=_0x17d96f;return _0x427b2b[_0x4744b6(0x51c,'OsW(')](_0x7cf221,_0x4cada4);},'mxVTA':function(_0x56e62a,_0x74bab2){const _0x4a01be=_0x17d96f;return _0x427b2b[_0x4a01be(0x121,'*Z71')](_0x56e62a,_0x74bab2);},'IXAln':function(_0x192841,_0x26c7d1){const _0x1cb442=_0x17d96f;return _0x427b2b[_0x1cb442(0x5c4,'BnIp')](_0x192841,_0x26c7d1);},'uENCb':_0x427b2b[_0x17d96f(0xade,'5McQ')],'wBJga':_0x427b2b[_0x17d96f(0xa33,'lB4^')],'bBMxT':function(_0x4663cb,_0xa2b1ad){const _0x5c417e=_0x17d96f;return _0x427b2b[_0x5c417e(0x50e,'8*8x')](_0x4663cb,_0xa2b1ad);},'KeOul':_0x427b2b[_0x17d96f(0x180,'lB4^')],'epmSG':_0x427b2b[_0x17d96f(0xa1c,'%4V9')]};if(_0x427b2b[_0x17d96f(0x752,'5McQ')](_0x427b2b[_0x17d96f(0xb66,'@#Sk')],_0x427b2b[_0x17d96f(0x506,'ZKmh')]))_0x667514[_0x17d96f(0x3e4,'%t0b')](_0x17d96f(0xa88,'0q%9')+_0x251fe3[_0x17d96f(0x7c6,'WmvL')](0x0,_0x30307d[_0x17d96f(0x1aa,'$4QD')](_0x6b915[_0x17d96f(0xae2,'Er8X')],0x1))+'\x0a');else{const _0x49025a=_0x40ee46?function(){const _0x3eb281=_0x17d96f,_0x41cd67={'FBgGs':function(_0x299980,_0xafa49c){const _0x49ede5=_0x37a8;return _0x30307d[_0x49ede5(0xa6e,'y16)')](_0x299980,_0xafa49c);},'MsrTc':function(_0x276323,_0x23723a){const _0x5489e1=_
2024-09-06 13:16:22 +00:00
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF