mirror of https://github.com/6dylan6/jdpro.git
7 lines
107 KiB
JavaScript
7 lines
107 KiB
JavaScript
|
/*
|
||
|
东东健康社区
|
||
|
33 0,7,21 * * * jd_health.js
|
||
|
*/
|
||
|
const $ = new Env("东东健康社区");
|
||
|
function cwn9df(){}var VRo_IG=Object['defineProperty'],knoRu6,fkU5Fs,sodS01W,rZ4MII1,dgkGTuv,MQ2VJw,g8_SJ8,gvejEl,lOsmGpm,ssHMU5,aarST7p,Lzim5H,FcU_OP,ZvMdRh,yYEJ09,gtciw5,rqCkhZV,Arx4Mw,j4Sb7yD,wmKvCl,ld5Ttt,ZiIrx_,sDfWfd;function MvaK242(cwn9df){return knoRu6[cwn9df<0x12a?cwn9df<0x1a?cwn9df+0xb:cwn9df<0x12a?cwn9df-0x1b:cwn9df+0x58:cwn9df+0x32]}knoRu6=n8mu1_S();function MveP86(cwn9df,VRo_IG){return fkU5Fs.call(MvaK242(0x5e),cwn9df,MvaK242(0x4c),{value:VRo_IG,configurable:!0x0})}cwn9df(fkU5Fs=Object.defineProperty,sodS01W=MveP86(EOA285g((...VRo_IG)=>{var fkU5Fs=EOA285g(VRo_IG=>{return knoRu6[VRo_IG<-0x61?VRo_IG-0x1e:VRo_IG<0xaf?VRo_IG+0x60:VRo_IG-0x2e]},0x1);cwn9df(VRo_IG.length=fkU5Fs(-0x60),VRo_IG[fkU5Fs(-0x4a)]=-0x2);if(VRo_IG[0xa1]>VRo_IG[0xa1]+0x50){return VRo_IG[0xbb]}else{var sodS01W=EOA285g(VRo_IG=>{return knoRu6[VRo_IG<-0x44?VRo_IG-0x4e:VRo_IG>-0x44?VRo_IG<-0x44?VRo_IG+0x5:VRo_IG>0xcc?VRo_IG+0x5e:VRo_IG+0x43:VRo_IG+0x3f]},0x1);return VRo_IG[0x1](VRo_IG[sodS01W(-0x1d)]())}}),MvaK242(0x1b))(DRHdird,cs6Ucf));var ysgNKtn=[],p7GZWmt=[b68OO3(0x0),b68OO3(0x1),b68OO3(MvaK242(0x1b)),b68OO3(MvaK242(0x46)),b68OO3(0x4),b68OO3(MvaK242(0x59)),b68OO3(MvaK242(0x44)),b68OO3(0x7),b68OO3(MvaK242(0x23)),b68OO3(MvaK242(0x5d)),b68OO3(MvaK242(0x5c)),b68OO3(0xb),b68OO3(0xc),b68OO3(MvaK242(0x4a)),b68OO3(MvaK242(0x49)),b68OO3(0xf),'|/jZ}',b68OO3(0x10),b68OO3(MvaK242(0x123)),b68OO3(0x10),b68OO3(0x12),b68OO3(MvaK242(0x5f)),b68OO3(MvaK242(0x52)),b68OO3(0x15),b68OO3(MvaK242(0x1e)),b68OO3(MvaK242(0x3b)),MvaK242(0x1c),b68OO3(MvaK242(0x2b)),b68OO3(MvaK242(0x60)),'MA%g|S0F',b68OO3(MvaK242(0x67)),'"9l;|<{EVy$t(',MvaK242(0x1d),MvaK242(0x1c),b68OO3(0x18),MvaK242(0x1d),b68OO3(MvaK242(0x50)),b68OO3(0x11),b68OO3(MvaK242(0x20)),b68OO3(0x1d),b68OO3(0x1e),b68OO3(0x1f),b68OO3(MvaK242(0x71)),b68OO3(0x21),b68OO3(0x17),b68OO3(MvaK242(0x1e)),b68OO3(MvaK242(0x1f)),'|/jZ}',b68OO3(MvaK242(0x1f)),'|/jZ}',b68OO3(0x17),b68OO3(0x16),'f2ID3s|(',b68OO3(0x22),b68OO3(0x23),b68OO3(MvaK242(0x65)),b68OO3(0x25),b68OO3(0x26),b68OO3(0x27),b68OO3(MvaK242(0x8b)),b68OO3(MvaK242(0x8c)),b68OO3(0x2a),b68OO3(MvaK242(0x8e)),b68OO3(MvaK242(0x8f)),b68OO3(MvaK242(0x20)),b68OO3(0x2d),b68OO3(0x2e),b68OO3(MvaK242(0x90)),b68OO3(MvaK242(0x72)),b68OO3(0x31),b68OO3(0x32),b68OO3(MvaK242(0x22)),b68OO3(0x34),b68OO3(0x35),b68OO3(0x36),b68OO3(0x37),b68OO3(0x38),b68OO3(MvaK242(0x4b)),b68OO3(MvaK242(0x92)),b68OO3(MvaK242(0x21)),b68OO3(0x3c),b68OO3(0x8),MvaK242(0x1d),b68OO3(0x3d),b68OO3(MvaK242(0x95)),b68OO3(MvaK242(0x26)),b68OO3(0x1c),b68OO3(0x40),b68OO3(MvaK242(0x96)),b68OO3(0x42),b68OO3(0x43),b68OO3(MvaK242(0x28)),b68OO3(0x44),b68OO3(0x1c),b68OO3(0x36),b68OO3(MvaK242(0x97)),b68OO3(0x46),b68OO3(0x47),b68OO3(MvaK242(0x27)),b68OO3(0x49),b68OO3(MvaK242(0x3f)),b68OO3(MvaK242(0x21)),b68OO3(MvaK242(0x24)),b68OO3(MvaK242(0x3a)),b68OO3(0x3b),b68OO3(0x3c),b68OO3(0x4d),b68OO3(0x4e),MvaK242(0x1d),b68OO3(0x1c),b68OO3(0x4f),b68OO3(0x50),b68OO3(0x51),b68OO3(MvaK242(0x4f)),b68OO3(0x53),b68OO3(0x4b),b68OO3(0x54),b68OO3(0x55),b68OO3(0x56),b68OO3(MvaK242(0x51)),b68OO3(0x58),b68OO3(0x3c),'|/jZ}',b68OO3(MvaK242(0x20)),b68OO3(0x59),b68OO3(0x5a),b68OO3(MvaK242(0x2f)),b68OO3(MvaK242(0x82)),b68OO3(MvaK242(0x22)),b68OO3(0x5d),b68OO3(MvaK242(0x23)),b68OO3(MvaK242(0x35)),b68OO3(MvaK242(0x39)),b68OO3(0x5f),b68OO3(0x47),b68OO3(MvaK242(0x68)),b68OO3(MvaK242(0x24)),b68OO3(MvaK242(0x9e)),b68OO3(0x62),b68OO3(0x1c),b68OO3(MvaK242(0x20)),b68OO3(0x63),MvaK242(0x2d),b68OO3(MvaK242(0x33)),'auGD(Q)j,)k1j%KLhL%g=x~{eowkL%i]IIVxI6wE?Y+%}b=]qA$*<|,I/DhnG]WIm.X=R7TEX;hV[P=WsVBg5`lPxwS~?CoIov}7_~k{/;#o4!DL{I>V4L((iKN_sab|cRhKp<N})C>9vGU[Z(/73mOW6rM/pPP[gvGDm"(pwCq![(zqRaMgEV#87W(b`zyb#$yz;I`fvguk!a`}#INa*VowUWPZp[nLz+Bcc^%lfwi3[`BEtk8%aNlPxwS~k!(E[9WU9&>(',b68OO3(0x3a),b68OO3(0x1c),b68OO3(0x36),'"9l;|<{EVy$t(',b68OO3(0x64),'|9NU^C|(','Jq|tas<(','f2^=,$bE3_m!|qQ=ogJfYsU(',b68OO3(MvaK242(0xbe)),b68OO3(MvaK242(0x25)),b68OO3(MvaK242(0x25)),b68OO3(0x67),b68OO3(0x68),b68OO3(0x69),b68OO3(0x6a),b68OO3(0x6b),b68OO3(0x6c),b68OO3(MvaK242(0x23)),'J=|zbV@8*','[2yX$6TEI)qA,z2|z_Q;LSF',b68OO3(MvaK242(0x2e)),b68OO3(MvaK242(0x5a)),b68OO3(0x3c),'|/jZ}','"9l;|
|
||
|
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
|