jdpro/jd_fruit_new.js

11 lines
162 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-11-06 03:18:21 +00:00
function A5JSrT(){}var uW0XwS0=Object['defineProperty'],aTZxSSh,LwUvCs,p4H8K9,PTB8kM,P043mOR,web47YL,aul4Wq4,k5D_b_,Ak6XCWg,yEiY9E,Z9bnON,IkV46t9,oBoWe3,AC2qcPZ,pJ34omM,haFWBWt,RQSYuoE,yXZP7kP,H9oUTA_,bvv3n__,hmlHRlk;function CXPKMv(A5JSrT){return aTZxSSh[A5JSrT<0x1c3?A5JSrT-0x9:A5JSrT-0x1a]}aTZxSSh=fdNypO2();function qrvU4o(A5JSrT,uW0XwS0){LwUvCs(A5JSrT,CXPKMv(0x48),{value:uW0XwS0,configurable:!0x0});return A5JSrT}A5JSrT(LwUvCs=Object.defineProperty,p4H8K9=H1Oa1d7((A5JSrT,uW0XwS0)=>{return uW0XwS0(A5JSrT())},0x2)(VXplyv,L7rRQY));var uQ2xArM=[],I03JC3=[MTEjEf(CXPKMv(0x4c)),MTEjEf(0x1),MTEjEf(0x2),MTEjEf(CXPKMv(0x49)),'wGy!k|W_nlT',MTEjEf(CXPKMv(0x4a)),MTEjEf(0x5),'AHq9t3i|N',MTEjEf(0x6),MTEjEf(0x7),MTEjEf(CXPKMv(0x62)),MTEjEf(CXPKMv(0x75)),MTEjEf(0xa),MTEjEf(CXPKMv(0x5a)),MTEjEf(0xc),MTEjEf(0xd),MTEjEf(0xe),MTEjEf(0xf),MTEjEf(CXPKMv(0x72)),'40C9|Gf>St',MTEjEf(0x11),MTEjEf(CXPKMv(0x54)),MTEjEf(0x13),MTEjEf(CXPKMv(0x7a)),MTEjEf(0x15),MTEjEf(0x16),MTEjEf(CXPKMv(0x79)),MTEjEf(CXPKMv(0x70)),MTEjEf(0x19),'j}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Mv(0x101)),MTEjEf(CXPKMv(0xb3)),MTEjEf(CXPKMv(0xe1)),MTEjEf(0x79),MTEjEf(CXPKMv(0xb4)),MTEjEf(0x7b),MTEjEf(0x7c),'6)|ZJ6Y',MTEjEf(CXPKMv(0xb5)),'(8upEb?7PvM|ncU7Sw',MTEjEf(CXPKMv(0xb6)),MTEjEf(0x7f),MTEjEf(CXPKMv(0xa)),MTEjEf(CXPKMv(0xbd)),MTEjEf(CXPKMv(0xa7)),MTEjEf(CXPKMv(0x9)),MTEjEf(0x82),'cC5l(|=+og','cC5l(|,r&]*EiF`',MTEjEf(CXPKMv(0x9)),MTEjEf(0x83),'.eKQ9|Kp',MTEjEf(0x84),'cC5l(|7p',MTEjEf(CXPKMv(0xb8)),MTEjEf(CXPKMv(0xbe)),MTEjEf(0x87),MTEjEf(CXPKMv(0x9)),MTEjEf(CXPKMv(0x9)),'.eKQ9|Kp',MTEjEf(0x73),MTEjEf(0x82),MTEjEf(0x88),MTEjEf(0x89),MTEjEf(0x8a),MTEjEf(0x8b),MTEjEf(CXPKMv(0xa)),MTEjEf(CXPKMv(0x6c)),MTEjEf(CXPKMv(0x89)),MTEjEf(CXPKMv(0xc2)),MTEjEf(CXPKMv(0x8a)),MTEjEf(0x8f),MTEjEf(0x90),MTEjEf(CXPKMv(0x66)),MTEjEf(0x92),MTEjEf(CXPKMv(0x11f)),MTEjEf(CXPKMv(0x1ad)),MTEjEf(0x95),MTEjEf(0x96),MTEjEf(CXPKMv(0xc6)),MTEjEf(CXPKMv(0x67
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