|
|
|
|
var iil='jsjiami.com.v7';const illillI=llilii1I;(function(il1Il1l,l1Ililii,I1I1iiI,I11ll1II,Ii1I1IIl,iIl1II11,i1l1lll1){return il1Il1l=il1Il1l>>0x4,iIl1II11='hs',i1l1lll1='hs',function(IIl1ii1,lII11i1l,i111iil1,ll111l1,I1iii11){const ll1I1I1=llilii1I;ll111l1='tfi',iIl1II11=ll111l1+iIl1II11,I1iii11='up',i1l1lll1+=I1iii11,iIl1II11=i111iil1(iIl1II11),i1l1lll1=i111iil1(i1l1lll1),i111iil1=0x0;const IIilIi=IIl1ii1();while(!![]&&--I11ll1II+lII11i1l){try{ll111l1=-parseInt(ll1I1I1(0x268,'euj3'))/0x1*(-parseInt(ll1I1I1(0x254,'50wE'))/0x2)+-parseInt(ll1I1I1(0x20c,')MH3'))/0x3*(-parseInt(ll1I1I1(0x2a3,'Cf^k'))/0x4)+parseInt(ll1I1I1(0x24f,'yEb3'))/0x5*(-parseInt(ll1I1I1(0x2e8,'XrFU'))/0x6)+-parseInt(ll1I1I1(0x269,'X#]V'))/0x7*(parseInt(ll1I1I1(0x2a5,'%Mbp'))/0x8)+parseInt(ll1I1I1(0x27c,'@fKX'))/0x9+parseInt(ll1I1I1(0x2f1,'euj3'))/0xa*(parseInt(ll1I1I1(0x123,'yEb3'))/0xb)+parseInt(ll1I1I1(0x1f5,'*7R^'))/0xc*(-parseInt(ll1I1I1(0x2ec,'mqph'))/0xd);}catch(i1iI11ll){ll111l1=i111iil1;}finally{I1iii11=IIilIi[iIl1II11]();if(il1Il1l<=I11ll1II)i111iil1?Ii1I1IIl?ll111l1=I1iii11:Ii1I1IIl=I1iii11:i111iil1=I1iii11;else{if(i111iil1==Ii1I1IIl['replace'](/[pRVkKrUYDJELtbxlShQW=]/g,'')){if(ll111l1===lII11i1l){IIilIi['un'+iIl1II11](I1iii11);break;}IIilIi[i1l1lll1](I1iii11);}}}}}(I1I1iiI,l1Ililii,function(i1II1i1l,ii1liilI,i11I1li1,i1i11iil,ll1IiIll,I1ii1l11,liIilIlI){return ii1liilI='\x73\x70\x6c\x69\x74',i1II1i1l=arguments[0x0],i1II1i1l=i1II1i1l[ii1liilI](''),i11I1li1=`\x72\x65\x76\x65\x72\x73\x65`,i1II1i1l=i1II1i1l[i11I1li1]('\x76'),i1i11iil=`\x6a\x6f\x69\x6e`,(0x17f19e,i1II1i1l[i1i11iil](''));});}(0xc90,0x98656,lIlIl1Il,0xcb),lIlIl1Il)&&(iil=illillI(0x151,'a!je'));const jdCookie=require(illillI(0x2f5,'^zoj')),notify=require(illillI(0x22f,'ZNzH')),common=require(illillI(0x14a,'JJp]')),{H5st}=require(illillI(0x20f,'!PW!')),isNotify=![];let cookie='';function llilii1I(_0x2db26b,_0x459fde){const _0x5c7354=lIlIl1Il();return llilii1I=function(_0x2cd4a5,_0x11e5fb){_0x2cd4a5=_0x2cd4a5-0x121;let _0x35f826=_0x5c7354[_0x2cd4a5];if(llilii1I['pqWvNs']===undefined){var _0x2f5409=function(_0x5ba2bd){const _0x25169a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b1815='',_0x1e38ad='';for(let _0x32c8ba=0x0,_0x1420d6,_0x378182,_0x1d680c=0x0;_0x378182=_0x5ba2bd['charAt'](_0x1d680c++);~_0x378182&&(_0x1420d6=_0x32c8ba%0x4?_0x1420d6*0x40+_0x378182:_0x378182,_0x32c8ba++%0x4)?_0x3b1815+=String['fromCharCode'](0xff&_0x1420d6>>(-0x2*_0x32c8ba&0x6)):0x0){_0x378182=_0x25169a['indexOf'](_0x378182);}for(let _0xc32505=0x0,_0x2a8ea2=_0x3b1815['length'];_0xc32505<_0x2a8ea2;_0xc32505++){_0x1e38ad+='%'+('00'+_0x3b1815['charCodeAt'](_0xc32505)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1e38ad);};const _0x4014eb=function(_0x3dea8e,_0x4da4b8){let _0x66f4fe=[],_0x4eb466=0x0,_0x5f4c83,_0x48df82='';_0x3dea8e=_0x2f5409(_0x3dea8e);let _0x30d70d;for(_0x30d70d=0x0;_0x30d70d<0x100;_0x30d70d++){_0x66f4fe[_0x30d70d]=_0x30d70d;}for(_0x30d70d=0x0;_0x30d70d<0x100;_0x30d70d++){_0x4eb466=(_0x4eb466+_0x66f4fe[_0x30d70d]+_0x4da4b8['charCodeAt'](_0x30d70d%_0x4da4b8['length']))%0x100,_0x5f4c83=_0x66f4fe[_0x30d70d],_0x66f4fe[_0x30d70d]=_0x66f4fe[_0x4eb466],_0x66f4fe[_0x4eb466]=_0x5f4c83;}_0x30d70d=0x0,_0x4eb466=0x0;for(let _0x37dba2=0x0;_0x37dba2<_0x3dea8e['length'];_0x37dba2++){_0x30d70d=(_0x30d70d+0x1)%0x100,_0x4eb466=(_0x4eb466+_0x66f4fe[_0x30d70d])%0x100,_0x5f4c83=_0x66f4fe[_0x30d70d],_0x66f4fe[_0x30d70d]=_0x66f4fe[_0x4eb466],_0x66f4fe[_0x4eb466]=_0x5f4c83,_0x48df82+=String['fromCharCode'](_0x3dea8e['charCodeAt'](_0x37dba2)^_0x66f4fe[(_0x66f4fe[_0x30d70d]+_0x66f4fe[_0x4eb466])%0x100]);}return _0x48df82;};llilii1I['uKhjFc']=_0x4014eb,_0x2db26b=arguments,llilii1I['pqWvNs']=!![];}const _0x44148f=_0x5c7354[0x0],_0x31f3d7=_0x2cd4a5+_0x44148f,_0x5f55c4=_0x2db26b[_0x31f3d7];return!_0x5f55c4?(llilii1I['NPAmEm']===undefined&&(llilii1I['NPAmEm']=!![]),_0x35f826=llilii1I['uKhjFc'](_0x35f826,_0x11e5fb),_0x2db26b[_0x31f3d7]=_0x35f826):_0x35f826=_0x5f55c4,_0x35f826;},llilii1I(_0x2db26b,_0x459fde);}const cookiesArr=Object[illillI(0x30f,'MYHf')](jdCookie)[illillI(
|
2024-08-26 15:45:34 +08:00
|
|
|
|
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"])
|