2024-08-13 03:07:35 +00:00
|
|
|
var _0xodh='jsjiami.com.v7';const _0x2258ef=_0x59d7;(function(_0x1efec2,_0xddf61,_0x5aa7dd,_0x6341a8,_0x5d219f,_0x6a2e5e,_0x923c2){return _0x1efec2=_0x1efec2>>0x2,_0x6a2e5e='hs',_0x923c2='hs',function(_0x17777a,_0x27553d,_0x28a04b,_0x34cfe3,_0x2bb4ba){const _0x328e0a=_0x59d7;_0x34cfe3='tfi',_0x6a2e5e=_0x34cfe3+_0x6a2e5e,_0x2bb4ba='up',_0x923c2+=_0x2bb4ba,_0x6a2e5e=_0x28a04b(_0x6a2e5e),_0x923c2=_0x28a04b(_0x923c2),_0x28a04b=0x0;const _0x5b887e=_0x17777a();while(!![]&&--_0x6341a8+_0x27553d){try{_0x34cfe3=-parseInt(_0x328e0a(0x10d,'*dx8'))/0x1+parseInt(_0x328e0a(0x2a6,'w@wX'))/0x2+-parseInt(_0x328e0a(0x20a,'Xo)f'))/0x3*(-parseInt(_0x328e0a(0x15d,'zzFR'))/0x4)+-parseInt(_0x328e0a(0x25b,'6R)J'))/0x5*(parseInt(_0x328e0a(0x244,'Mz!@'))/0x6)+parseInt(_0x328e0a(0x1bf,'[U#5'))/0x7*(-parseInt(_0x328e0a(0x22e,'N0vZ'))/0x8)+-parseInt(_0x328e0a(0x1fb,'uSoz'))/0x9+-parseInt(_0x328e0a(0x1d2,'gTt4'))/0xa*(-parseInt(_0x328e0a(0x15c,'*LQw'))/0xb);}catch(_0x41e383){_0x34cfe3=_0x28a04b;}finally{_0x2bb4ba=_0x5b887e[_0x6a2e5e]();if(_0x1efec2<=_0x6341a8)_0x28a04b?_0x5d219f?_0x34cfe3=_0x2bb4ba:_0x5d219f=_0x2bb4ba:_0x28a04b=_0x2bb4ba;else{if(_0x28a04b==_0x5d219f['replace'](/[BTphRbGgHtVdDfFqryw=]/g,'')){if(_0x34cfe3===_0x27553d){_0x5b887e['un'+_0x6a2e5e](_0x2bb4ba);break;}_0x5b887e[_0x923c2](_0x2bb4ba);}}}}}(_0x5aa7dd,_0xddf61,function(_0x3ff03e,_0xb951d8,_0x2e5270,_0xacabc7,_0x16e591,_0x5aa63d,_0x277f21){return _0xb951d8='\x73\x70\x6c\x69\x74',_0x3ff03e=arguments[0x0],_0x3ff03e=_0x3ff03e[_0xb951d8](''),_0x2e5270=`\x72\x65\x76\x65\x72\x73\x65`,_0x3ff03e=_0x3ff03e[_0x2e5270]('\x76'),_0xacabc7=`\x6a\x6f\x69\x6e`,(0x17dcd7,_0x3ff03e[_0xacabc7](''));});}(0x314,0xcb3fb,_0x4ae6,0xc7),_0x4ae6)&&(_0xodh=`\xa3e`);const _0x162b32=$[_0x2258ef(0x268,'ei#y')]()?require(_0x2258ef(0x1cf,'qr4d')):'';function _0x4ae6(){const _0x11682f=(function(){return[...[_0xodh,'rhTjDHsgwbjBfViFwaGdRmBig.pqcHhyorm.Htv7==','tvruhHNcOmkA','lCojaaJdGW','WOe1WPtcOg0','WPa/WPq','W59sWQXkomkl','BH8Qz8od','WRfbCSktWRbIxZddMSkJe0W','lNP2W6NcKq','WQSTWRlcQW','amopEfxcHCkV','WP3dICkCWQxcUb12W4GaWPa','DZuJq8oS','WOvRW67dHSkmcrGOzfxdHHPv','WRmyWRldUNq','WPrsECkuWO4','WO4FWPTmlmk+zmkAW4tcI8oxgGtcG2u','WPrKea','W6dcHGu','dSodWR3cTSok','WPSPbctdSeT1h8ogWPe','W4HfmJm','tI/cIGi','jmoCWQe','WP8/WP3dVMZcP8k6WO7dM8kfl1nni3u','h2ueaCky','hNWzeq','W75wW4y','W6KUC8ks','WOldUw17Fa','W419xh7cUZK2nCo1WPnLW6L+','o093W4RcQCkndq5C','o8oYfWpdVW','WPz4y8kTFG','W4HjptK','oM01aSke','cCkTW7xdRmkh','W50IW4hdGCoz','lvKBiSkt','gmo0WOxcTG','WQW/WPhcOw9r','WOqEWOfxf8k1ymkgW5xcGCoI','mefCW6NcKW','leTQW5dcSW','oSkpW6pdUmkYW7ek','W5XeW4WkFmoMkCkjW4lcH8oBgX0','W5JdT8kYsSk5','5P2z5yQF5PAN55Q45B+P5BUW','WOvrnHVcMa','WPxdUNVdTCoS','rwRcN8o2WPK','W7KHW7hdV8oc','54M85P2l772tdCoIksldOmoUWQlcOG','kCoCFvlcPW','g1NdSa','W67dHddcRmkwkxFcQCkYbCoZW4ekW4jNzaZdJu1QW7FcRqOsWPq','W49uWQrpe8klighcMSodqW','W6/cTJVcOCkH','ymoDycvrtW','WP0TdcBdIh1Jdmoq','W7RKURVKUA/NUj/LJOJPO7hLJyKK','W50CtG','WOyJWRdcPwjrqHy','W5a+WR7cMmomFLCZzeq','WRfuWPVdTSkpWOKHpmkwWOK','WPVdVdFdLti','WPxdH8ks','W5GWWRdcSCohtq','WOtdPNVdGSo1W57cPCkdW6O','jNNcVYtdGmojeWpcSCkfW5/dTXlcSCo5ACoYWO7dJLhcLW','W59sWQ1vomkangBcR8ozDG0YW7ej','W55uWRLSiSkj','WPfEW70fW7a','WP9libFcJSoBWRbeWQG','lLjRW4lcQ8kghq','WP45WP3dRG','WOFcHxxcImoetKhdOmoMW6uJW7BcVeeBa8kOpXKnW7NdVSkfjqaPo8k7WOWHvIJcJJ7cVJFcJWhcTmk9erhdNSolxaqXWOy','W6hcICkfE8oKBudcKCo1rGb0W6zhohBdSSoGWRXxW6uzW5ZdQCk6W5ykWPZdGSoCjCooFgtdImotl8kVjmoiW75Gb8k1h8kghHVdU3aFW7a+WRz1tdxcHSoHW7eJWQfIWOXty1TIidHOkW7cSSoyWP8FWQjzW5ZdM8kgW4uXW4pcSmkJWPFcLZ3cTmoQW6tdHmoCW5xcKSkoW7CXw8k7kW3dI8o8vN0Wdmo7j8kEWQO','h3FcQGZdTa','W5jsWRq','WP3cKg/cNmoygq','ichcLCok','EtNcJH7cKxZdSaW','W5C9uCoyaW','W7NcHr7cQCoi','W4hdH1CLW5W','iCoOW5VcHCov','WOjEpXS','W7dcGZS','dv9hW6RcIG','WOhdGxjNr8oBWP3cLSoK','df/cPIFdMW','hx/dNv7dPYJcQv4RsmkrWR5Bbq','ECkUvL/cQ8oFW5VdJSkoq8oaWQZdNa','W63cHXdcHSkxW5DoW4BcGSodlmkhBW','W7y2Fq','cSoKW6xcM8os','WOGmhJZdUq','W7/dP1K','W4ySwxhdQG','WQ8cWRxdK0O','W6fnW5mNuqfkW4ddJW','WQv1uCkH','W5XtecRcHq','WO8vWPrwbmkNCmkbW5q','W55yWQjpeSkbnghcRW','WOXPemklwIJdNhxdTsuQW69U','BmkWW5tcNW','itK+zxxcUmklW6LzWRzPW5S','WODEW6GU','W6dcHG
|
|
|
|
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
|