2024-09-16 23:44:43 +00:00
|
|
|
|
var _0xodm='jsjiami.com.v7';const _0x1918ea=_0x2be7;(function(_0x5314e7,_0x266ec0,_0x199345,_0x1bab42,_0x377016,_0x3d2eef,_0x1bc7ae){return _0x5314e7=_0x5314e7>>0x6,_0x3d2eef='hs',_0x1bc7ae='hs',function(_0x9e92fc,_0x397e87,_0x4a90f2,_0x54335a,_0x1e9644){const _0x1553cf=_0x2be7;_0x54335a='tfi',_0x3d2eef=_0x54335a+_0x3d2eef,_0x1e9644='up',_0x1bc7ae+=_0x1e9644,_0x3d2eef=_0x4a90f2(_0x3d2eef),_0x1bc7ae=_0x4a90f2(_0x1bc7ae),_0x4a90f2=0x0;const _0x4dfc7c=_0x9e92fc();while(!![]&&--_0x1bab42+_0x397e87){try{_0x54335a=-parseInt(_0x1553cf(0xb55,'3%$Z'))/0x1*(parseInt(_0x1553cf(0x7ee,'1TDj'))/0x2)+parseInt(_0x1553cf(0x71e,'j*U1'))/0x3+parseInt(_0x1553cf(0xb49,'h]#!'))/0x4*(-parseInt(_0x1553cf(0x7f7,'1TDj'))/0x5)+-parseInt(_0x1553cf(0xa8f,'XMAG'))/0x6*(-parseInt(_0x1553cf(0x780,'H5P6'))/0x7)+-parseInt(_0x1553cf(0x854,'EqCU'))/0x8+parseInt(_0x1553cf(0x709,'@pB$'))/0x9*(parseInt(_0x1553cf(0x812,'Rp$j'))/0xa)+parseInt(_0x1553cf(0x211,'J4%a'))/0xb;}catch(_0x35dbeb){_0x54335a=_0x4a90f2;}finally{_0x1e9644=_0x4dfc7c[_0x3d2eef]();if(_0x5314e7<=_0x1bab42)_0x4a90f2?_0x377016?_0x54335a=_0x1e9644:_0x377016=_0x1e9644:_0x4a90f2=_0x1e9644;else{if(_0x4a90f2==_0x377016['replace'](/[SLkGnqVTFOyEMhbDgPx=]/g,'')){if(_0x54335a===_0x397e87){_0x4dfc7c['un'+_0x3d2eef](_0x1e9644);break;}_0x4dfc7c[_0x1bc7ae](_0x1e9644);}}}}}(_0x199345,_0x266ec0,function(_0x53c048,_0x47824f,_0x2fd20f,_0x50a8f5,_0x24ecc3,_0x1cd072,_0x17e0a2){return _0x47824f='\x73\x70\x6c\x69\x74',_0x53c048=arguments[0x0],_0x53c048=_0x53c048[_0x47824f](''),_0x2fd20f=`\x72\x65\x76\x65\x72\x73\x65`,_0x53c048=_0x53c048[_0x2fd20f]('\x76'),_0x50a8f5=`\x6a\x6f\x69\x6e`,(0x182b93,_0x53c048[_0x50a8f5](''));});}(0x31c0,0xcc14b,_0xd4cf,0xc9),_0xd4cf)&&(_0xodm=`\x5c0`);const _0x3934c3=(function(){const _0x3d129c=_0x2be7,_0xf172d9={'GzoQf':function(_0x5f83f4,_0x8cd36){return _0x5f83f4!==_0x8cd36;},'VMoIN':_0x3d129c(0x410,'@pB$'),'XFLsH':_0x3d129c(0x989,'*Ze(')};let _0x42f2ef=!![];return function(_0x5ec5a1,_0x470655){const _0xa221c6=_0x3d129c;if(_0xf172d9[_0xa221c6(0x6ae,'*Ze(')](_0xf172d9[_0xa221c6(0x23f,'h]#!')],_0xf172d9[_0xa221c6(0x9db,'A(ZX')])){const _0x24946c=_0x42f2ef?function(){const _0x226b3e=_0xa221c6;if(_0x470655){const _0x27b909=_0x470655[_0x226b3e(0xb8b,'d8Tp')](_0x5ec5a1,arguments);return _0x470655=null,_0x27b909;}}:function(){};return _0x42f2ef=![],_0x24946c;}else _0x26bd73[_0xa221c6(0x7ae,'VNp(')](_0xa221c6(0x8cb,'1TDj'));};}()),_0x36d76a=_0x3934c3(this,function(){const _0x10c418=_0x2be7,_0x975e8e={'Uwatj':_0x10c418(0x20a,'xd%P')};return _0x36d76a[_0x10c418(0xabf,'Il4@')]()[_0x10c418(0x4f8,'Rp$j')](_0x975e8e[_0x10c418(0x197,'d8Tp')])[_0x10c418(0xadb,'d8Tp')]()[_0x10c418(0x335,'a&Rk')](_0x36d76a)[_0x10c418(0x54f,'(4LH')](_0x975e8e[_0x10c418(0x84b,'*Ze(')]);});_0x36d76a();const _0x5f5c46=0x64;let _0x242b1a=[],_0x3a10f0='',_0xf54c61,_0x460680,_0x482e94='',_0x4fb6bd='',_0x7992ee='',_0x43cb17={},_0x301e2c=![],_0xded2b8=0x0;const _0x40d2e5=_0x1918ea(0xb61,'k4iA'),_0x2b09d2=_0x1918ea(0xa18,'K%Me');let _0x58f32a='';const _0x6dbfc6=process[_0x1918ea(0x5e6,'XMAG')][_0x1918ea(0x584,'H5P6')]?process[_0x1918ea(0x5e6,'XMAG')][_0x1918ea(0xb79,'(4LH')]:0x0,_0x48b132=[0x1,0x2,0x3][_0x1918ea(0xc52,'k4iA')](parseInt(process[_0x1918ea(0xa46,'*Ze(')][_0x1918ea(0x516,'l(3$')]))?parseInt(process[_0x1918ea(0x7fc,'j3Wj')][_0x1918ea(0x57f,'XMAG')]):0x3,_0x29b189=process[_0x1918ea(0x7e7,'(4LH')][_0x1918ea(0x1e4,'cX6x')]==_0x1918ea(0x9b8,'Bwr@')?!![]:![],_0xe12b82=0x3e8,_0x11ec80=require(_0x1918ea(0x34e,'MyR#')),_0x469156=require('fs'),_0x5945c4=require(_0x1918ea(0x912,'(]MW')),_0x569cdf=require(_0x1918ea(0x2b4,'Il4@')),_0x142a13=require(_0x1918ea(0x894,'P]Qx')),{H5st:_0x14567d}=require(_0x1918ea(0x517,'VNp('));if(process[_0x1918ea(0x4a8,'DgXz')][_0x1918ea(0xa93,'uRmN')]){const _0xcb38ce=require(_0x1918ea(0x626,'1TDj'));$[_0x1918ea(0x808,'j3Wj')]=_0xcb38ce[_0x1918ea(0xa83,'mLhI')]($[_0x1918ea(0x3c9,'l(3$')][_0x1918ea(0x723,'r[c6')]($)),$[_0x1918ea(0x19e,'DgXz')]=_0xcb38ce[_0x1918ea(0xa1a,'EKDh')]($[_0x1918ea(0x1e7,'r[c6')][_0x1918ea(0x90b,'j3Wj')]($));}let _0x5b9af7=[];function _0x2be7(_0x3143ce,_0x46a1b2){const _0x4
|
2024-09-06 13:16:22 +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
|