jdpro/jd_fruit_new.js

11 lines
249 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-11 14:46:25 +00:00
var _0xodU='jsjiami.com.v7';const _0x5a3124=_0x2b6d;if(function(_0x5016a5,_0x31de43,_0x45ae0f,_0x1f973b,_0x2c0e63,_0x1ea12b,_0x7ecccf){return _0x5016a5=_0x5016a5>>0x3,_0x1ea12b='hs',_0x7ecccf='hs',function(_0x364319,_0x12b138,_0x196977,_0x162826,_0x478b2f){const _0x4af010=_0x2b6d;_0x162826='tfi',_0x1ea12b=_0x162826+_0x1ea12b,_0x478b2f='up',_0x7ecccf+=_0x478b2f,_0x1ea12b=_0x196977(_0x1ea12b),_0x7ecccf=_0x196977(_0x7ecccf),_0x196977=0x0;const _0x5e7e15=_0x364319();while(!![]&&--_0x1f973b+_0x12b138){try{_0x162826=-parseInt(_0x4af010(0x924,'J73r'))/0x1*(-parseInt(_0x4af010(0x3cd,'AHr@'))/0x2)+-parseInt(_0x4af010(0x58a,'dPPc'))/0x3*(-parseInt(_0x4af010(0x58f,'ypw&'))/0x4)+-parseInt(_0x4af010(0x9e0,'J)m#'))/0x5*(parseInt(_0x4af010(0x659,'JA^C'))/0x6)+parseInt(_0x4af010(0xb20,'Fb7H'))/0x7*(parseInt(_0x4af010(0x351,'6sp^'))/0x8)+-parseInt(_0x4af010(0xbcc,'Hmk$'))/0x9*(parseInt(_0x4af010(0xd33,'lcWn'))/0xa)+parseInt(_0x4af010(0x9da,'2b#d'))/0xb+-parseInt(_0x4af010(0x376,'QAav'))/0xc*(parseInt(_0x4af010(0xabf,'dkJ('))/0xd);}catch(_0x1c4ac5){_0x162826=_0x196977;}finally{_0x478b2f=_0x5e7e15[_0x1ea12b]();if(_0x5016a5<=_0x1f973b)_0x196977?_0x2c0e63?_0x162826=_0x478b2f:_0x2c0e63=_0x478b2f:_0x196977=_0x478b2f;else{if(_0x196977==_0x2c0e63['replace'](/[SOUfgYGrbkleHDNXyxuhVK=]/g,'')){if(_0x162826===_0x12b138){_0x5e7e15['un'+_0x1ea12b](_0x478b2f);break;}_0x5e7e15[_0x7ecccf](_0x478b2f);}}}}}(_0x45ae0f,_0x31de43,function(_0x5c95e9,_0x3ea85e,_0x487c9a,_0x42c45d,_0x79c0f1,_0x30e9ef,_0x1c08d3){return _0x3ea85e='\x73\x70\x6c\x69\x74',_0x5c95e9=arguments[0x0],_0x5c95e9=_0x5c95e9[_0x3ea85e](''),_0x487c9a=`\x72\x65\x76\x65\x72\x73\x65`,_0x5c95e9=_0x5c95e9[_0x487c9a]('\x76'),_0x42c45d=`\x6a\x6f\x69\x6e`,(0x181e20,_0x5c95e9[_0x42c45d](''));});}(0x650,0xb5525,_0x3752,0xcc),_0x3752){}const _0x9483c5=(function(){const _0x1615a4=_0x2b6d,_0x3210e4={'VPbcZ':function(_0x53a85e,_0x26ab51){return _0x53a85e==_0x26ab51;},'LEGEj':function(_0x3f65d5,_0x4cd55c){return _0x3f65d5+_0x4cd55c;},'AIErN':function(_0x315955,_0x223776){return _0x315955 instanceof _0x223776;},'HLMob':function(_0xac55f5,_0x533057,_0x322ab3,_0x24cb56){return _0xac55f5(_0x533057,_0x322ab3,_0x24cb56);},'AFWht':function(_0xa55db8,_0x1bca0f){return _0xa55db8!==_0x1bca0f;},'Bnrgd':_0x1615a4(0x6a2,'taW]')};let _0xffb5a0=!![];return function(_0x5cfd59,_0x120e6d){const _0x9bfb04=_0xffb5a0?function(){const _0x38e47f=_0x2b6d,_0x29e352={'qmScT':function(_0x28495d,_0x29b2c3){const _0x39326f=_0x2b6d;return _0x3210e4[_0x39326f(0x16b,'fP1^')](_0x28495d,_0x29b2c3);},'siHyR':function(_0x219b19,_0x547224){const _0x5ce1f0=_0x2b6d;return _0x3210e4[_0x5ce1f0(0xd26,'3oFr')](_0x219b19,_0x547224);},'KmUMT':function(_0x524855,_0x280f49){const _0x4c9a74=_0x2b6d;return _0x3210e4[_0x4c9a74(0x8e6,'NWU)')](_0x524855,_0x280f49);},'ajgFh':function(_0x555c1c,_0x6085a9){const _0x17e6c=_0x2b6d;return _0x3210e4[_0x17e6c(0xd2b,'raD6')](_0x555c1c,_0x6085a9);},'Fnjvh':function(_0x533750,_0x27548b,_0x4547f0,_0x47bc95){const _0x2aaf3a=_0x2b6d;return _0x3210e4[_0x2aaf3a(0x952,'hK@5')](_0x533750,_0x27548b,_0x4547f0,_0x47bc95);}};if(_0x120e6d){if(_0x3210e4[_0x38e47f(0xc28,'jOA*')](_0x3210e4[_0x38e47f(0x4ca,'!M@[')],_0x3210e4[_0x38e47f(0xaf4,'ey*0')])){var _0x51490e=_0x29e352[_0x38e47f(0x39b,'ypw&')](_0x4e1082,null)?_0x51565e:_0x29e352[_0x38e47f(0x822,'AHr@')](_0x29fdeb,_0x29e352[_0x38e47f(0xb85,'!M@[')](_0x3f925b,_0x30d927)?_0x29e352[_0x38e47f(0xc8a,'Fb7H')](_0x29e352[_0x38e47f(0xa7f,'$o&V')]('[',_0x88b0fc),']'):_0x29e352[_0x38e47f(0xb23,'upts')]('.',_0xc843b9));_0x5b494c[_0x38e47f(0x4fd,'dkJ(')](_0x29e352[_0x38e47f(0x6ae,'Fb7H')](_0x1d03e4,_0x4f310d[_0x11f4fc],_0x51490e,_0x3e3226));}else{const _0x3c078d=_0x120e6d[_0x38e47f(0xcfa,'QAav')](_0x5cfd59,arguments);return _0x120e6d=null,_0x3c078d;}}}:function(){};return _0xffb5a0=![],_0x9bfb04;};}()),_0x266de1=_0x9483c5(this,function(){const _0x6365ac=_0x2b6d,_0x419545={'vcalx':_0x6365ac(0xd71,'3oFr')};return _0x266de1[_0x6365ac(0x758,'&OjM')]()[_0x6365ac(0x55d,'m]V9')](_0x419545[_0x6365ac(0x5b9,'kq2^')])[_0x6365ac(0x4b0,'QsqT')]()[_0x6365ac(0x92f,'OL(A')](_0x266de1)[_0x6365ac(0x77b,'oT[4')
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