2024-01-08 08:54:01 +00:00
|
|
|
var _0xodz='jsjiami.com.v7';const _0x461eec=_0x3c77;if(function(_0x719777,_0x2ff64e,_0x2bd50b,_0x4fb158,_0x3ba4fe,_0x573e27,_0x201c4e){return _0x719777=_0x719777>>0x6,_0x573e27='hs',_0x201c4e='hs',function(_0x1b1732,_0x5c0ff4,_0x1dfd3b,_0x26f1bd,_0x25ea2b){const _0x6fa0f=_0x3c77;_0x26f1bd='tfi',_0x573e27=_0x26f1bd+_0x573e27,_0x25ea2b='up',_0x201c4e+=_0x25ea2b,_0x573e27=_0x1dfd3b(_0x573e27),_0x201c4e=_0x1dfd3b(_0x201c4e),_0x1dfd3b=0x0;const _0x271b60=_0x1b1732();while(!![]&&--_0x4fb158+_0x5c0ff4){try{_0x26f1bd=parseInt(_0x6fa0f(0x44d,'KwCi'))/0x1*(parseInt(_0x6fa0f(0x1ef,'5[JH'))/0x2)+-parseInt(_0x6fa0f(0x731,'GQZV'))/0x3*(-parseInt(_0x6fa0f(0x6d9,'flW9'))/0x4)+-parseInt(_0x6fa0f(0x285,'ghlu'))/0x5*(-parseInt(_0x6fa0f(0x850,'N#1V'))/0x6)+-parseInt(_0x6fa0f(0x83f,'x!9z'))/0x7*(parseInt(_0x6fa0f(0x225,'Ud96'))/0x8)+parseInt(_0x6fa0f(0x61b,'JnQD'))/0x9*(parseInt(_0x6fa0f(0x440,'t$1K'))/0xa)+-parseInt(_0x6fa0f(0x1da,'&^SJ'))/0xb*(parseInt(_0x6fa0f(0x549,'FOEy'))/0xc)+-parseInt(_0x6fa0f(0x363,'wNvZ'))/0xd;}catch(_0x19bb44){_0x26f1bd=_0x1dfd3b;}finally{_0x25ea2b=_0x271b60[_0x573e27]();if(_0x719777<=_0x4fb158)_0x1dfd3b?_0x3ba4fe?_0x26f1bd=_0x25ea2b:_0x3ba4fe=_0x25ea2b:_0x1dfd3b=_0x25ea2b;else{if(_0x1dfd3b==_0x3ba4fe['replace'](/[WTNAXKuVyLGwIPOrFMQ=]/g,'')){if(_0x26f1bd===_0x5c0ff4){_0x271b60['un'+_0x573e27](_0x25ea2b);break;}_0x271b60[_0x201c4e](_0x25ea2b);}}}}}(_0x2bd50b,_0x2ff64e,function(_0x59382b,_0x144a2f,_0x215e52,_0x4fa366,_0x9d2541,_0x18c333,_0x2898a9){return _0x144a2f='\x73\x70\x6c\x69\x74',_0x59382b=arguments[0x0],_0x59382b=_0x59382b[_0x144a2f](''),_0x215e52=`\x72\x65\x76\x65\x72\x73\x65`,_0x59382b=_0x59382b[_0x215e52]('\x76'),_0x4fa366=`\x6a\x6f\x69\x6e`,(0x14f40e,_0x59382b[_0x4fa366](''));});}(0x2f00,0xf0968,_0x411d,0xbe),_0x411d){}const _0x445f00=(function(){const _0x1c1e45=_0x3c77,_0x238d03={'UWDsN':function(_0x313c76,_0xb959e6){return _0x313c76===_0xb959e6;},'VAyMW':_0x1c1e45(0x2aa,'ZSR&'),'rUkZF':_0x1c1e45(0x5c0,'flW9')};let _0x24df2e=!![];return function(_0x500acc,_0x42ccaf){const _0x134f0a=_0x1c1e45;if(_0x238d03[_0x134f0a(0x219,'uKvC')](_0x238d03[_0x134f0a(0x10f,'SlXc')],_0x238d03[_0x134f0a(0x55e,'A99k')]))_0x24a344[_0x134f0a(0x46a,'GXBd')]&&_0x238d03[_0x134f0a(0x67e,'SFES')](_0x3971b2[_0x134f0a(0x4b0,'DdLr')],!![])&&_0x4ff7f1[_0x134f0a(0x5bb,'Wp3m')]?_0x4dccb8[_0x134f0a(0x4fa,'L1ZT')](_0x4fe65b):_0x31d2f3[_0x134f0a(0x159,'@JUU')](_0x58f861[_0x134f0a(0x6dd,'*Bg#')]);else{const _0x2241da=_0x24df2e?function(){const _0x4007c8=_0x134f0a;if(_0x42ccaf){const _0x50ffe1=_0x42ccaf[_0x4007c8(0x438,'Fz*A')](_0x500acc,arguments);return _0x42ccaf=null,_0x50ffe1;}}:function(){};return _0x24df2e=![],_0x2241da;}};}()),_0x268d11=_0x445f00(this,function(){const _0xc8fb09=_0x3c77,_0x59cc85={'lVJbJ':_0xc8fb09(0x4a9,'GXBd')};return _0x268d11[_0xc8fb09(0x4c4,'Fz*A')]()[_0xc8fb09(0x169,'dNZC')](_0x59cc85[_0xc8fb09(0x3cd,'CaN#')])[_0xc8fb09(0x6df,'GXBd')]()[_0xc8fb09(0x628,'*Bg#')](_0x268d11)[_0xc8fb09(0x64e,'Ud96')](_0x59cc85[_0xc8fb09(0x46e,'N@VP')]);});_0x268d11();const _0x3d83ab=$[_0x461eec(0xf4,'g2A#')]()?require(_0x461eec(0x418,'VYKi')):'',_0x1a4bc7=$[_0x461eec(0x177,'i6nk')]()?require(_0x461eec(0x2c7,'t$1K')):'',_0x292abf=require(_0x461eec(0x7a5,'KwCi')),_0x3e243f=require(_0x461eec(0xe8,'$u5%'));if(process[_0x461eec(0x130,'L1ZT')][_0x461eec(0x1ee,'FOEy')])try{require(_0x461eec(0x62d,'ZU4U')),ccc=require(_0x461eec(0x55a,'okS[')),$[_0x461eec(0x54d,'okS[')]=ccc[_0x461eec(0x47c,'DdLr')]($[_0x461eec(0x6ed,'N@VP')][_0x461eec(0x2c6,'GXBd')]($)),$[_0x461eec(0x2c8,'ZU4U')]=ccc[_0x461eec(0x596,'L1ZT')]($[_0x461eec(0x595,'S5&n')][_0x461eec(0x353,'!ZqL')]($));}catch{$[_0x461eec(0x66d,'FOEy')](_0x461eec(0x69d,'Fz*A')),$[_0x461eec(0x85c,'$u5%')]=$[_0x461eec(0x1fa,'JnQD')],$[_0x461eec(0x2d4,'N@VP')]=$[_0x461eec(0x22b,'N@VP')];}else $[_0x461eec(0x501,'ghlu')]=$[_0x461eec(0xcd,'3pfs')],$[_0x461eec(0x308,'JnQD')]=$[_0x461eec(0x6b9,'A99k')];let _0x1e7aa7=[],_0x59ca46='',_0x4732ed='',_0x2bc46f='',_0x450432={},_0x272b22=0x0,_0x3363d4=process[_0x461eec(0x79c,'FOEy')][_0x461eec(0x840,'I7Nr')]||'',_0x235395=_0x461eec(0x4da,'ghlu');$[_0x461eec(0x26b,
|
2024-01-02 12:59:48 +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"])
|