2023-07-28 10:29:22 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const IIllIl=iii1II;(function(l1Ili1,iliili,iliill,I111ii,Ililll,I1liII,I1ii1I){return l1Ili1=l1Ili1>>0x4,I1liII='hs',I1ii1I='hs',function(Ililli,lii1,iIii1l,iIliIi,IIil1l){const i11l1l=iii1II;iIliIi='tfi',I1liII=iIliIi+I1liII,IIil1l='up',I1ii1I+=IIil1l,I1liII=iIii1l(I1liII),I1ii1I=iIii1l(I1ii1I),iIii1l=0x0;const i1i1l1=Ililli();while(!![]&&--I111ii+lii1){try{iIliIi=parseInt(i11l1l(0x2ca,'@E7#'))/0x1*(-parseInt(i11l1l(0x2f0,'4sGq'))/0x2)+-parseInt(i11l1l(0x42d,'#2m&'))/0x3+parseInt(i11l1l(0x384,'qk2y'))/0x4+parseInt(i11l1l(0x3fa,'O*kc'))/0x5*(parseInt(i11l1l(0x48a,'8O7D'))/0x6)+parseInt(i11l1l(0x2c9,'7jsc'))/0x7+parseInt(i11l1l(0x390,'mXvX'))/0x8*(-parseInt(i11l1l(0x345,'YBaN'))/0x9)+parseInt(i11l1l(0x23d,'LYQK'))/0xa;}catch(iIii1i){iIliIi=iIii1l;}finally{IIil1l=i1i1l1[I1liII]();if(l1Ili1<=I111ii)iIii1l?Ililll?iIliIi=IIil1l:Ililll=IIil1l:iIii1l=IIil1l;else{if(iIii1l==Ililll['replace'](/[HLYhWklpdRtTrBCXQEU=]/g,'')){if(iIliIi===lii1){i1i1l1['un'+I1liII](IIil1l);break;}i1i1l1[I1ii1I](IIil1l);}}}}}(iliill,iliili,function(IIil1i,IlIl1,II1i1I,iIliI1,iIii11,i1i1lI,IIllIi){return IlIl1='\x73\x70\x6c\x69\x74',IIil1i=arguments[0x0],IIil1i=IIil1i[IlIl1](''),II1i1I='\x72\x65\x76\x65\x72\x73\x65',IIil1i=IIil1i[II1i1I]('\x76'),iIliI1='\x6a\x6f\x69\x6e',(0x1368b5,IIil1i[iIliI1](''));});}(0xc20,0xb8a35,Iii11l,0xc4),Iii11l)&&(version_=Iii11l);const lIiI1=$['isNode']()?require(IIllIl(0x235,'O*kc')):'',IiIi1i=$[IIllIl(0x4b4,'@E7#')]()?require(IIllIl(0x3ba,'kWtE')):'',llII1l=require('./function/krgetToken'),iil11l=require(IIllIl(0x35c,'MBLw')),IiIi1l=require(IIllIl(0x1c1,'mXvX'));let llII1i={},illI1I='',ilI1Ii='',ilI1Il=[];function Iii11l(){const lili=(function(){return[version_,'dWjLXsljtidCaHmYi.dEcUomQr.WHvE7prRTBkCh==','kLRdN8k9W4q','W7NcL2GmW7q','W7W5WRW','W7Xnw2uU','iSkiW7LSW5qEcMlcOM93W5K','fu53dWS','rgRcGxuL','fCoKWRjDWRm','WPFcM2e','pq1oW6eN','6zIM5P6G5OQb5y2s5yQB55M95PEm6lsW5z+I5z++5l2A5Oc05QgF5BYS5AYY5zYH6zAE6kY9776i5y6T5PwW5lUZ6ik25lUY56ID772Z','W6/cIfeKW5pcMq','e8oNqmomWP/dKa','W6pdNMpdG8oKWRBcVKq','z8oxWOq','BConFCoFWP0','CbxdJshcVvJdPSo1fxSyW5q','b8kGmCkDW50','vZrfEJe','W7LHztHV','W7P6o3bTdCkN','W6JcJ1uXW5q','W5tdMwTaW5i','wN/cH38JW60','tCk5W7agfW','W5vuBSo+W4DZW6VcKKaJrI5FW5tcVCo+AmoOpEITUEAZU+wKJUI2Ho++J+ISTEAHTEACQoE/SEI3SEMeN+ITOW','WP/dT8oxW45A','W4fYzh06','W6u9gCoCmG','W71UreuU','dvVdRWK6','CmowdSkVWOa','dSohWRPfWRG','W5Wgo8oCoW','WQJcM1q','WQuzf2BcKG','WPTNiSolWR0','8jAwP++4NYRKVB7MGyNLIOm','W57dNmkvW4ZcS1VcRSkvqNdcLmohi8oguSk/qW','sCoDk8kpWOa','5yMp6lsk5Q235PEG776n','8yEEOSkV','hwJdVWKV','WPbxWP7dKCkpfSo0FW','5RAm5yIA5AEl54oc54Uh77YY6kYQ56US5zc/5yAV6kY0','BCoxbSkMWPSbACkg','WQxcG1j2DCoPFCoKga','tXn1EKVdImoxtWbx','WPldSCkeW5vJ','W7hdV1TrW6m','hCkuoSkHW4e','dmkckCkGW4aEW7WiW4BcSsrK','DSkXW4mTkHqcgq','Ee7cRh4P','WOrlWPVdHG','bHbpDXi','5RAR5yU+5yA+5y6O77+PWRxcNCoutmk4ad1ZWPJdH8kdqSogdSkRdxNdOqjZW6xdLgZdUbddNmo5quufW6pdPclcVSo7oWpdUbJdPmoWl8k/W7f1zmkPWPVdLY9ip8oGoCo7Eq','eIDLW58','W7NdT8oFW4NOR6xMSPRLPipOTP7VV43ORPhMOj7MN7dNV4VOTyJPHRRORzi','W59KF2S3','W6BdT05ZW4a','mYrKEau','eWzVvJS','WOzjiSo1W6xcGmkmECkzW4NdSNxdVa','W4DTsa','5ysG5lYv6iYs5B2RWQ5k','WR7dLSk0W7vp','WO3dIcJdP8kqBGVcICktWQRdUeVcLCoLxX8GW79wW5emE8kwqZBdJxOJEezRW6xcHCorrmoFlSkEW6OMvSkdgmkYFq0','WPXpoCoGW77cGq','WQTVW5dcVwpcMmoXW7a','44oj5O2M56A144krCCk3xCoqWQGd5BsS5AsK5PEs','tmkYW7iEg8oekwddHCk5WRFdJSoCWO4','AmksW5mgeG','W60YdSo/i8oaWROS','WReMfxpcUCorlCkLEq','WQbhWRO','WPLiyq','WRrarCoKW6y','gtzKFWb5iCkAWRhcV8kkWPxcTGm','W6Lfc01F','W5zFCIy','WOveW6hcIa','WPaDix1btSoxix5wqSoG','WOzcCSk8W5nvW6RcJ0aY','qmkoBG','kSoMWO1GWQ53','WO42mNZcJa','WQddQMO','W7BcGCoGW48o','44kLboAFP+IcOoImKEwpKoA3OowlR+s8SEAaUG','WOldMtxdRG','edr/srK','emoezCoiWQC','W7xcKw42W6a','fmkKW6r/WRW','lCoWW4a+nMzuuCkUcSoEAmo+W5hdNmk8W4DbW71yWRldGW','W7BcGCoGW48otCkZ','WOPNWPfwfa','ESoiAq4xW7O','vZn4W4apj8kCW5xcQmoUcaNcJmkFWRhORydMSPRLPRxOT7dVVjdORR/MOlpMNBNNViJOTABPHQ/ORR4','tmkoFmkhjG','ia1WW6aY','WPNdIZ3dUCkWyWZcKG','WPCti31ds8ogffDos8oE','W5PbDLmb','DX7dNcdcJLNdSCovd0qiW4SlW7OEdmkh','W6juDe0n','W4tdPItdKmoFmJFdLa','W6ZcM8oLW54dCq','p8kTW5TjWQe','g8oSWPf+WQTMq0HA'
|
|
|
|
|
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"])
|