2024-09-06 13:16:22 +00:00
|
|
|
|
var _0xodx='jsjiami.com.v7';const _0x1ff524=_0x418c;(function(_0x332065,_0x5dec6b,_0x30919f,_0x6e9ba,_0xee1572,_0x3ac30b,_0x17a447){return _0x332065=_0x332065>>0x2,_0x3ac30b='hs',_0x17a447='hs',function(_0x348c0b,_0x4f0e96,_0x237b4f,_0x48174b,_0x33d1a9){const _0xd27cad=_0x418c;_0x48174b='tfi',_0x3ac30b=_0x48174b+_0x3ac30b,_0x33d1a9='up',_0x17a447+=_0x33d1a9,_0x3ac30b=_0x237b4f(_0x3ac30b),_0x17a447=_0x237b4f(_0x17a447),_0x237b4f=0x0;const _0x5d390e=_0x348c0b();while(!![]&&--_0x6e9ba+_0x4f0e96){try{_0x48174b=parseInt(_0xd27cad(0x200,')6NQ'))/0x1+parseInt(_0xd27cad(0xa28,'L7DC'))/0x2*(-parseInt(_0xd27cad(0x70c,'msbN'))/0x3)+parseInt(_0xd27cad(0xa89,'L7DC'))/0x4+-parseInt(_0xd27cad(0xc14,'L7DC'))/0x5+-parseInt(_0xd27cad(0x557,'nxJe'))/0x6+parseInt(_0xd27cad(0x4fe,'OO%l'))/0x7*(parseInt(_0xd27cad(0x560,'GyZA'))/0x8)+-parseInt(_0xd27cad(0x48c,'l$SK'))/0x9;}catch(_0x15a4bb){_0x48174b=_0x237b4f;}finally{_0x33d1a9=_0x5d390e[_0x3ac30b]();if(_0x332065<=_0x6e9ba)_0x237b4f?_0xee1572?_0x48174b=_0x33d1a9:_0xee1572=_0x33d1a9:_0x237b4f=_0x33d1a9;else{if(_0x237b4f==_0xee1572['replace'](/[deArETbfYpwJuUL=]/g,'')){if(_0x48174b===_0x4f0e96){_0x5d390e['un'+_0x3ac30b](_0x33d1a9);break;}_0x5d390e[_0x17a447](_0x33d1a9);}}}}}(_0x30919f,_0x5dec6b,function(_0x56ed6b,_0x354171,_0x85f91,_0x5ad172,_0x751045,_0x415c36,_0x320b61){return _0x354171='\x73\x70\x6c\x69\x74',_0x56ed6b=arguments[0x0],_0x56ed6b=_0x56ed6b[_0x354171](''),_0x85f91=`\x72\x65\x76\x65\x72\x73\x65`,_0x56ed6b=_0x56ed6b[_0x85f91]('\x76'),_0x5ad172=`\x6a\x6f\x69\x6e`,(0x18142c,_0x56ed6b[_0x5ad172](''));});}(0x30c,0x25a9f,_0x1e88,0xc5),_0x1e88)&&(_0xodx=0x47a);const _0x1df566=(function(){const _0x317aa4=_0x418c,_0x21ccdb={'ydaTK':function(_0x402ebf,_0x5ab565){return _0x402ebf==_0x5ab565;},'XcKLS':_0x317aa4(0x142,'Y&1D'),'BwgVg':_0x317aa4(0x40c,'zJhh'),'OBDOV':_0x317aa4(0xacf,'R46['),'SGFql':function(_0x150f87,_0x4e6840){return _0x150f87!==_0x4e6840;},'nIMFY':_0x317aa4(0x7b0,'dRa&')};let _0xb33c3a=!![];return function(_0x496584,_0x224ca8){const _0x1b1ff8=_0xb33c3a?function(){const _0x2e3950=_0x418c,_0x531034={'gwjYz':function(_0x82260c,_0x38500b){const _0x29dca2=_0x418c;return _0x21ccdb[_0x29dca2(0x585,'qUBS')](_0x82260c,_0x38500b);},'OOKNx':_0x21ccdb[_0x2e3950(0x7e8,'OO%l')],'goRqP':_0x21ccdb[_0x2e3950(0x862,'msbN')],'IGooA':_0x21ccdb[_0x2e3950(0x21e,'MV2*')]};if(_0x224ca8){if(_0x21ccdb[_0x2e3950(0x356,'swf*')](_0x21ccdb[_0x2e3950(0x68a,'L7DC')],_0x21ccdb[_0x2e3950(0x494,'nxJe')]))_0x531034[_0x2e3950(0x69c,'in6P')](_0x53e8d6[_0x2e3950(0xab2,'dNa1')][_0x2e3950(0x404,'hPRG')],_0x531034[_0x2e3950(0x4c8,'SO1^')])&&0x0&&(_0x19b270=_0x531034[_0x2e3950(0x3e0,'SO1^')],_0x5d2e18[_0x2e3950(0x437,'#6[%')](_0x531034[_0x2e3950(0x7d8,'l$SK')]));else{const _0x3173ab=_0x224ca8[_0x2e3950(0xb60,'R46[')](_0x496584,arguments);return _0x224ca8=null,_0x3173ab;}}}:function(){};return _0xb33c3a=![],_0x1b1ff8;};}()),_0x5986a0=_0x1df566(this,function(){const _0x3b741b=_0x418c,_0x1375b5={'daclZ':_0x3b741b(0x1ae,'TSO0')};return _0x5986a0[_0x3b741b(0x604,'m&Ix')]()[_0x3b741b(0x323,'wHeU')](_0x1375b5[_0x3b741b(0x342,'d!ov')])[_0x3b741b(0x74b,'ft]8')]()[_0x3b741b(0xbed,'@&%T')](_0x5986a0)[_0x3b741b(0x9a5,'nxJe')](_0x1375b5[_0x3b741b(0x22f,'m&Ix')]);});_0x5986a0();const _0x1cd54b=0x64;let _0x348948=[],_0x4f7698='',_0xecea56,_0x27d9ff,_0x4f498d='',_0x209180='',_0x42b2b0='',_0x4fb6de={},_0xe89494=![],_0xb68a1=0x0;const _0x24b395=_0x1ff524(0xab0,'msbN'),_0x7c1725=_0x1ff524(0x484,'msbN');let _0x571c3e='';const _0x47de71=process[_0x1ff524(0x744,'3led')][_0x1ff524(0x149,'wHeU')]?process[_0x1ff524(0xb2f,'zJhh')][_0x1ff524(0x6a5,'l$SK')]:0x0,_0x42c216=process[_0x1ff524(0x744,'3led')][_0x1ff524(0x5ec,'yV)k')]==_0x1ff524(0x4b6,'dNa1')?!![]:![],_0x314533=0x3e8,_0x1157fd=require(_0x1ff524(0x265,'3led')),_0x38c1e5=require('fs'),_0x1b6cee=require(_0x1ff524(0x5f4,'qUBS')),_0x4aa459=require(_0x1ff524(0x363,'@7PT')),_0x4e113f=require(_0x1ff524(0x209,'dNa1')),{H5st:_0x1d74b4}=require(_0x1ff524(0x52d,')6NQ'));if(process[_0x1ff524(0x575,'F$Dh')][_0x1ff524(0x4dc,'GyZA')]){const _0x2ccbe0=require(_0x1ff524(0x84c,'DAW1'));$[_0x1ff524(0x479,'
|
|
|
|
|
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
|