2024-06-30 22:17:24 +08:00
|
|
|
|
var iil='jsjiami.com.v7';const Ili1iilI=I1IliIll;if(function(l1ll1I11,I11lIlii,Il1l11,ill1Illi,Ii1liIIl,IIi1I1II,lliiIlll){return l1ll1I11=l1ll1I11>>0x3,IIi1I1II='hs',lliiIlll='hs',function(Ii1il1II,IiIliiI1,IIIli1ll,IIi1ilil,i111I1l1){const iIiIlil=I1IliIll;IIi1ilil='tfi',IIi1I1II=IIi1ilil+IIi1I1II,i111I1l1='up',lliiIlll+=i111I1l1,IIi1I1II=IIIli1ll(IIi1I1II),lliiIlll=IIIli1ll(lliiIlll),IIIli1ll=0x0;const i1iilil=Ii1il1II();while(!![]&&--ill1Illi+IiIliiI1){try{IIi1ilil=parseInt(iIiIlil(0x3b0,'h&Z%'))/0x1+-parseInt(iIiIlil(0x3b1,'ez&!'))/0x2+parseInt(iIiIlil(0x570,'kx$9'))/0x3*(-parseInt(iIiIlil(0x353,'9xYu'))/0x4)+parseInt(iIiIlil(0x346,'GS^)'))/0x5+-parseInt(iIiIlil(0x2ff,'BnFa'))/0x6+-parseInt(iIiIlil(0x574,'N^TO'))/0x7*(-parseInt(iIiIlil(0x560,'h&Z%'))/0x8)+-parseInt(iIiIlil(0x1f5,'9xYu'))/0x9*(parseInt(iIiIlil(0x27b,'N^TO'))/0xa);}catch(lIIi1l11){IIi1ilil=IIIli1ll;}finally{i111I1l1=i1iilil[IIi1I1II]();if(l1ll1I11<=ill1Illi)IIIli1ll?Ii1liIIl?IIi1ilil=i111I1l1:Ii1liIIl=i111I1l1:IIIli1ll=i111I1l1;else{if(IIIli1ll==Ii1liIIl['replace'](/[YgNGfeJKLOTqQAhXVFCHp=]/g,'')){if(IIi1ilil===IiIliiI1){i1iilil['un'+IIi1I1II](i111I1l1);break;}i1iilil[lliiIlll](i111I1l1);}}}}}(Il1l11,I11lIlii,function(ililiil,llllii1i,iiIIl1l,IIlii1ll,l111lI1I,I1i1llll,Iiilill){return llllii1i='\x73\x70\x6c\x69\x74',ililiil=arguments[0x0],ililiil=ililiil[llllii1i](''),iiIIl1l=`\x72\x65\x76\x65\x72\x73\x65`,ililiil=ililiil[iiIIl1l]('\x76'),IIlii1ll=`\x6a\x6f\x69\x6e`,(0x174a68,ililiil[IIlii1ll](''));});}(0x618,0x5c847,l1ilIIii,0xc5),l1ilIIii){}const activityUrl=process[Ili1iilI(0x4b8,'X*O2')][Ili1iilI(0x34d,'cQ3@')]||'',joinMember=process[Ili1iilI(0x4a2,'@4BO')][Ili1iilI(0x3f3,'9wlF')]===Ili1iilI(0x163,'wo8&'),isNotify=process[Ili1iilI(0x301,'&6VC')][Ili1iilI(0x356,'Z)gv')]===Ili1iilI(0x589,'N^TO');let cookie='',activityCookie='',originCookie='';const cookiesArr=Object[Ili1iilI(0x293,'z6tQ')](jdCookie)[Ili1iilI(0x64c,'GOcm')](I1Ii1I1=>jdCookie[I1Ii1I1])[Ili1iilI(0x569,'@4BO')](lii1I1II=>lii1I1II);!cookiesArr[0x0]&&($[Ili1iilI(0x40a,'GOcm')]($[Ili1iilI(0x509,'^!OT')],Ili1iilI(0x621,'UeKU')),process[Ili1iilI(0x288,'56q%')](0x1));!(async()=>{const lIIi1IIl=Ili1iilI,lIilli1={'JDViX':lIIi1IIl(0x42c,'2[@T'),'qJbTv':lIIi1IIl(0x5f4,'cQ3@'),'NtRhP':lIIi1IIl(0x2af,'[c^L'),'yUKbm':function(i1IIillI,Ii11lI1i){return i1IIillI===Ii11lI1i;},'nwZhk':lIIi1IIl(0x2cb,'&6VC'),'PaUxl':lIIi1IIl(0x534,'UNCh'),'Dxlpl':lIIi1IIl(0x582,'X*O2'),'rvVsQ':lIIi1IIl(0x32e,'w9#7'),'VxLOu':lIIi1IIl(0x19f,'w9#7'),'sBSij':lIIi1IIl(0x3e5,'^!OT'),'ExSFE':function(IlIiIlII,i1l1li1I){return IlIiIlII===i1l1li1I;},'Opsue':lIIi1IIl(0x39b,'GS^)'),'MNpKb':lIIi1IIl(0x5cc,'S^Cj'),'RkQuM':lIIi1IIl(0x655,'NkbU'),'iIhFC':function(lIiIl1il,l1lII11I){return lIiIl1il!==l1lII11I;},'VUfpm':lIIi1IIl(0x376,'DVb!'),'GQrJi':lIIi1IIl(0x52f,'IJbV'),'JXYne':function(lI11lli1,lI111li1){return lI11lli1+lI111li1;},'cEGUp':lIIi1IIl(0x24e,'X*O2'),'GuSCI':function(i1Il1IlI,iii11ll1){return i1Il1IlI<iii11ll1;},'gxVxS':function(iIIi11i,iI11I1Ii){return iIIi11i+iI11I1Ii;},'xsqiU':function(iilIlili,Il1IIIIi){return iilIlili(Il1IIIIi);},'WlBQI':lIIi1IIl(0x4f7,'tWq7'),'rWKmb':lIIi1IIl(0x263,'GOcm'),'peGjD':function(i1lIlll1,il1iliil){return i1lIlll1+il1iliil;},'vaSVz':function(lIIIiIIl,lIIllIi){return lIIIiIIl*lIIllIi;},'cRhyq':function(l1i1ii1){return l1i1ii1();},'xvbaF':lIIi1IIl(0x60e,'[c^L'),'nZtuQ':lIIi1IIl(0x3f5,'^!OT')};if(!activityUrl){console[lIIi1IIl(0x2fe,'N^TO')](lIilli1[lIIi1IIl(0x344,'rPcP')]);return;}const il1iI1Il=common[lIIi1IIl(0x4fb,'GOcm')](activityUrl);if(!il1iI1Il){if(lIilli1[lIIi1IIl(0x2c0,'IJbV')](lIilli1[lIIi1IIl(0x438,'1Nz]')],lIilli1[lIIi1IIl(0x3a6,'[c^L')])){console[lIIi1IIl(0x311,'evaa')](lIilli1[lIIi1IIl(0x368,'9wBG')]);return;}else I1lI11Il[lIIi1IIl(0x178,'cQ3@')]('❓'+IIi1II1+'\x20'+iIililIi[lIIi1IIl(0x2ba,'Z)gv')](lIlIl1iI));}$[lIIi1IIl(0x498,'O2bN')]=activityUrl,$[lIIi1IIl(0x505,'#rLl')]=common[lIIi1IIl(0x24b,'umdz')](activityUrl,lIilli1[lIIi1IIl(0x259,'NkbU')]),$[lIIi1IIl(0x373,'X*O2')]=il1iI1Il?.[lIIi1IIl(0x1db,'v8T$')];if($[lIIi1IIl(0x675,'9xYu')]){if($[lIIi1IIl(0x675,'9xYu')][lIIi1IIl(
|
|
|
|
|
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"])
|