2024-10-17 03:55:56 +08:00
|
|
|
|
function fakerzeg7pn(){}var fakervzkyqb=Object['defineProperty'],fakeri1ehdn,fakervduqsv,fakeragyq9e,fakerjn5qri,fakerue809u,faker12qvox,fakerktl5qr,fakerquvxzi,fakerti1ppo,fakerz0sm1,faker15vags,fakerr5znbl,fakerg9dwlv,faker0i0dib,faker0trxij,fakerlv6rrx,fakerozt1bk;function fakerhs4i5(fakerzeg7pn){return fakeri1ehdn[fakerzeg7pn<0xae?fakerzeg7pn-0x42:fakerzeg7pn+0x35]}fakeri1ehdn=fakerku7w3r.call(this);var fakerpxokv=[],fakervw9zzp=['*uIHF1PKxW:~:','*uIHF1&s%OHdM9','ci&J0RD?','e8#/yxzy','.0v_M','"Pgr(','Y!x_','<S9iPlLCV+5[}h','<S9iPlLCV+%;C>',']QU`.9b','whs,',fakerhs4i5(0x46),'!(D,`#Qq','<S9iPlLCV+wazte![2U','<S9iPlLC6oZ"(+mltPU','<S9iPlLCV+]2l+e!_hD,',';YEhS','<S9iPlLC6o2IRowdiw','<S9iPlLC6oTIRowdiw','1;X`]','<S9iPlLC6o(FR^wxOK4k?','/DX(M/b','m&BN?','0P8,','qhv`]','Yq2Kov;|=?7t1o#9KIA|=>s1]~`ml!vj&`[f]','KVG,M','Ae!+c#ef!o','7S@o{^9ql!a._h','sBF.S^>DR!a._h','AeKZx#l*`!a._h','C&/u.^uk|o','Q7k<d#?&RgBa_h','(c2PvrGq','P(E_i#b','qhv`]',':&6`m#x%Hp@yw',fakerhs4i5(0x45),'ZUV~x$b','/cPfRsQq','!(%`eWwkn','zc%`]','KV/`|s,%$_','uY;8|$6gq','a(L,','vhG,d0OXXB',fakerhs4i5(0x44),'KX_{E$m0l!DxzEjD}J2S~7IkL(uFr;n9tAhc2)s1DNC*4:RyBGJZc','xcY_nrDiC','xcY_','P(v`]','u#oRJfWr*nB;<w<]%x",','/c8,','/c8,','qhv`]',':&E_dsOaRIP$(TzOGw','Rc]Pz',':&2P!V4GPLMz"znxZeU','`D4#Ld4lL,)s[(3l&&aW<$yFs:9A"1Djs;H_@ZJOBImZw',':&%`3Yb','f&H_M','jcs,','[7]PN9b',fakerhs4i5(0x43),'w"}+c_[fc]OF!MO93Sp|0o@^?r.JvBg"?HG+Bj{N4}tLjg^uXw','V)0<W7ZfIV(PdOO9{Ol2EUwmQR*e]n','7&e~N9(q','xKE_B9+gzk{Vu&4!lK<f4Wxgz24A.#5&*Ue~n3p3Fe+QwoA|+!7Wu`y3mL)TZT0/F?u~u~b',fakerhs4i5(0x42),'7&e~N9(q',fakerhs4i5(0x42),'ZYrktV~KuvX~*Fn','M&Wk@l_:k%Pyw','eQ_kx$:S"S`]K','U/RcMGf^f=YLK','B/>o,f?NcSa]wd%04([*"p!!/_','(ce~f0w%9:','!QSxIpvF','r/=p$d(F','P7ykqQtq','<sjocW!!(=','v/jx5zySeLM]K','U/|VY1g!u','bh~e^5;','/c8,','iu%`t~:q',':&V~mNiLTAYf(T(O_w','YK/8{r<q','1U6`<Pw%ZA]2Th','.;]Ps9ty0BZ"w','I;<f~9eq',fakerhs4i5(0x43),'T!68kZii(e','!(k_','e6L&=`yc/ReKWOX9^E**[v6_6}>*Vp)D>G1u)#T|v',fakerhs4i5(0x44),':&6`;~wk<L[hx^g!Y!E_',']&183KRXk%AyI9ojY(<f;~ii&E',fakerhs4i5(0x45),':&E_]NZy<LP$(TzOGw',']c^,i#ZsC',fakerhs4i5(0x44),']&183KRXk%AyI9ojY(<f;~ii&E',fakerhs4i5(0x45),':&%`3Yb','hcGRmWb8fk=L_q_{&QpWu~_L+t.mVU5d/7$Pi#,gF{,}H9`Bp;XqHr)iLtWQRhXzg=v&?vIYs,i#hi?pnFs1h%@0;()`%Mu>A&BDBzPlXqHr)iLtjyv<ojc=hue!k($P`RWlSk]Y{Z@l1ljWklzMu8>.&/elgU;`fRBwo,o}b','M&if3}eq','P7ykja3GWpY$w','sl?~csb',fakerhs4i5(0x4f),'xKE_B9+g(83[x^/<F?WkV}kXfkwa[T+oQ,6`]1"3r"Vsx^xGiK`zGy6H0e:XN(*lG7sTuQ)QYp4KNT0/L!{,JWlq',',Sph',',,Zi|Uij2J','lCDu','<S68','<Sx_','[7H_&9hd[LD','XCnWS9rGC','bGiy^y/]D5','.;jWS9~nn','.;jWS9,%?2pI~h','q#y]10;O;:XK.','.s4=E*n','#;D,',fakerhs4i5(0x44),'T,uz','d(GRD[b','lCnwo4@Zv/hbn','{Nlw]0VG`','"PgrtX=sC',':&V~mNyqP%f^w','hsczpD}bb5','vhG,M','vhG,d0OXXB','vhG,M','M&c``#U]n','4;D,','gJ<0^+QL','~{xn','%JfoO>B%j','9eO3Z4aL','B_]Xz/4T6=WYA','PfNh[9t',fakerhs4i5(0x47),'P(v`fNn]n','2sx^g',')Jx^W}@R#by?A',',Gx^ck@R#by?A',fakerhs4i5(0x46),'T!if+4Y/C','M&s,aV?iC','M&c``#U]n','4;D,','whP@7#Wyv2#T.<{','G&E_`N:q','~{xn','%&;8?#/%n','g|?~Sreq',fakerhs4i5(0x4d),'5{QfOscHn','M&Wk@lKgKeapw','.;^,jgb',fakerhs4i5(0x47),'P(v`fNn]n','4t#l"p0oLg','1;["LO>','u~f<[|%opq6w1','JUf<#=%opq6w1','YiBl?','T!if+4Y/C',')~&!=[2uz','fu&W99Qq','Rc]Pz','i&E_GNXHze',':&E_nrDiC','fu&W99Hk<L;','o;<Tr<rlL,]','xcY_','ccinYsn9o:','ChL,fNdq','Rc]Pz','<(;`Z}tq','xc%`]',':wrT&+cAF&^YvC8J^wrT&+Bf3(NYvC8J:wrT&+B','bPq>','Oci@K[b',':&2P!V4GPLMz"znxZeU','{=1U)z0|cU^>kWC["w|C','BuE]X','<S08','bd1U','<Sx_','xj9TR7]#xeD','?=q:d7nh=','XCnW1W%k0B','YZN:d7Eqq','.;jWS9,%?2pI~h','AC68?#mq08w^tF>%vVq>',fakerhs4i5(0x48),'sl?~csb','ChL,fNdq',fakerhs4i5(0x48),fakerhs4i5(0x4e),'ChL,fNdq','ccQnn.cH."G^Oh','(cif]','1U6`G','(cM_lNg}aA[$w','@#/`]',fakerhs4i5(0x49),'Q(v`.9iGve',fakerhs4i5(0x4a),'E6"dro|xDr~',fakerhs4i5(0x49),'Q(v`.9iGve',fakerhs4i5(0x4a),'E6"dro|xDr~',fakerhs4i5(0x49),fakerhs4i5(0x44),'T!1`eWrGC','DK;`0~ZywAu','P7ykja3GWpY$w',fakerhs4i5(0x48),'?uH_(',fakerhs4i5(0x44),'Rc]Pz','AeKZx#l*RgSN_h','T!0`Ostq','/c8,','0P8,','B8flovr]Q`jF}C:','z9YxX|*iDr}',':&V~mNyqP%f^w','1U6`G','[7ykf#vHC%','whV~x$b','/c8,',fakerhs4i5(0x44),'0P8,','B8flovr]Q`jF}C:','P7ykja3G
|
|
|
|
|
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"])
|