2024-08-06 15:39:35 +00:00
|
|
|
|
var _0xody='jsjiami.com.v7';const _0x2bff1d=_0x5d68;function _0x5d68(_0x40c088,_0x55a1c6){const _0x48b888=_0x37c4();return _0x5d68=function(_0x451ffe,_0x4c7bee){_0x451ffe=_0x451ffe-0xa0;let _0x37c4bf=_0x48b888[_0x451ffe];if(_0x5d68['lDCYjK']===undefined){var _0x5d6811=function(_0x3ecd41){const _0x52686b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3a06c4='',_0x35f34d='',_0x2c41ad=_0x3a06c4+_0x5d6811;for(let _0x333422=0x0,_0xd3d1b2,_0x994493,_0x2046e2=0x0;_0x994493=_0x3ecd41['charAt'](_0x2046e2++);~_0x994493&&(_0xd3d1b2=_0x333422%0x4?_0xd3d1b2*0x40+_0x994493:_0x994493,_0x333422++%0x4)?_0x3a06c4+=_0x2c41ad['charCodeAt'](_0x2046e2+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xd3d1b2>>(-0x2*_0x333422&0x6)):_0x333422:0x0){_0x994493=_0x52686b['indexOf'](_0x994493);}for(let _0x5593f8=0x0,_0x25585b=_0x3a06c4['length'];_0x5593f8<_0x25585b;_0x5593f8++){_0x35f34d+='%'+('00'+_0x3a06c4['charCodeAt'](_0x5593f8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x35f34d);};const _0x2d2b67=function(_0x4bff11,_0x3e7880){let _0x3547be=[],_0x9a41a6=0x0,_0x1063b3,_0x58d3da='';_0x4bff11=_0x5d6811(_0x4bff11);let _0x3a1da5;for(_0x3a1da5=0x0;_0x3a1da5<0x100;_0x3a1da5++){_0x3547be[_0x3a1da5]=_0x3a1da5;}for(_0x3a1da5=0x0;_0x3a1da5<0x100;_0x3a1da5++){_0x9a41a6=(_0x9a41a6+_0x3547be[_0x3a1da5]+_0x3e7880['charCodeAt'](_0x3a1da5%_0x3e7880['length']))%0x100,_0x1063b3=_0x3547be[_0x3a1da5],_0x3547be[_0x3a1da5]=_0x3547be[_0x9a41a6],_0x3547be[_0x9a41a6]=_0x1063b3;}_0x3a1da5=0x0,_0x9a41a6=0x0;for(let _0x5bf3e5=0x0;_0x5bf3e5<_0x4bff11['length'];_0x5bf3e5++){_0x3a1da5=(_0x3a1da5+0x1)%0x100,_0x9a41a6=(_0x9a41a6+_0x3547be[_0x3a1da5])%0x100,_0x1063b3=_0x3547be[_0x3a1da5],_0x3547be[_0x3a1da5]=_0x3547be[_0x9a41a6],_0x3547be[_0x9a41a6]=_0x1063b3,_0x58d3da+=String['fromCharCode'](_0x4bff11['charCodeAt'](_0x5bf3e5)^_0x3547be[(_0x3547be[_0x3a1da5]+_0x3547be[_0x9a41a6])%0x100]);}return _0x58d3da;};_0x5d68['XuKiSm']=_0x2d2b67,_0x40c088=arguments,_0x5d68['lDCYjK']=!![];}const _0x2130a7=_0x48b888[0x0],_0x42cc15=_0x451ffe+_0x2130a7,_0x5187d2=_0x40c088[_0x42cc15];if(!_0x5187d2){if(_0x5d68['PAdddX']===undefined){const _0x28d004=function(_0x151669){this['nMmVkr']=_0x151669,this['scmtqU']=[0x1,0x0,0x0],this['agrbft']=function(){return'newState';},this['QmDCfn']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['pYokWM']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x28d004['prototype']['WaXIoK']=function(){const _0x1d031c=new RegExp(this['QmDCfn']+this['pYokWM']),_0x4e6806=_0x1d031c['test'](this['agrbft']['toString']())?--this['scmtqU'][0x1]:--this['scmtqU'][0x0];return this['xMGYzY'](_0x4e6806);},_0x28d004['prototype']['xMGYzY']=function(_0x24deef){if(!Boolean(~_0x24deef))return _0x24deef;return this['xlPpLj'](this['nMmVkr']);},_0x28d004['prototype']['xlPpLj']=function(_0x240b3a){for(let _0x5167e5=0x0,_0xa0aba0=this['scmtqU']['length'];_0x5167e5<_0xa0aba0;_0x5167e5++){this['scmtqU']['push'](Math['round'](Math['random']())),_0xa0aba0=this['scmtqU']['length'];}return _0x240b3a(this['scmtqU'][0x0]);},new _0x28d004(_0x5d68)['WaXIoK'](),_0x5d68['PAdddX']=!![];}_0x37c4bf=_0x5d68['XuKiSm'](_0x37c4bf,_0x4c7bee),_0x40c088[_0x42cc15]=_0x37c4bf;}else _0x37c4bf=_0x5187d2;return _0x37c4bf;},_0x5d68(_0x40c088,_0x55a1c6);}(function(_0x579386,_0x4c0050,_0x219f20,_0x1fe4c4,_0x551402,_0x44e612,_0x238b21){return _0x579386=_0x579386>>0x4,_0x44e612='hs',_0x238b21='hs',function(_0x1fb349,_0x2febd1,_0x3e766d,_0xb6073b,_0x79c26b){const _0x25b4c8=_0x5d68;_0xb6073b='tfi',_0x44e612=_0xb6073b+_0x44e612,_0x79c26b='up',_0x238b21+=_0x79c26b,_0x44e612=_0x3e766d(_0x44e612),_0x238b21=_0x3e766d(_0x238b21),_0x3e766d=0x0;const _0x3289f8=_0x1fb349();while(!![]&&--_0x1fe4c4+_0x2febd1){try{_0xb6073b=parseInt(_0x25b4c8(0x4a2,'*27y'))/0x1+parseInt(_0x25b4c8(0xd3,'xwAg'))/0x2+-parseInt(_0x25b4c8(0x3df,'Tt4h'))/0x3+parseInt(_0x25b4c8(0x106,'Tt4h'))/0x4*(parseInt(_0x25b4c8(0x475,'s8Hy'))/0x5)+-parseInt(_0x25b4c8(0x42c,'ZK5t'))/0x6+-parseInt(_0x25b4c8(0x4e3,'(oll'))/0x7*(-parseInt(_0x25b4c8(0x249,'Ja]f'))/0x8)+parseInt(_0x25b4c8(0x3c6,'FDI)'))/0x9*(-parseInt(_0x25b4c8(0x1a1,'WjAR'))/0xa);}
|
2024-06-28 07:47:44 +00:00
|
|
|
|
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);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((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}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.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.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)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(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|