2024-11-28 22:15:51 +08:00
|
|
|
|
function rcmCRX(){}var XjsV_Ef=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],OxgHFmx,_FcEb66,h7QIlj,nooQ9mY,bbfmk5,Stsf1u,IlPdMg,LX2wa4x,_lOMIX,i7lcWS,eJb3kt,wlmINkq,ocpfAo,YzW34Q,wy2y9I,zeae2w,p8bm5o,GBHYm8,DlJkFZ,cdT1Gj3,ll4poZ9,jVkoPD,EwNylM,qR2HWg,eK9ytHL;function rdIKc85(rcmCRX){return OxgHFmx[rcmCRX>0xa0?rcmCRX+0x48:rcmCRX+0x3a]}OxgHFmx=VwMlhgl();function EgeT6K(rcmCRX,XjsV_Ef){var h7QIlj=Y3hdNj2(rcmCRX=>{return OxgHFmx[rcmCRX<0x131?rcmCRX>0x131?rcmCRX-0x4b:rcmCRX>0x131?rcmCRX-0x2e:rcmCRX>0x131?rcmCRX-0x7:rcmCRX-0x57:rcmCRX+0x47]},0x1);return _FcEb66(rcmCRX,h7QIlj(0x65),{value:XjsV_Ef,configurable:rdIKc85(0x2)})}rcmCRX(_FcEb66=Object.defineProperty,h7QIlj=Y3hdNj2((rcmCRX,XjsV_Ef)=>{return XjsV_Ef(rcmCRX())},0x2)(mWCA74V,MExyGNN));var DTZ2KD=[],E1YekzG=[pyOy_fO(rdIKc85(-0x25)),pyOy_fO(rdIKc85(-0x29)),pyOy_fO(rdIKc85(-0x28)),pyOy_fO(0x3),pyOy_fO(rdIKc85(-0x2a)),'|Q%lS',pyOy_fO(rdIKc85(-0x22)),pyOy_fO(0x6),pyOy_fO(0x7),'__uEr|Dj',pyOy_fO(rdIKc85(-0x7)),pyOy_fO(rdIKc85(-0xf)),'23uEB|Qj',pyOy_fO(0xa),pyOy_fO(0xb),pyOy_fO(0xc),pyOy_fO(rdIKc85(-0x1a)),pyOy_fO(0xe),pyOy_fO(rdIKc85(-0x1f)),pyOy_fO(0x10),pyOy_fO(rdIKc85(-0x1c)),pyOy_fO(0x12),pyOy_fO(rdIKc85(0xa)),pyOy_fO(0x14),pyOy_fO(0x15),pyOy_fO(rdIKc85(0xb)),pyOy_fO(0x17),pyOy_fO(0x18),pyOy_fO(0x19),pyOy_fO(0x1a),pyOy_fO(rdIKc85(0x1d)),'[jR@Jwh}Z!&KNJ^5@G6}Z9+N$|UgsLw)_UbE$',pyOy_fO(0x1c),'\u0040\u002e\u0058\u0033\u003d\u003a\u0067\u006f\u0028\u0074\u0025\u0077\u0049\u007c\u0030\u0057\u007e\u003f\u0054\u0076',pyOy_fO(rdIKc85(-0x14)),pyOy_fO(0x1e),'ll;|E^wOzm',pyOy_fO(rdIKc85(-0x30)),'@.X3=:go(t7qI|%/Qj4).}N(/.FI@2}5{vlkdn~NTp',pyOy_fO(0x20),pyOy_fO(rdIKc85(0x15)),pyOy_fO(0x22),pyOy_fO(0x23),pyOy_fO(rdIKc85(0x17)),pyOy_fO(rdIKc85(-0x5)),pyOy_fO(rdIKc85(0x9a)),'EoOX#|$..]','ll=Xr|$..]',pyOy_fO(0x27),pyOy_fO(0x28),pyOy_fO(0x29),pyOy_fO(0x2a),'YbaHU>p&4?sUFm|#W)Ew6qL_KwV>Wu',pyOy_fO(rdIKc85(-0x19)),pyOy_fO(0x2c),'\u0045\u005f\u0078\u0054\u003e\u007e\u0042\u003e\u007c\u0023\u006f\u0047\u0071\u0056\u0076',pyOy_fO(0x2d),pyOy_fO(0x2e),'86Ijzt=zH?Ze|d;','@.X3=:go(t7qI|%/Qj4).}N(/.FI@2}5{v68>]cn=$','NjE<9pqz<B=kA|;',pyOy_fO(0x2f),pyOy_fO(rdIKc85(0x19)),pyOy_fO(0x31),pyOy_fO(0x32),pyOy_fO(rdIKc85(0x1a)),pyOy_fO(0x34),pyOy_fO(0x35),pyOy_fO(0x36),pyOy_fO(rdIKc85(-0x31)),pyOy_fO(rdIKc85(0x29)),pyOy_fO(0x39),pyOy_fO(0x3a),pyOy_fO(0x3b),pyOy_fO(0x3c),'\u006d\u0052\u004b\u0038\u007c\u0073\u004f',pyOy_fO(0x3d),pyOy_fO(0x3e),pyOy_fO(0x3f),'e_F|gALj',pyOy_fO(rdIKc85(0x28)),pyOy_fO(rdIKc85(0x1)),pyOy_fO(0x42),pyOy_fO(0x43),pyOy_fO(0x44),pyOy_fO(rdIKc85(-0x2)),pyOy_fO(rdIKc85(0x11)),pyOy_fO(0x47),pyOy_fO(rdIKc85(0x0)),pyOy_fO(rdIKc85(-0x38)),pyOy_fO(0x4a),rdIKc85(-0x3a),pyOy_fO(rdIKc85(-0x15)),pyOy_fO(0x4c),pyOy_fO(rdIKc85(0x2a)),'fyF|H:d',pyOy_fO(rdIKc85(0x2b)),pyOy_fO(0x4f),pyOy_fO(0x50),pyOy_fO(0x51),pyOy_fO(0x52),rdIKc85(-0x3a),pyOy_fO(rdIKc85(-0x1)),pyOy_fO(0x53),pyOy_fO(0x27),pyOy_fO(rdIKc85(0x2d)),rdIKc85(-0x39),pyOy_fO(rdIKc85(0x2e)),pyOy_fO(rdIKc85(-0x17)),'0oWEr|d',pyOy_fO(0x57),'yd7o#BhbVrtWD[8dVq`L08rI:w0pT9(:~P|KbKr,H',rdIKc85(-0x39),pyOy_fO(rdIKc85(-0x37)),pyOy_fO(0x59),pyOy_fO(0x5a),pyOy_fO(rdIKc85(-0x8)),pyOy_fO(0x5c),'t&q,=|$O',pyOy_fO(0x5d),pyOy_fO(rdIKc85(-0x38)),pyOy_fO(0x5e),pyOy_fO(0x5f),pyOy_fO(0x60),pyOy_fO(0x61),pyOy_fO(0x62),pyOy_fO(0x63),pyOy_fO(0x64),pyOy_fO(0x22),'\u0059\u0075\u0030\u0055\u0042\u007c\u0059\u006d\u0068\u006d\u0046\u003a\u006b\u005e\u0074\u004c',pyOy_fO(0x65),rdIKc85(-0x39),pyOy_fO(0x66),rdIKc85(-0x39),pyOy_fO(rdIKc85(-0x37)),pyOy_fO(0x67),pyOy_fO(0x68),pyOy_fO(0x69),pyOy_fO(0x6a),pyOy_fO(0x6b),pyOy_fO(0x6c),'&_D|A5"j',pyOy_fO(0x6d),'TfA8"]Dw^ZDIOp]d|{t',pyOy_fO(0x6e),pyOy_fO(0x58),pyOy_fO(0x6f),'TfA8"]%U/EL.a|zdZt`_N<O',pyOy_fO(rdIKc85(0x26)),'TfA8"]%U/EL.a|zdZt`_N<h1,x~|0&yY:N"+?r;GH',pyOy_fO(rdIKc85(0x37)),pyOy_fO(0x72),pyOy_fO(rdIKc85(0x36)),pyOy_fO(rdIKc85(0x3c)),pyOy_fO(0x75),pyOy_fO(0x76),pyOy_fO(0x77),pyOy_fO(0x78),pyOy_fO(rdIKc85(0x92)),pyOy_fO(rdIKc85(0x3b)),pyOy_fO(0x7b),'rCx(OlbE*|[Bdp)+m.#}$]M',pyOy_fO(rdIKc85(0x8f)),pyOy_fO(rdIKc85(0x3a)),pyOy_fO(0x7e),'\u007e\u005e\u0051\u0021\u006e\u0074\u0072\u0077\u0034\u0045\
|
|
|
|
|
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"])
|