faker2/jd_health.js

7 lines
122 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 07:27:40 +00:00
/*
东东健康社区
33 0,6,22 * * * jd_health.js
*/
const $ = new Env("东东健康社区");
const bdy_0x2b77e2=bdy_0x593c;(function(_0x3b549c,_0x339a33){const bdy_0x4c30f9={_0x491e4e:'0x2fe',_0x595490:'&hBS',_0x6a1cf4:'0x13e',_0x4a4bdf:'INs@',_0x3bbd63:'0x1a8',_0x39b707:'!$ye',_0x4eaaf2:'0x24b',_0x322dc5:'ZK3B',_0x16138b:'0x3d2',_0x37571c:'JYMj',_0x4b31fd:'0x32e',_0x5422ef:'b%]J',_0x22fdb4:'0x35a',_0x218ee2:'49qY',_0x5eb49a:'0x370',_0x4eb1ec:'A5VD',_0x4d485f:'0x3b2',_0x559390:'P*pG',_0x1f8ed0:'0x26d',_0x59bb6d:'qEEC',_0x19be3e:'0x9c',_0x5a0711:'2SJA',_0x1c266a:'0x300',_0x56b048:'4b#$',_0x2a4937:'0x1d8',_0x519a61:'w(B@'},_0x5841f6=bdy_0x593c,_0x3f68e3=_0x3b549c();while(!![]){try{const _0xe953aa=-parseInt(_0x5841f6(bdy_0x4c30f9._0x491e4e,bdy_0x4c30f9._0x595490))/(-0x2*0x100f+0xd7f*0x1+0x12a0)*(parseInt(_0x5841f6(bdy_0x4c30f9._0x6a1cf4,bdy_0x4c30f9._0x4a4bdf))/(-0x3dd*-0x1+-0x53*0xd+-0x4*-0x17))+parseInt(_0x5841f6(bdy_0x4c30f9._0x3bbd63,bdy_0x4c30f9._0x39b707))/(-0x247d*-0x1+-0x3*-0x4ff+0x307*-0x11)*(parseInt(_0x5841f6(bdy_0x4c30f9._0x4eaaf2,bdy_0x4c30f9._0x322dc5))/(-0x801*0x3+-0x5c6+0x1dcd))+parseInt(_0x5841f6(bdy_0x4c30f9._0x16138b,bdy_0x4c30f9._0x37571c))/(-0x25de+-0x17*0xc2+0x3751)+-parseInt(_0x5841f6(bdy_0x4c30f9._0x4b31fd,bdy_0x4c30f9._0x5422ef))/(0x4e9*0x7+-0x2304+-0xab*-0x1)*(parseInt(_0x5841f6(bdy_0x4c30f9._0x22fdb4,bdy_0x4c30f9._0x218ee2))/(0x11ff+0x17f*-0x17+0x1071))+parseInt(_0x5841f6(bdy_0x4c30f9._0x5eb49a,bdy_0x4c30f9._0x4eb1ec))/(0x2494+0x652+-0x2ade)*(parseInt(_0x5841f6(bdy_0x4c30f9._0x4d485f,bdy_0x4c30f9._0x559390))/(-0xac2+-0x1fcd+-0xbc*-0x3a))+-parseInt(_0x5841f6(bdy_0x4c30f9._0x1f8ed0,bdy_0x4c30f9._0x59bb6d))/(-0x8cd*0x3+0x207d+-0x60c)*(-parseInt(_0x5841f6(bdy_0x4c30f9._0x19be3e,bdy_0x4c30f9._0x5a0711))/(-0x2487+-0x26e+0x2700))+parseInt(_0x5841f6(bdy_0x4c30f9._0x1c266a,bdy_0x4c30f9._0x56b048))/(0x2*0x8cc+-0x250c+0x1380)*(-parseInt(_0x5841f6(bdy_0x4c30f9._0x2a4937,bdy_0x4c30f9._0x519a61))/(-0x14c0+0x13*0x113+0xa*0xa));if(_0xe953aa===_0x339a33)break;else _0x3f68e3['push'](_0x3f68e3['shift']());}catch(_0x30d1f8){_0x3f68e3['push'](_0x3f68e3['shift']());}}}(bdy_0x1bc0,-0xb42bd*0x1+-0x3122e+0x16507a));const bdy_0x515f57=$[bdy_0x2b77e2('0x10e','uFf)')]()?require(bdy_0x2b77e2('0x2ca','G1mM')):'',bdy_0x1ada7d=$[bdy_0x2b77e2('0x212','XH8]')]()?require(bdy_0x2b77e2('0x3d8','vzm)')):'',bdy_0x2d5623=require(bdy_0x2b77e2('0x330','qEEC'));let bdy_0x159b1c=[],bdy_0x41700b='',bdy_0x14ee03='',bdy_0x223dc8;const bdy_0x54aaa3=[''];if(process[bdy_0x2b77e2('0xd0','G1mM')][bdy_0x2b77e2('0x3ae','ZK3B')])try{require(bdy_0x2b77e2('0x294','P*pG')),ccc=require(bdy_0x2b77e2('0x2b7','[5)6')),$[bdy_0x2b77e2('0x2e1','7d1l')]=ccc[bdy_0x2b77e2('0x258','l&Ii')]($[bdy_0x2b77e2('0x301','%WUI')][bdy_0x2b77e2('0x308','T[uO')]($)),$[bdy_0x2b77e2('0x14f','49qY')]=ccc[bdy_0x2b77e2('0x2eb','hfIq')]($[bdy_0x2b77e2('0x2ed','p&[B')][bdy_0x2b77e2('0x93','j93A')]($));}catch{$[bdy_0x2b77e2('0x3c6','ioz$')](bdy_0x2b77e2('0x2a9','%WUI')),$[bdy_0x2b77e2('0x3ac','vzm)')]=$[bdy_0x2b77e2('0x2b4','9Q$j')],$[bdy_0x2b77e2('0x22f','T[uO')]=$[bdy_0x2b77e2('0x12c','GQPX')];}else $[bdy_0x2b77e2('0x32b','*^up')]=$[bdy_0x2b77e2('0xd4','ioz$')],$[bdy_0x2b77e2('0x282','49qY')]=$[bdy_0x2b77e2('0x89','vzm)')];let bdy_0x5c79ce=$[bdy_0x2b77e2('0x173','p&[B')]()?process[bdy_0x2b77e2('0x1c5','hfIq')][bdy_0x2b77e2('0x287','qL$o')]?process[bdy_0x2b77e2('0xda','9Q$j')][bdy_0x2b77e2('0x3a5','^Nx3')]:'':$[bdy_0x2b77e2('0x392','w(B@')](bdy_0x2b77e2('0x3d3','P*pG'))?$[bdy_0x2b77e2('0x1b1','q(@^')](bdy_0x2b77e2('0x23c','v!%B')):'';const bdy_0x589eac=$[bdy_0x2b77e2('0x292','q(@^')]()?-0x1a32+0x26b*0x5+0xe2f:0x31*0x40+0xa5e*0x1+-0x1699*0x1;function bdy_0x4fda62(_0x4238ea,_0x135910){const bdy_0x3c7608={_0x3c12d9:'0x1a9',_0x31826a:'aK[P',_0x7029b7:'0x14d',_0x2552b5:'q(@^',_0x34e416:'0x339',_0x1e3245:'sMHU',_0x40bff3:'0x348',_0x533060:'*^up',_0x32936f:'0x2ab',_0x2b74c4:'GQPX',_0x32edd8:'0x2d7',_0x101d5b:'uFf)',_0x2e7fc9:'0x1ab',_0x3f304c:'T[uO',_0x475773:'0x34f',_0x2bb498:'Nnz(',_0x2de6fc:'0xb0',_0x382644:'aK[P',_0x541841:'0x106',_0x4cbcbd:'Z]b(',_0x293d40:'0x2c0',_0x2f9af1:'INs@',_0x4b11de:'0x223',_0x3182dc:'0x382',_0x46cb30:'b%]J',_0x366199:'0x317',_0x429887:'*)Uo',_0x32e27
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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])