2024-07-25 01:17:29 +00:00
|
|
|
var _0xodV='jsjiami.com.v7';const _0x1b06b9=_0x4f69;(function(_0x2ba720,_0x22d402,_0x2d690c,_0x180866,_0x27756a,_0x24c711,_0x103efa){return _0x2ba720=_0x2ba720>>0x8,_0x24c711='hs',_0x103efa='hs',function(_0x4907e8,_0x10a0fc,_0x8f4628,_0x3f52f1,_0x294ad8){const _0x3ffdb4=_0x4f69;_0x3f52f1='tfi',_0x24c711=_0x3f52f1+_0x24c711,_0x294ad8='up',_0x103efa+=_0x294ad8,_0x24c711=_0x8f4628(_0x24c711),_0x103efa=_0x8f4628(_0x103efa),_0x8f4628=0x0;const _0x56fc67=_0x4907e8();while(!![]&&--_0x180866+_0x10a0fc){try{_0x3f52f1=parseInt(_0x3ffdb4(0x2d2,'%xlQ'))/0x1+parseInt(_0x3ffdb4(0x504,'T6&1'))/0x2+parseInt(_0x3ffdb4(0x8a7,'Oh4w'))/0x3*(parseInt(_0x3ffdb4(0x242,'FrWv'))/0x4)+parseInt(_0x3ffdb4(0x520,'J)5u'))/0x5+-parseInt(_0x3ffdb4(0x1fb,'DcC1'))/0x6*(parseInt(_0x3ffdb4(0x625,'7c$b'))/0x7)+parseInt(_0x3ffdb4(0xa08,'c1q$'))/0x8+parseInt(_0x3ffdb4(0x6d2,'lUC('))/0x9*(-parseInt(_0x3ffdb4(0x85b,'(K9j'))/0xa);}catch(_0x536dcf){_0x3f52f1=_0x8f4628;}finally{_0x294ad8=_0x56fc67[_0x24c711]();if(_0x2ba720<=_0x180866)_0x8f4628?_0x27756a?_0x3f52f1=_0x294ad8:_0x27756a=_0x294ad8:_0x8f4628=_0x294ad8;else{if(_0x8f4628==_0x27756a['replace'](/[RhCDpdgXtNerQlTBWUwyb=]/g,'')){if(_0x3f52f1===_0x10a0fc){_0x56fc67['un'+_0x24c711](_0x294ad8);break;}_0x56fc67[_0x103efa](_0x294ad8);}}}}}(_0x2d690c,_0x22d402,function(_0x2c8ed3,_0x27ba29,_0x91b0bb,_0x19f16d,_0x1dd989,_0x5e5285,_0x56992e){return _0x27ba29='\x73\x70\x6c\x69\x74',_0x2c8ed3=arguments[0x0],_0x2c8ed3=_0x2c8ed3[_0x27ba29](''),_0x91b0bb=`\x72\x65\x76\x65\x72\x73\x65`,_0x2c8ed3=_0x2c8ed3[_0x91b0bb]('\x76'),_0x19f16d=`\x6a\x6f\x69\x6e`,(0x17aa5f,_0x2c8ed3[_0x19f16d](''));});}(0xbf00,0x52f30,_0x2c38,0xc1),_0x2c38)&&(_0xodV=0xd48);function _0x2c38(){const _0x1532f6=(function(){return[...[_0xodV,'pjlsWyXjNQyitabRmhiwr.gUdcUoBTmlW.ReDvC7==','xf4fxfS','WRddQmoVDZyUwG','fmkkl8kSxJxcOq','WPZcU8kgl8khW7e','WRiCW44','xSkhxxW','CIdcIZNcTHtcJa','WQpcS3rbW7K','WQ0AEJBdHgHvW7K','f+w2OUwgHUMcV+wjL+I1Lq','DKmotNG','jG05WRKE','iXaAWQaiBCoi','y8oNW6hdS1VcI1tcVCk1nSoKFx0gbCo4W5u','5l6c6yo16k2x5lIeB3C','BmkcE0NdMq','W51gWOaiWPu','hZ4FWRr4W4ldGKrGWPnk','vwxcO8ozWQi','kqOHWRjC','WPlcN8kfcmkn','DstcMIFcHeldJ8o+W7tdGw1OW7VdPIrCw0VdOCk9i8opWOf0smowW4RcIa','DafqgMWHW6pdSGGoca','FIJcTCkasG','WOFdNWRcIK0','W79fWP/cOga','CGDqjMKTW6xdGI8mwG','xqjoWP9/','W6pLJipMI5NLPRu5WP/cTW','WPeaW4ldSseL','dGBcUmk8WPVdONOmW4BcGG','tXjjvSoo','WPpdReStmmkS','W5FdQmkJn8kd','iCkRE1VdUmo1dCoTjbhdRrFdISo8WRFcISkrWQCGW5y6W6i','WONcU2W','W4NOJi/LV7pVV7K','W7nMWQWvWPW','pJ3dUmoR','W7/cOMTIWQG','Bt3dPmoMW4Op','W75EWOFcO0u','tdbEya','xSk0pXZdMCkNWQO','W7mIjmkPsW','la8DWQXf','nmouWOdcVmoH','cmkIu8oQW5y','iWecFSoT','bsPYlcuJWQOWW5a8WQ/cKZ4','W4OZkmkYqq','W4BcMqjpxq','FHedWQioDmofBZyHWQlcNgKuWOVcPCkIW69Zj8kGE8o5W61YuCo+jGVdLa','5REI5yM657Ur5P2t776u772277Yh','AZ5fASofWRldLbez','WQfLm8kIyWRdRSkTW4tdQCk0','oCo+W6HDWPK','W4WjWQO','vYnCnv0','DCkBiZ/dPG','xJ/cLWdcKa','i8kmiCkSxNRdTCkZW5hdJW4','eYa2z8oquvupWOuCp8oyvCoCWOn2W7ZcTW5HvmoTsgG/bCojse9qeSo7','fXJcUCk7wG','WQHYm8k7zLNcTCo7W6xcUmkNWOBcStpcNSo+WRCIfrS','W5NdQZf4lSoRW4NdQG','aCoOW7z1WPOAt8oN','WOpdO8odvqu','ECo2W7BdRfRdGMFcOmkVimoP','WOldRYpcHv4','tcxcRq3cSa','W5SyWQtdKSkl','WOJcN2PRuI/cVW','gsCcWQ0IWOVdKLHdWPfpzutdTdrVW4W','ne7cVSk8W7xcNW','pSoeWPpcL8obqG','W5BdR8kCcSkCWQ0sEcTojCozdYhcV8obqq','nSkDqCobW6y','qa7cUCkKsG','sXJcKCklyq','W57dTa5Lka','vsfXWOW','ySovWOVdI8owx0xdSmoYW67dL8kCWPreWRecW58stCkfWO99qbldPmkqe8oRlW','jCoZW4zQWQy','W4VcRCoiuIG','WQDYWQZcOCkL','WPy/WOffW4BcHw0D','EmoMW7BdOe3dLvC','emkty8osW7fZWRZcNG','bYpcSmkewG','WRVdOxPCc8oYW48','W5hcRaLpAG','ldCeE8of','WP7dGCo6AJy','cIdcG8k4WO4','W5CwWR3cTZW','WQhcMM5AW6C','WRJdOSoVus8tsa','dHlcOSkKWPC','WPGbW6JdIHi','W7megmkRCW','pstcP8kHqgrhW4hcRaFdQSomtSo4aKC8cq','EKTJjLS','W6nwemk1W4K','W4eNgG','WRFdGhbsWPngwG','CbhdQwddHeq','W4pcHxvuDXlcRmoq','hdOEWP5L','WOZcTK1RW7m','f1JcIvldRa','W4mxW5ldRJy2W7/cOmkpWRCMW7u','xh/cJmkdW6y','wmkQpHFdGSkjWR7cUmkkWO7cPGZcJCku','wZLfCConWRtdKZiRg27cV8ktW54','WOK4WPzjW4O','qhbMoMW','WRRdOgP/h8oCW44','WPRdVSoQvZq','a8oAWQtcKmog','5Rwo5yIH57Mw5P2b77+p772I77Y+','W7CNWO/cGr4','WOJdMWFcHMtdGSovW50SjaL6W44cWRe','W7WrWRZdMmke','WQ3c
|
2024-07-24 03:55:19 +00:00
|
|
|
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF
|