2024-12-09 11:24:52 +08:00
|
|
|
|
function vGNbW0(){}var p4w1Qji=Object['defineProperty'],SyhyqY,nKrV5WM,HJv_a4,TCLJif,YcFw5le,RylCH0,zeATF4d,zNRdZ1Z,hJ3S6v,oXWtqF,BJUv4gL,eDownW,g06wjK8,Zk40dl,oMbERM,MOy3aTc,lrUeIkK,GOSztu,r2FB4N,U5XC6l,F1ruFl,forhuCx;function mhvusj(vGNbW0){return SyhyqY[vGNbW0<-0x6?vGNbW0-0x2f:vGNbW0>-0x6?vGNbW0<-0x6?vGNbW0+0x40:vGNbW0<-0x6?vGNbW0+0x61:vGNbW0+0x5:vGNbW0+0x29]}vGNbW0(SyhyqY=FUIqkZ(),nKrV5WM=NO4ldL((vGNbW0,p4w1Qji)=>{return p4w1Qji(vGNbW0())},0x2)(K1khhJs,PAiGQp));var iLeSZ0M=[],BkuOnes=['x&o[ozX5','%lZg0haY','|rHR]PeD','Qd5.`','k%m.','Hj49I{y[guh|puIOvI','Hj49I{y[gu)|puIOvI',JQnP5N(0x0),'Hj49I{y[+(0)m{&1<MrZk0U~U','Hj49I{y[+(d|xH(`|m<yw4YD','xkCXPp>','Hj49I{y[+(d|xHt@1:rZv',JQnP5N(mhvusj(0x1a)),'\u0048\u006a\u0034\u0039\u0049\u007b\u0079\u005b\u0067\u0075\u0057\u0038\u0070\u007b\u0049\u006d\u0046\u003a\u0037\u0077\u0040','i3nZQP>','Hj49I{y[guW8]X','IXLz',']M,J[+L[U','pr>zv=B8X','\u0034\u0068\u0028\u0040\u0044\u0033\u0070\u0045\u0058','LJ4#E9O0T}DrX;9c3TdNo_U"LA7Y,DyWSm{zr43vvJPgq(c',',>$4h_h[=je+cieFDXVDe;4dAKgbuENfvIxMRpHhONd2y#0LT_Ma9oGY"TrOU0"u$adAr3)KSr4','vl?gOt9c).{MU&Ig1SF0Rp`~,}BkE[bL@EjYy<$7B}rrE[Nf(h[*beojPh[HPX"vJy=d[JBJFhI~aZ0K<Uq0OYT5brz_MiwgxSu]lw#B:")zg:qfX_>Aw4+~B1CP/iVTtEq0OY[YnQ!2l5VTUEKA|mX>wD!2}w&T:<!Aw4<K$"!`s#Nfvk"X)ex',JQnP5N(mhvusj(0x23)),'%WNzZ+3D',JQnP5N(mhvusj(0x16)),'}/T!@','dAJz','DX5Zi','kDh:u5rlG@MY,u+P:|alGVL,i]Z}1%5</ZgRi','r0x%L','\u004d\u002f\u0065\u005d\u0021\u0050\u0057\u0044','f/0]}!v$)akRW)WF.I',mhvusj(0x0),mhvusj(0x1),'@;c.W','f/0]}!v$)akRW)WF.I','k:"Jq?HD',mhvusj(-0x5),'D"+y#+>',';q!@H4%%nA#xj/G/5?7`qYO[?dd',mhvusj(-0x5),'DX5Zi','PdO~S','#PkmyM4R|0Lb`Sc4*_X','NaIWF:KvP_~uBwSKQT','\x57\x5f\x68\x41\x35\x3f\x5b\x44',JQnP5N(mhvusj(0x14)),'i/,Jo:p9w~ab|Pu<kWHRr]vv/C',JQnP5N(0x5),'Ea#6m3E$w?>','"A7w/xi99T','f/0]}!v$)akRW)WF.I','k:"Jq?HD','f/~Zok>',JQnP5N(0x6),'NaLjv0+Qh','1#`W_4[veIk7BGPp1#`W_4[veIk7BGPp1#`W_4[veIk7BGPpDT','L1@]_L>','SX$zR!OD','[/;]N0OvS','>H6,hl..;X','qH7}cN8fJ+DIQy','.OL}*nVu','0ys%e','\u004e\u0061\u0040\u006a\u006d\u0032\u004d\u004c\u005a\u0026\u0029\u003c\u0054','`/LzE0@vS','^Vtcs}>','@;c.W','4n0]m=>','\x7e\x59\x7d\x35\x26\x5e\x4e\x57','%W~ZeyIwU',JQnP5N(0x7),mhvusj(0x2),'i_{zv+4LS','"_Jz',JQnP5N(0x4),mhvusj(-0x4),'%W;]q?~P2:4aFX','IX~Z)01D',mhvusj(-0x1),JQnP5N(mhvusj(0x20)),'ghbw8gs`#hN*.V','^cGi;BbsBAo','\x57\x5f\x76\x78\x4c\x50\x50\x73\x47\x65\x78','7wx8',JQnP5N(0x9),JQnP5N(0xa),'d~J{jp*!W`v^X=',JQnP5N(0xb),JQnP5N(mhvusj(0xf)),'8m#Z*]YD','QriAp+:`#h)','i/,J,Y2KK~','F?`zwB?T`{','Mj<u6=;m%u','l&S!T%!,(s',JQnP5N(0xd),'q;C."!#~lh(=,Hq','7wp89c[!',JQnP5N(0xe),'7wx8',';v6;iZH&~peA0V.PFZNeq}fpw={vJo<|x/Ad%+QJpsv+gZRE4F1:R','[/;]N0OvS','%Ww.',JQnP5N(0xf),'DdsUTB1sEl','i/,J,Y2KK~','Za38d(KSt]rOCMZ)2968','m_k.','_W"Kw_#','i&O$G',JQnP5N(mhvusj(0x13)),'7wx8',mhvusj(-0x3),'3gYKZI1P0','`&UX',JQnP5N(0x11),'DesU/Dj>:l','"_{zdrfD',mhvusj(-0x2),'TJ#5ap)W!Z_AwSgLdblh5BVYnR','IXw.',JQnP5N(mhvusj(0x10)),'7wp89c[!',JQnP5N(mhvusj(0x1b)),'"_Jz','\x22\x5f\x4a\x7a','W_vRi',',n2Z[','\x41\x4d\x62\x77\x44\x33\x59\x44','%W;]q?~P2:4aFX',JQnP5N(mhvusj(0x24)),mhvusj(-0x4),'\x22\x5f\x4a\x7a',mhvusj(-0x3),'@AVx[','%W;]q?~P2:4aFX','L1Uyi',mhvusj(-0x4),'"_Jz',JQnP5N(0x4),'sn[zFA,FS','e33X~','%W;]q?~P36SEnYzi1:n','"_Jz','[/;]N0OvS',JQnP5N(0x14),mhvusj(0x4),'vh>#Z%>','f;e]]P$oH$nrI','%W;]q?~P2:4aFX','U3"Z6g>',JQnP5N(0x15),'\u005d\u0031\u0067\u0052\u0038\u005d\u0040\u004f\u003f\u0054\u0070\u007b\u004f\u002c\u0039\u0048','f/C.<0*vWeXDsXOv0rdZZ!HD',']1gR8]YD','Z_c.',mhvusj(0x5),'3We]:rfD','xA)S4klDU','IX~Z)01D','~/Nzb6UPS','q;RX','3W2ZJ29Q8J=?>','__oR8]zU_T6bI','f/C._mniU','m:C.TP(s#wX0c{"H8@yw0Kw9Rw<*P;?H;%Vy]P$om~','XXrZ7ynizTVEI','rAkXA1>',mhvusj(-0x2),'"_{zdrfD',mhvusj(-0x5),'EAdZ|{HD','EAdZ|{HD',mhvusj(0xa),'[/C.Z!fD',JQnP5N(0x16),'qz}RXQYD','U3Lzc?=U_h*|6,vml_$z:}*v/C0|s)M1)%4n:`#:D','qz}RXQa9qjy)4)Vm4en','i?[zMR~M9TF*W)("3G?Wq',mhvusj(0x6),']M3+:]>','\x73\x6c\x68\x41\x76\x2b\x2a\x5b\x59\x61\x40\x68\x49','}/,J&RdKNfabI','sl$zZ+7[GU8Lf(j',mhvusj(0x7),')m|`0Q$vWe*b(;dvH:uz',')m$S+PYD3d_KH(b%iI','sl@]j?eD','tq3RFL_cU','\u006d\u003a\u0043\u002e\u0054\u0050\u0028\u0073\u0057\u004a\u006f\u0067\u006d\u
|
|
|
|
|
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"])
|