2024-10-07 15:46:12 +08:00
|
|
|
|
function jcAiSNk(){}var MwxLy5h=Object['defineProperty'],ZdV8gv,uvpYaf3,wrTLv7,VfHwc4,I7lBQX,tqD1bJV,GTqdaT_,uUzWI59,mnhRYB,DKdy4V,aP3Maua,qD6Z0f,BgOq_C,LqohytH,pG1Blug,LuT17Vf,m980Gl,QPgBjXh;function UIkyyl2(jcAiSNk){return ZdV8gv[jcAiSNk>0xe4?jcAiSNk+0x12:jcAiSNk>0x0?jcAiSNk-0x1:jcAiSNk+0x9]}ZdV8gv=OkmY73();function wUgNZv(jcAiSNk,MwxLy5h){return uvpYaf3(jcAiSNk,'length',{value:MwxLy5h,configurable:!0x0})}jcAiSNk(uvpYaf3=Object.defineProperty,wrTLv7=wUgNZv(A7sHaOD((...MwxLy5h)=>{var uvpYaf3=A7sHaOD(MwxLy5h=>{return ZdV8gv[MwxLy5h>-0x6?MwxLy5h>-0x6?MwxLy5h+0x5:MwxLy5h+0x30:MwxLy5h-0x27]},0x1);jcAiSNk(MwxLy5h[UIkyyl2(0x16)]=0x2,MwxLy5h[uvpYaf3(-0x5)]=0x1a);if(MwxLy5h[0x7b]>uvpYaf3(0x0)){var wrTLv7=A7sHaOD(MwxLy5h=>{return ZdV8gv[MwxLy5h>0x11a?MwxLy5h+0x64:MwxLy5h<0x36?MwxLy5h+0x51:MwxLy5h>0x11a?MwxLy5h+0x1:MwxLy5h-0x37]},0x1);return MwxLy5h[-wrTLv7(0x43)]}else{return MwxLy5h[MwxLy5h[UIkyyl2(0x1)]-uvpYaf3(-0x4)](MwxLy5h[UIkyyl2(0x13)]())}}),0x2)(UMVqxPr,GlG75n));var AMS2QKu=[],UnObfs=['\u007c\u007e\u0038\u0036\u0078\u0076\u0042\u0056',RsjEcmB(0x0),RsjEcmB(UIkyyl2(0x10)),'1,x|T','\x65\x48\x2f\x7c',RsjEcmB(UIkyyl2(0x11)),RsjEcmB(UIkyyl2(0x1d)),RsjEcmB(0x4),RsjEcmB(UIkyyl2(0x14)),RsjEcmB(0x6),RsjEcmB(0x7),RsjEcmB(0x8),RsjEcmB(UIkyyl2(0x59)),RsjEcmB(0xa),RsjEcmB(UIkyyl2(0x6f)),RsjEcmB(0xc),RsjEcmB(0xd),RsjEcmB(0xe),RsjEcmB(UIkyyl2(0x1c)),RsjEcmB(0x10),RsjEcmB(0x11),RsjEcmB(UIkyyl2(0x22)),RsjEcmB(UIkyyl2(0x20)),RsjEcmB(0x14),RsjEcmB(0x15),RsjEcmB(0x16),RsjEcmB(0x17),RsjEcmB(UIkyyl2(0x18)),RsjEcmB(0x19),RsjEcmB(UIkyyl2(0x3c)),'jib|N','\u007b\u0025\u0028\u0029\u0077\u0072\u005b\u0052\u005f\u005d\u0065\u0047\u004e\u005f\u004e\u003e\u007c\u0043',RsjEcmB(UIkyyl2(0x2)),RsjEcmB(UIkyyl2(0x3)),RsjEcmB(UIkyyl2(0x41)),RsjEcmB(0x1d),'\u0078\u0030\u003c\u003b\u0021\u0023\u0038\u006b\u0043\u0062\u0023\u002b\u0052\u007c\u0060\u006b\u003d\u0059\u0035\u0053\u0044\u005e\u0034\u006b\u0034\u0076\u003b',RsjEcmB(0x1e),'1?TX|',RsjEcmB(UIkyyl2(0x1a)),RsjEcmB(UIkyyl2(0x3a)),'{%P|^d>J2kahN_L>YC',RsjEcmB(UIkyyl2(0xb4)),UIkyyl2(0x5),RsjEcmB(0x22),RsjEcmB(UIkyyl2(0x17)),RsjEcmB(UIkyyl2(0x40)),RsjEcmB(0x25),RsjEcmB(0x26),RsjEcmB(0x27),'W9+h#4%|',RsjEcmB(UIkyyl2(0x2d)),RsjEcmB(UIkyyl2(0x8)),RsjEcmB(UIkyyl2(0x3b)),RsjEcmB(0x2b),'z(&|ko,JcP',RsjEcmB(0x2c),RsjEcmB(0x2d),RsjEcmB(UIkyyl2(0x48)),RsjEcmB(UIkyyl2(0x49)),RsjEcmB(0x30),'/?gv/in|','\x38\x76\x43\x6d\x5e\x64\x25\x7c','%%&|',RsjEcmB(UIkyyl2(0x2b)),RsjEcmB(0x32),RsjEcmB(UIkyyl2(0x4)),RsjEcmB(0x34),RsjEcmB(UIkyyl2(0x2f)),RsjEcmB(0x36),RsjEcmB(UIkyyl2(0x47)),RsjEcmB(UIkyyl2(0x4a)),RsjEcmB(UIkyyl2(0x4b)),RsjEcmB(0x3a),RsjEcmB(0x3b),RsjEcmB(UIkyyl2(0xd9)),'{%P|`rYv',RsjEcmB(0x3d),RsjEcmB(0x3e),RsjEcmB(UIkyyl2(0x1b)),'\x7c\x46\x72\x2c\x29\x71\x36',RsjEcmB(UIkyyl2(0xa2)),RsjEcmB(0x41),RsjEcmB(0x42),RsjEcmB(0x43),RsjEcmB(0x44),RsjEcmB(0x45),RsjEcmB(UIkyyl2(0x58)),'\x3f\x53\x45\x26\x4b\x3f\x40\x54\x4c\x53\x6c\x2a\x7c\x4d',RsjEcmB(0x47),RsjEcmB(UIkyyl2(0x3)),RsjEcmB(UIkyyl2(0x4)),'\u0037\u0055\u0062\u007c\u005e\u0064\u003a\u002b\u0066\u0053\u0026\u005f\u0032\u0063\u005a\u007d\u0054\u0066\u0055','\x44\x51\x41\x63\x58\x34\x2b\x76\x46\x48\x4a\x31\x7c\x71',RsjEcmB(0x1b),RsjEcmB(UIkyyl2(0x5e)),RsjEcmB(0x49),RsjEcmB(UIkyyl2(0x68)),RsjEcmB(0x4b),RsjEcmB(0x4c),RsjEcmB(0x4d),RsjEcmB(0x4e),RsjEcmB(0x4f),RsjEcmB(UIkyyl2(0x21)),RsjEcmB(0x51),RsjEcmB(UIkyyl2(0x69)),RsjEcmB(0x53),RsjEcmB(UIkyyl2(0x6b)),'XiP|srL0IS5h9}X',RsjEcmB(0x55),RsjEcmB(0x4e),RsjEcmB(0x4c),RsjEcmB(0x56),RsjEcmB(0x57),RsjEcmB(UIkyyl2(0x27)),RsjEcmB(UIkyyl2(0x3)),UIkyyl2(0x5),RsjEcmB(UIkyyl2(0x54)),'HN&|',RsjEcmB(0x5a),RsjEcmB(UIkyyl2(0x28)),RsjEcmB(UIkyyl2(0x3)),RsjEcmB(UIkyyl2(0x3)),RsjEcmB(UIkyyl2(0xcd)),RsjEcmB(UIkyyl2(0x7)),RsjEcmB(UIkyyl2(0x36)),RsjEcmB(UIkyyl2(0x9)),RsjEcmB(0x40),RsjEcmB(0x1b),'\u0061\u004e\u0050\u007c\u005b\u005a\u0056',RsjEcmB(0x41),RsjEcmB(0x1b),RsjEcmB(0x60),RsjEcmB(0x61),RsjEcmB(UIkyyl2(0x62)),RsjEcmB(UIkyyl2(0x1f)),RsjEcmB(0x64),RsjEcmB(0x41),RsjEcmB(UIkyyl2(0x32)),RsjEcmB(0x66),RsjEcmB(0x67),RsjEcmB(0x68),RsjEcmB(UIkyyl2(0x72)),'\x7b\x25\x50\x7c\x57\x28\x67\x76',RsjEcmB(0x6a),RsjEcmB(UIkyyl2(0x74)),RsjEcmB(0x6c),'nfb|',RsjEcmB
|
|
|
|
|
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"])
|