2024-07-08 23:09:38 +08:00
|
|
|
|
const _0x2e8815=_0x4c01;(function(_0x933ab2,_0x1559f5){const _0x125927=_0x4c01,_0x3d281f=_0x933ab2();while(!![]){try{const _0x57d9f5=-parseInt(_0x125927(0x28d,'C(^d'))/0x1+-parseInt(_0x125927(0x323,'ntwv'))/0x2*(parseInt(_0x125927(0x250,'b@7P'))/0x3)+-parseInt(_0x125927(0x139,'74y)'))/0x4+-parseInt(_0x125927(0x1a0,'MCES'))/0x5*(-parseInt(_0x125927(0x13e,'#M@B'))/0x6)+parseInt(_0x125927(0x1d6,'yMbR'))/0x7*(parseInt(_0x125927(0x37d,'b@7P'))/0x8)+parseInt(_0x125927(0x230,'#hLE'))/0x9+parseInt(_0x125927(0x34f,'W10v'))/0xa*(parseInt(_0x125927(0x172,'ntwv'))/0xb);if(_0x57d9f5===_0x1559f5)break;else _0x3d281f['push'](_0x3d281f['shift']());}catch(_0xf5135e){_0x3d281f['push'](_0x3d281f['shift']());}}}(_0x4fab,0xe15ab));const jdCookie=require(_0x2e8815(0x255,'#hLE')),common=require(_0x2e8815(0x384,'m71s')),notify=require('./utils/Rebels_sendJDNotify'),getToken=require(_0x2e8815(0x16f,'O5u4')),CryptoJS=require(_0x2e8815(0x1b7,'61OQ')),activityUrl=process[_0x2e8815(0x15a,'@#&v')][_0x2e8815(0x212,'A5x!')]||_0x2e8815(0x319,'ntwv'),joinMember=process[_0x2e8815(0x192,'u0Hp')][_0x2e8815(0x353,'!j!&')]===_0x2e8815(0x351,'OM&c'),dplh_viewShop=process[_0x2e8815(0x305,']jtD')]['jd_dplh_viewShop']==='true',dplh_AddCart=process['env'][_0x2e8815(0x2bf,'tSf2')]===_0x2e8815(0x163,'i10('),dplh_draw=process[_0x2e8815(0x1ab,'tSf2')][_0x2e8815(0x278,'HccU')]||0x5,dplh_wait=process[_0x2e8815(0x221,'N63Z')][_0x2e8815(0x2f1,'W10v')]||0x1,isNotify=process[_0x2e8815(0x13c,'f(L$')][_0x2e8815(0x1ee,'!j!&')]===_0x2e8815(0x1bf,'^[Vd'),hotbreak=process[_0x2e8815(0x19c,'#M@B')][_0x2e8815(0x262,'Ao!(')]===_0x2e8815(0x24d,'GR2&');let waitTimes=parseInt(dplh_wait)*0x3e8;function _0x4fab(){const _0x369b25=['WPfWaW','WOe8iW','tCouWPpdI3hcMq0','hCk8kq','WR7cHtdcISolW7q','4PI8r+IUO+wHPUwfREAHRow9G+AUKUEGGEEyNEwnVEMfVq','5B+a5yM65BEq6k+C576m6BU75zoT5y2V776X','dYddJSon','W5HHymk3W6pcUSkMWRhdVHe','WQvLW4riWQToa8oAfb4','WRbaW4NcISoGW69RsW','5zgZ6z6S6yk15yIl5yUAWRuz','WRJdOGzGW6fHj8oJ','z2NdVCkCAWe','gSkSBSoWW5VdJq','sSkDd8oTWQ1B','h8k0jue','W64JWQ9/WO7cSSkPuvPkmSocWPFcKr3cNSoalSohW7dcQbNdMCoOWPPvWOVcVJhdVCkGbIntnCoiWO7dQ3/dGCkava','W4NdQCks','WPRcMLZcN8kccXHncSk1','h/geSzW','WRXVW48','dSk6kCownmo8','W7mXBJ7cKYmAs3lcTmovW44','W7ecj37cLtCP','W4i3kCksWOmBW7ytWQXiWRSdWRejWPqIubLmW4TTyHBcLmkJzWdcGe83dhXACCkuga','dSkOASoWW7BdRxaU','W6JdS2hdU8o9W7fKW6pdTLe','FxVcSa','BmosWOW','cmk9pLbkW4/cH1y','W4jXe8orl8k2','5yUu5yszW5q','W4jYemouiCk7WOb2W4pcNgFcRmkJBwXRW4RcHSo2W7DrD8otmSoUkwq/WOemWOW','BCorWQmB','WQqPWQyeWOhcRCkJ','WRmIWRmLWO3cS8kY','5B2B5y60FEI/UoMCHUw+PG','wSkIWQeTW70ObG','sUMhHEw7LSkp','W4VdUSk1EZdcIJDW','W5hdKKtdHG','FG7dGCoh','WRhcJYVcNCoqW7i','WP7cUfrFa8orW651AvfaW7v7hSkjda','smkqW4JdLfjdfmoSCZKKW7e','CxpdUmk8DX/cIa','tSoSwmo0WRXvW57cJSk3W7hcJW','ySo3pCop','W5Tny8kZW57cLZ57','BCk1jW','zHpdKW','otvNfSouWPy','WP/cSSkjwa','dbeb','WRrHW5WB','FmorWOCPW6RcLe3dSColuae','xs9btG','CSo4W7dcOq','xf9BWQ8rD8kwW4RdPcu','WPX8ecpdMG','cCkGp2vOW4i','W5TrFSkQW7ZcMsrPwW','W6JcM8kszsu','yConWPVdOhBcNIvOWPCNWQNcNg0','WRr0W5LBWRH0h8okhaFcGHq6','rCo9sCo7','iIDVaq','lCk7p2vyW5lcTG','WPhcPgHteSotW6fpvK5wW68','5REU5yQ/5Bk35PYy5B+o5AEw772N5B6Z5AAi5PAD6zsz772V','tCklb8o+WO1rtqL5W5pdTG','gmkGlmo2kmoIjW','jUEKNowjT8oe','zCo3o8ok','W7WSDt/cTWSrxgtcP8o7W48','WOdcN0pcHSkKgZO','5lMa55ce5B2G5yElCSo4WRO','W55NymkoW6FcVmkQWRhdPae8W7VdOeu','WQz/W4jcWOj0gmoh','WQXmW5VcLmolW71Y','W6qMCtdcKWu','WQjLW4uBisJdOSkLWQeSW6a2','edZdGSorlmkY','W5RJGjdMTPpLI5ibaUocSa','WPlcTxm','WQD3kbRcPqa6uhK','WRdcGs3cImoQW67dLa','5y2e6yAO5B2u5zcI54Mc5OgrCComuSkKWPJcJ8opWO/dUCoS','W6xcL8kb','emkNo8orkmoGldNdN8obWP8PzSkfAW','tmkZog4FW7Di','WPNMIORKUi/LR7ZNIOSk','uceGowaOW6eRhdH+amoGm0mPWP/dSXTTk03cKa','qmo/sCoZWOLDW5JcK8kVW7dcHa','WQThW4pcLColW41PqSkqWPbJW4tdRbZcSI0','W7VcMCkisa8iW4C','xmkSWOmMW4q4gv9HeSkS','W51WDCkP','fW7dQMXGuW','lSk+lq8qW6zmW5TUnSozWQv9w1/dTetcGmkbWPqyWOvttSoqoGGUgItcRmkRWQdcMa','BmkZm1mFW7Tn','44gC5O6w56s444g16k2Q5yA66i2f5y2HW4hcMZKkW6/cNq','W5rJcCom','WR9ZW6btWRX2dSoh','tmo5tSoPWP5tW4K','WP7cQ8kutq','5AsP5Ps46lwY5z295z2j5l6L5Oo9dUIaMUEYPUs/VEAaIU++LG','W68po33cOdK4WP0k','qghdUhqKqCkC','vsfs','WPxcNvi','WO7cPCkut
|
|
|
|
|
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"])
|