2024-07-24 03:57:01 +00:00
|
|
|
var _0xods='jsjiami.com.v7';const _0x207344=_0x2a11;(function(_0x84168,_0x74a1,_0xc0b21a,_0x2f640b,_0x5b3695,_0x28dd4e,_0x4d9751){return _0x84168=_0x84168>>0x2,_0x28dd4e='hs',_0x4d9751='hs',function(_0x4dc522,_0x11b1b4,_0x5640e3,_0x121098,_0x40b615){const _0x3bef1d=_0x2a11;_0x121098='tfi',_0x28dd4e=_0x121098+_0x28dd4e,_0x40b615='up',_0x4d9751+=_0x40b615,_0x28dd4e=_0x5640e3(_0x28dd4e),_0x4d9751=_0x5640e3(_0x4d9751),_0x5640e3=0x0;const _0x4ab4c9=_0x4dc522();while(!![]&&--_0x2f640b+_0x11b1b4){try{_0x121098=-parseInt(_0x3bef1d(0x4d3,'CzP5'))/0x1+parseInt(_0x3bef1d(0x46d,'n4ln'))/0x2+parseInt(_0x3bef1d(0x2fc,'pn7O'))/0x3+-parseInt(_0x3bef1d(0x389,'eqXN'))/0x4+parseInt(_0x3bef1d(0x36a,'Y^S]'))/0x5+parseInt(_0x3bef1d(0x9a5,'MXZi'))/0x6+-parseInt(_0x3bef1d(0x6fb,'s]WR'))/0x7;}catch(_0x1be46e){_0x121098=_0x5640e3;}finally{_0x40b615=_0x4ab4c9[_0x28dd4e]();if(_0x84168<=_0x2f640b)_0x5640e3?_0x5b3695?_0x121098=_0x40b615:_0x5b3695=_0x40b615:_0x5640e3=_0x40b615;else{if(_0x5640e3==_0x5b3695['replace'](/[MWVOLQxlnGNXyuJpDbh=]/g,'')){if(_0x121098===_0x11b1b4){_0x4ab4c9['un'+_0x28dd4e](_0x40b615);break;}_0x4ab4c9[_0x4d9751](_0x40b615);}}}}}(_0xc0b21a,_0x74a1,function(_0x28e916,_0x44ac8b,_0x9f316e,_0x4adcf4,_0x33def5,_0x50d85b,_0x613730){return _0x44ac8b='\x73\x70\x6c\x69\x74',_0x28e916=arguments[0x0],_0x28e916=_0x28e916[_0x44ac8b](''),_0x9f316e=`\x72\x65\x76\x65\x72\x73\x65`,_0x28e916=_0x28e916[_0x9f316e]('\x76'),_0x4adcf4=`\x6a\x6f\x69\x6e`,(0x17a791,_0x28e916[_0x4adcf4](''));});}(0x2fc,0xc7ee0,_0x5b9b,0xc1),_0x5b9b)&&(_0xods=`\xe5c`);const _0x5a1fa3=$[_0x207344(0x87f,'Pk]F')]()?require(_0x207344(0x229,'dau(')):'',_0x63ee71=$[_0x207344(0x302,'K837')]()?require(_0x207344(0x672,'rgsI')):'',_0x3811e8=require(_0x207344(0x8e3,'m*TO')),_0x5d5e57=require(_0x207344(0x27c,'#dnc')),_0x432b77=require(_0x207344(0x6f7,'ZUH3'));if(process[_0x207344(0x49d,'S][]')][_0x207344(0x943,'s]WR')])try{require(_0x207344(0x54d,'pdcG')),ccc=require(_0x207344(0x63b,'dau(')),$[_0x207344(0x5bf,'XBL5')]=ccc[_0x207344(0x6ec,'t^]M')]($[_0x207344(0x692,'2U9E')][_0x207344(0x66e,'mJ24')]($)),$[_0x207344(0x574,'$sL4')]=ccc[_0x207344(0x2e4,'2ZWs')]($[_0x207344(0x4b9,']2xJ')][_0x207344(0x1d3,'Y^S]')]($));}catch{$[_0x207344(0x548,'!E!#')](_0x207344(0x7f5,'n)p9')),$[_0x207344(0x2fd,'ca5j')]=$[_0x207344(0x8b6,'2ZWs')],$[_0x207344(0x6d4,'fARu')]=$[_0x207344(0x842,'p^@a')];}else $[_0x207344(0x3ed,'eqXN')]=$[_0x207344(0x75e,'Pk]F')],$[_0x207344(0x62b,'Pk]F')]=$[_0x207344(0x806,'ZUH3')];function _0x5b9b(){const _0x3f8036=(function(){return[...[_0xods,'WjMpxsujibaXmli.coxmDn.JVvD7GhMyDDLGyOQN==','W6ddKraD','W7LMr8oO','CCoppCo+fG','WOFcGZK0jSkgW4S','W4pdIW4','W6DGe8kOya','W6G4uI7cIW','WOrMjXi6','44gt5O+q56A044ok6k6w5yEJ6i2F5y2w5lMD5lMr6lAm5yYa5lUIW5eiWOpdIhpdTmkk55Mb5OY+5l+r55EzWRziC8osWP0M55IE5lMI5lIp562Z5yUa6i265y6e','WOSDFGFdNG','WOuaWRK','eCo8l8oLade','W4RdHXyDg8o4jxTkjty','W4mAWORdMXW','F2tcTG','bwVdLxdcGa','h8k4emoAWPy','W74jrgpdOa','WOdcImosW7jDWPFdGCorxNOnCadcSSoQewHlW64aCIxdJmoXdSo7WPhdRG','W5hcVmkj','dILlhSkOWPmqW7SVbmkWW6y','WONdJtBdGCkC','W6jRWPbaW4m','W6fOmCkUAG','W6BcMwHXWQ7cLmkR','pJ5SiSoW','E8oIW7ddU8kDW6RdLmkbruzoWR3cIcvMmsC','W6T9CCoUWPm','W57cKCk3jCk6','WOHUaG4OzmkcW6RdQMWzfG','mtNdVCoSae7cNa','jNldVmk0e8oMWO3dS8kclmonWPi','W6uQFhBdPq','EGlcRXtcJq','zCoyW63dU8kL','WQBdJZRdLCkMW5SGFheghmoY','W7qGaWBcMW','W7yqibP/F8ksWOntW5zAWRq','CIxcJW','bs5apmkI','W47cN8oiW7vjWPK','WQegWOrQWQ3dNSkyWQi','WP7dUSoCW7yzW4W','W4aHDWxcHG','DSomWP9uxq','hMNcOmo0FvVdPa','W7pdOrVdH8ow','fGlcGCoDWOG','WO3dKZtcNCoMWPu','prCFWP1jaeJdKCout1GF','nmo5W7hdT8klWRi','pq4lWQfMW5JcQa','tCkZWP0tv8oG','W5zIWP9Y','bSoGW5zFdmkGhbdcNSoSW4CwWRO','W5xcK3DWWQe','nrrCj8o3','Fq7cQHNcQG','W5j2WPr1W5xcOq','dtrxbG','W6xcJN1IWOdcIW','imoiWQJcUSoD','aSokWRlcI8ob','W6agaZ3cKCk9ea','W6qmiIPa','ewJcU8of','i8klW4rWaq','ymozWPrszq','cCkFW5jOcG','WOBdHX1uWQm','W6/dRWVdTa','zq0zfqe','WR0fWQ5qWOS','WPxdVCoxW5qz','WRK0xWFdPqHqcveh','cCoYgt7cMa','i17dNu/cQG','omkCW59Yf1lcQ8kLj0qdhSoOxCkGW43cJgPla8k4D2muW543WRpdOq3cL8okWPa9aSoIbmkww8oDD8kAWR3cIW','WPBcHI8eiG','W6JcKNHWWRFcR8kS','W5ZdNrPcoSo8','WODuhc8W','WOW4qaVdVq','fSoGDrtdL
|
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
|