2023-10-21 11:11:51 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l1iIil11=IliiIill;(function(liili1Ii,iIiI1i1l,Ii1Ii111,il11111l,illi1l11,IIIII1II,IiiliI){return liili1Ii=liili1Ii>>0x8,IIIII1II='hs',IiiliI='hs',function(lIIiillI,liIl11i1,i1iiliIi,IIIIl1ll,llIiiliI){const lili1ili=IliiIill;IIIIl1ll='tfi',IIIII1II=IIIIl1ll+IIIII1II,llIiiliI='up',IiiliI+=llIiiliI,IIIII1II=i1iiliIi(IIIII1II),IiiliI=i1iiliIi(IiiliI),i1iiliIi=0x0;const il1Ili1I=lIIiillI();while(!![]&&--il11111l+liIl11i1){try{IIIIl1ll=-parseInt(lili1ili(0x2a3,'#9Fs'))/0x1*(parseInt(lili1ili(0x3b2,'6y)d'))/0x2)+-parseInt(lili1ili(0x2eb,'Bram'))/0x3+-parseInt(lili1ili(0x273,'O5DF'))/0x4+-parseInt(lili1ili(0x218,'yO]q'))/0x5*(parseInt(lili1ili(0x35c,'#9Fs'))/0x6)+parseInt(lili1ili(0x253,')wV7'))/0x7+parseInt(lili1ili(0x3c5,'%id)'))/0x8+-parseInt(lili1ili(0x4a2,'u%B8'))/0x9*(-parseInt(lili1ili(0x33c,'M#66'))/0xa);}catch(ilIi11il){IIIIl1ll=i1iiliIi;}finally{llIiiliI=il1Ili1I[IIIII1II]();if(liili1Ii<=il11111l)i1iiliIi?illi1l11?IIIIl1ll=llIiiliI:illi1l11=llIiiliI:i1iiliIi=llIiiliI;else{if(i1iiliIi==illi1l11['replace'](/[YXBkDQVuyqNrngSGPIbJ=]/g,'')){if(IIIIl1ll===liIl11i1){il1Ili1I['un'+IIIII1II](llIiiliI);break;}il1Ili1I[IiiliI](llIiiliI);}}}}}(Ii1Ii111,iIiI1i1l,function(il11lill,i11iIIII,liI1I1I,i1iIIlII,IIiIi1l1,l1I1iI11,IiIlii1l){return i11iIIII='\x73\x70\x6c\x69\x74',il11lill=arguments[0x0],il11lill=il11lill[i11iIIII](''),liI1I1I=`\x72\x65\x76\x65\x72\x73\x65`,il11lill=il11lill[liI1I1I]('\x76'),i1iIIlII=`\x6a\x6f\x69\x6e`,(0x143ade,il11lill[i1iIIlII](''));});}(0xcb00,0xe8dab,lliIIllI,0xcd),lliIIllI)&&(version_=lliIIllI);const IiI1iIii=require(l1iIil11(0x3cb,')wV7')),II1lliIl=require('./function/jdCommon'),iiillIi1=require('./function/sendJDNotify'),Ii11Illl=require(l1iIil11(0x2ac,'3@UD')),{loreal_savePrize:illi1Il}=require(l1iIil11(0x4e1,'O5DF')),lliI1ill=process[l1iIil11(0x34f,'3@UD')][l1iIil11(0x475,'PO9T')]||'',lI1Il1Il=process[l1iIil11(0x4b3,'bTn6')][l1iIil11(0x51a,'x#iL')]===l1iIil11(0x309,'l@Ay'),ll1lI1ii=process[l1iIil11(0x493,'l@Ay')][l1iIil11(0x4ad,'SEbG')]==='true',IlIlI1II=process[l1iIil11(0x50c,'ybXI')][l1iIil11(0x311,'O5DF')]==='true';function lliIIllI(){const liIli1i=(function(){return[...[version_,'gjBBsSjiGaYmXkiIr.yNkcQVYoJymunD.qv7DbIP==','naBdRJJdG0y','a8oixSk9ucKBd8krW54','eCodrCkKAceceW','WRlcT8oMl8kpvq','v3BcNw7cUW','W70uW4vGiG','A8k0s8kNnhvrh8oYgSoX','WPLaBMxdJmodW6zMW7C','W6OjW7nNnCo8','jCknW4SzWRS','WR9lW4dcG8kr','i8kxW445WRTh','k8k1W7FcGCk8','vsenW4DPW7CAWRBcLcKkW5hdUsxcM8kyWQrQWOZcJCkzWPhdVxWSEmoWnmo8WRC','WPLCC3ZdRmofW6jL','DwRcNvpcTmoivxG','AXhcRa','sGhdJCo2zMm6','B1ZcPSkgW5tdJXm','562i6AkV5P+15l+S5lQl6lsj','WQr7WR/cRXq','WO9AF37dM8ouW7TqW6Co','mKPeWP/cJJZdN8oRWQ3cHSoIumkZgSoHW4RdNeebh8kKgLyDWQyGWRP4vXZdNmofFW','8ywNJU+7V8oF5lMl5lIf5lQA','W7uzW65roSo/WQm','W5NcVbddGGC','WPH0WPNcJWRdMWm','qceHdSovW4aCW4W','jhnTWOpcJW','WQ/cMqBcMaTWW4ORW5ddGvJcQdtdP3u','md9KWPCmW4NdKaWGWRldGG','WRpcVCojWRaJW6hcPCkkW7b+W7WpeI4','W75wAub8','E8kTl8kKrCotWP1WlwS','jLbNis8','EvNcRmkeW7/dIGNcL8oEW7S','ywGeeW92qSkL','hCksfmooWOhcUaq','5RsR5yIw5lUI6zMG5BQ56zkk5l6f5zkr5yYK5lQc5zc8W4m','CXS4WO1f','dCo7W48X','iSkjW4KmWODwla','v8keWOX3WPvmz8onrSkDpCk7WQaKW5fPfmoCdCk4AmkIW6RdJYe','ta/dKmo2','x8khE8kfgW','xc4LWO9j','lLO2C8ohrt9JwSobeuJdHf/dRmkg','WOzoD2y','W7hcJSo8','WPRcNb/cQb8','zXNdLmokAq','WRJcG0G','W4HVFG','umkiuHqBuJvP','t8kWmSkUAW','ECoeu3vg','FmoBsvDAga','vtKqWRjB','W7NcHCo5WQe2W5Sm','lHJdPJtdMa','E1lcUW','w8kjWQS','kHpdSsldGur/','tahdISoY','CcW6WO5t','5RsV5yId5lMy6zQr5BQF6zk05l255zkh5y6C5lUo','dxamyCkR','W6lcQHHgWOlcOq','qG/dL8o9D3qL','l8otW4bS','s8kmsbaNrJy','5P6M6ici6iYY5yYS55ER5OUd5REc5yM854Us5OgR','W7WDW6Ld','WPH6WP7cMXBdGrNcSSkqWP4','lfDN','vSkgtau','iSkDW7hcPmkH','5Rsp5yU55BAp5lILia','WQDBrL3dLa','WQJcUhhcMmos','vepcUCoAWPZcQ8oztInVyuuln3mfaCkddmkLcCojCq','5P2G55+B6Akh55QO57cL5zYDWPi','W73cHmovWRZcSq','amo0W4G1mCon','lSoVW5NcTSo5','W6BcKaldMqe','pCkbW4LKuCkYs19Z','W7i0W5rPhG','FmofW5tcKxa','o8oJW73cHCo/WOnLbSkzW5W','kaxdOrFdHG','CCk6oCkXDmosWPfFoG','C8oiWQ3dRSkGWRpcVmks','WQtdONC7jmkQWQRdLWK','bK/dMmoMxxiIA8oCFSk7W4S/W7qJrefaWQZcQdpcNG','BIW4WOv0W5VcHH8','pmoDW55+W5K','Amk2tmkRf2
|
|
|
|
|
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"])
|