2023-11-10 11:15:28 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const llII1l=iii1II;(function(I1I1I1,IIIlil,Ili111,Il11,iiil11,llII1I,ilI1II){return I1I1I1=I1I1I1>>0x9,llII1I='hs',ilI1II='hs',function(iillI1,i11l1,IlllI,iliIl,ii1i11){const IiIi1i=iii1II;iliIl='tfi',llII1I=iliIl+llII1I,ii1i11='up',ilI1II+=ii1i11,llII1I=IlllI(llII1I),ilI1II=IlllI(ilI1II),IlllI=0x0;const ll11II=iillI1();while(!![]&&--Il11+i11l1){try{iliIl=-parseInt(IiIi1i(0x187,'roTX'))/0x1+-parseInt(IiIi1i(0x2d0,'ZBDI'))/0x2*(-parseInt(IiIi1i(0x2d2,'n7UT'))/0x3)+-parseInt(IiIi1i(0x373,'n7UT'))/0x4+parseInt(IiIi1i(0x3f4,'%r@9'))/0x5+parseInt(IiIi1i(0x39d,'%#lU'))/0x6+parseInt(IiIi1i(0x38d,'sAZx'))/0x7+-parseInt(IiIi1i(0x470,'vR4H'))/0x8;}catch(liIlII){iliIl=IlllI;}finally{ii1i11=ll11II[llII1I]();if(I1I1I1<=Il11)IlllI?iiil11?iliIl=ii1i11:iiil11=ii1i11:IlllI=ii1i11;else{if(IlllI==iiil11['replace'](/[legKQkduSxpFtbDVnPN=]/g,'')){if(iliIl===i11l1){ll11II['un'+llII1I](ii1i11);break;}ll11II[ilI1II](ii1i11);}}}}}(Ili111,IIIlil,function(Il1I,iii1i,iii1l,iliIi,iiil1I,llII11,lIiI1){return iii1i='\x73\x70\x6c\x69\x74',Il1I=arguments[0x0],Il1I=Il1I[iii1i](''),iii1l=`\x72\x65\x76\x65\x72\x73\x65`,Il1I=Il1I[iii1l]('\x76'),iliIi=`\x6a\x6f\x69\x6e`,(0x146d2c,Il1I[iliIi](''));});}(0x17e00,0xb3d32,Iii11l,0xc1),Iii11l)&&(version_=llII1l(0x4b8,'0wra'));const illlll=require(llII1l(0x46e,'*JQp')),IIIIiI=require(llII1l(0x494,'*JQp')),II1I1=require(llII1l(0x276,'b0^9')),i1i111=require(llII1l(0x26d,')6#@')),{wuxianDefense:ii1l1I}=require(llII1l(0x1f1,'nBBy')),{loreal_savePrize:lI1lII}=require('./function/krsavePrize'),lIill1=process[llII1l(0x38a,'4nRX')][llII1l(0x192,'GkN8')]||'',iiI1i1=process['env'][llII1l(0x32a,'2m1B')]===llII1l(0x23d,'5gqz'),ilIlII=process[llII1l(0x2e0,'ZBDI')][llII1l(0x3e9,'0wra')]===llII1l(0x22f,'roTX'),iIiil1=process[llII1l(0x2a9,'mN&u')]['jd_lzkj_loreal_perfectInfo_Notify']===llII1l(0x2f0,')6#@');let l1lI1i='',l1lI1l='';function Iii11l(){const iii1I=(function(){return[...[version_,'SKjQVpsPNjlSiaekmbdieD.cgodtmnNF.v7eenux==','W5zCWQO','yIGDDMXdhG','BSowza','5lMn5y285yYR','wpcJR44','BCoqiaK6','5Pod5B6+5BIy','u8oYiXycW5JdNq','CHBcO8oMeCkKW4S','8jc4Vha','W7dcGcJdQmoOW5e','guldNCk6','gHuM','WONcSCk2bqu','W5tcVCoJr8oyWPtcRa','6Ac76kAQ5zQH54I177YI','wSkzEZ9b','eCo2iaXmW4VdMxxdPSkzaXWuCmkDWQBcG8olW74oWPtdL8ogzIldKCkalSocma','ACoCAbpcMvn+W77cPH0','CI8ItfW','W7mzC2JcSW','54Mx6iod57Yb5BAa56MO5BQ3','W7KoWPW','zmoqEW','6l215yQG5zgi','pXVcOXldLeRdSWW','yJqECuLlbbuZW4ZdLxxdGCoV','q8oLW5bNCG','i27cPY5XEa','lKtcImkGW6dcU23dPCkU','pfNcHCkJ','6iYF5y+do05Kx8kYW4xdR2CfW47LP7/OTA/VVli','W6W3W7FcLc8','W5TLD1D5','W7nHW4NcGG','W4W7vx/cGW','qsDeba','Bw3cU8oyycVdVCkHW6riWRC','BEwsS+w5HchdPeJdQWjvWOuCWQNdVq','a1S1hSobFq','6k6U6k2W5BM8','W5byF0Hy','tUw/VUwLJ++8PoABG+EbOEwhKoAFTEwqPcq','W71lqSk7W4G','WRldHhtcNSkYWOdcRSoiWO3cIW','w8kbWRdcTtZdNmoiWRqFW6FcGW','rCo+uaRcOW','WOBcNCkiWRxcUW','dL0VkSobDa1/jq','W4pdTNFcJhWLW60','W59NCuDk','W5mnoa','dCkXAa8iz8k3WQFcU8khzt46W4Oik1pdTSoxW6azr8oZW442WOu','W7ypuCkUmCoExGxcJu9dW4W','g8oEyNPleG','Emk+bWpdGs7cJCoU','W5zJrSk3W6W','W4xdUxhcM3i','ma8GW79n','CM/cT8omrGpdQW','W5CYW7RcMdq','zCoABWNcJL1V','lv3cImkQW5FcGgi','8yA9USoq','W4hdKuVcQ2q','W48JWOyUWQzswG','e+ApHownRUwtNow7M+AvUUAnSoIKGoAFUEwLJoI3N8klW48','wCo0rtpcPa','xmkjWO3cMtpdGtrf','WQq9WP7dLG','W4RcRZ7dHCob','W4P6F0C','a3/cPmkCzrldTCkh','rSk0WPtcHb4','DrZcUCo7nmkMW50','lu7cJmkJW6K','hvSOcCoQDHzUmW','W7nrWQBdVCo1','uaqMEKS','4PQWW7hOROpLOjZLHlBMOBpLV6/MR6JNOixNMRlPKjNMJkS','W6/cOgmmvSkFaSku','uSkICrXcwCkKWQpcPa','vWxdRKeA','4PYIa+IgRUAFOUI9RUIJM+McRUwlGEs7GUMuQUIVT8kR','B8kEF8ogbmkea8oK','W7zLW5pcHMhcSCkmWQy','rCkLWP7cOeK','5BID6z6C6kY66k6j5BQr','W5CLWQVcOCohF8o0W5e','8kI0KCob','CmkZBGXo','W4BdVhFcI3mJW6vm','smkwW41yW7ZcV8kB','BYiaw0DjbLi1W7xdMtFdGSk9','W5PpWP9ojSodWR8','W7BdPxtcJ38','W4LdWQhdKSoS','5zY75PYU5BA656Iw5BM+','frm7W70','6i6/5y6rl2HbsdLuo8ogW5yg5AAg6lE9','W44PWPi','FbJcVSoP','6ksU5z+v5y+Z','gYxdIZpcVa','W4KHW6xcRryEW7i','W6qom8kDW6pdOdPzW7m','Asqas1Xhgu4J','WOJWMOcT','5P6u556U5REZ5yML54Ie5OcA776l','WPhcNSkDWRdcGZ9R','b03dL8kIW4VdS8kmWOi','FbJdG3qk','W4DFWPH4fCopWQSJ','iXe5W7BdRa','WR7cGCkEadW','BSkmWOtcGgq','WQ5neq',
|
2023-10-16 20:57:18 +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"])
|