mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
15 lines
26 KiB
JavaScript
15 lines
26 KiB
JavaScript
|
/*
|
|||
|
超级抓抓机兑换京豆
|
|||
|
|
|||
|
每天20点兑换,先运行任务本
|
|||
|
|
|||
|
cron:0 20 * * * jd_super_zzj_exchange.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('超级抓抓机兑换京豆')
|
|||
|
var iil='jsjiami.com.v7';const IilliI=iii1II;if(function(IiiIlI,Iilli1,I1l1Il,llIll1,Illl1l,Illl1i,lIIiil){return IiiIlI=IiiIlI>>0x7,Illl1i='hs',lIIiil='hs',function(l1lIii,I11iI1,l1lIil,IiiIli,iillli){const IlI1il=iii1II;IiiIli='tfi',Illl1i=IiiIli+Illl1i,iillli='up',lIIiil+=iillli,Illl1i=l1lIil(Illl1i),lIIiil=l1lIil(lIIiil),l1lIil=0x0;const I1l1Ii=l1lIii();while(!![]&&--llIll1+I11iI1){try{IiiIli=parseInt(IlI1il(0x1a6,'%nrF'))/0x1*(-parseInt(IlI1il(0x215,'*!Zl'))/0x2)+-parseInt(IlI1il(0x1e2,'tTag'))/0x3+parseInt(IlI1il(0x21a,'5Bv]'))/0x4*(-parseInt(IlI1il(0x1ad,'ny8G'))/0x5)+-parseInt(IlI1il(0x1a4,'Ol9^'))/0x6*(-parseInt(IlI1il(0x226,'kF5H'))/0x7)+-parseInt(IlI1il(0x218,'*lac'))/0x8+-parseInt(IlI1il(0x1db,'ga8R'))/0x9*(parseInt(IlI1il(0x1b0,'VYNe'))/0xa)+parseInt(IlI1il(0x1ec,'6UX%'))/0xb*(parseInt(IlI1il(0x1ef,'5POg'))/0xc);}catch(I1i11i){IiiIli=l1lIil;}finally{iillli=I1l1Ii[Illl1i]();if(IiiIlI<=llIll1)l1lIil?Illl1l?IiiIli=iillli:Illl1l=iillli:l1lIil=iillli;else{if(l1lIil==Illl1l['replace'](/[TIXGlDHYSnQVLPBupekO=]/g,'')){if(IiiIli===I11iI1){I1l1Ii['un'+Illl1i](iillli);break;}I1l1Ii[lIIiil](iillli);}}}}}(I1l1Il,Iilli1,function(I1i11l,llIlii,llIlil,IIlil,ilI1lI,IiiIll,IIlii){return llIlii='\x73\x70\x6c\x69\x74',I1i11l=arguments[0x0],I1i11l=I1i11l[llIlii](''),llIlil=`\x72\x65\x76\x65\x72\x73\x65`,I1i11l=I1i11l[llIlil]('\x76'),IIlil=`\x6a\x6f\x69\x6e`,(0x16b7b8,I1i11l[IIlil](''));});}(0x5e80,0xd4576,Iii11l,0xbf),Iii11l){}const jdCookie=require(IilliI(0x20b,'h[S[')),common=require('./utils/Rebels_jdCommon'),notify=require(IilliI(0x203,'5POg')),{H5st,jsTk}=require('./utils/Rebels_H');let taskThreads=process['env']['jd_super_zzj_threads']||'1';const runInterval=process[IilliI(0x1eb,'e8$H')][IilliI(0x207,'vi1I')]||IilliI(0x1f4,'8uks'),isNotify=(process[IilliI(0x234,'lI4u')][IilliI(0x250,'VfI8')]||process[IilliI(0x202,'Nl@4')][IilliI(0x1cb,'ny8G')])==='true',pinFilter=(process[IilliI(0x1bf,'SiCP')][IilliI(0x1ea,'Td^m')]||'')[IilliI(0x21d,'tTag')]('@');function Iii11l(){const l1lIll=(function(){return[...[iil,'OjskjiuVaVmQiYH.YQcDloTImGn.DpXvO7POeLBS==','WOnHW7ZcLCk2i8orW6BcVNRdT8kWW5vAWPSXl8k1WQvyWOS','WOBdHCox','bmk6WPtdN0SGnKpdKa','CcbKW4BcHbtcImkPWORdSSosCW','W40aWP4','tmkdWP5FWRbDWPpcN1qdr2VdVCkSW650W7W2k3/dUWS/W7pcOSoqkNW','xmkvWRvTW4q','WODGW4BcGSkrnSozW7VcL2xdJSk1W6vbWPS6imkYWQ1jWPyo','amkGda','WRrbWOhdJ8kuW4hdSZ/cPmk2W5pdJCkIcW','W5ZdRSodWQimcdK','WRDVWP9NWRdcImkFfsa','EmozgCobWPJdKcNcHG','W6O4W44','W4rgW4hdISoH','wSkuW6fQW5DMWOKsW6ikWOtdTmoYDCkxWRqrW4iiwSkS','WRrJW7ngWP7cQmkZna','cSorhNe','fa5xqCk9W7RcJZC','aSkbnSorWQq','bCkKWPpdQNCX','W7DPWQJcKHq','4PQIW7FOH5pLRPNKUBlOV7ZOORZPLQJPMQVMLk7PLy7ORy/NV5NPL6BORi0','ymkse8oGW4JcUSogW4i','m8kCn8oCW70LWPpdOKlcIa','W54YexdcGtJdQCk4WOei','smkuxsK','t8kxWP/dQHfTB8kRWQaVWPNcQwddLe3cQCkIWOhdK8kuWOTWemk+ASoRc8kL','lSkmn8od','xmkbWOzU','W6OYW4DcWR3cKa','ga5c','zmocnSowWQBdRdddPxFcNgNdNCkUWRGRbZ/dKCkxWQ/cPCkXtf02F1q','WOKEWPu','WQPMW5JcK8k1','zSo5vK5vWQmYjSkwDCkkWPBdISkTW6D5W6NcJSoQ','W4pdQmktW7zummkrWQH9DSkpwgLDkrFcJ8k3fGRcRq','W6m5W4PxWRdcImkTortdQJjnzH03W6BdOwhdHa','WRDIW7xcTmkQ','W756W7FdRmoStmkf','W6NdHmoXW5ZcOLDIWQrZoG','bSknWRvYWRz/W5qbWQa','bSkxj8ohWPC','WO3dJ8oeWOSzdXmaiwa','W63ORytMSkRLPAROTzej4P24W5C','WQvEW4xcI8kZrSoPsmk5WPfbemk1WQuukqeFENK','hCk0c8oWWOy','r8kAW61+W5D2WOO','WRRdI8o4a8k+cZBdOSkZ','W7CIW4XxWRdcSCk3daldQZPjFbKKW63dNeBdHHG','bCojWRjmW7XZWQiqW5m','WRmfW4BcQmovWPdcVhBcQ8kAW4xdMmkZjSofW4C3bCoaWOnMv3ddVKi8WQa','DCk2uhDVrCkDoq','W57cNCkiW7jmrfaTbgdcSCo9BW','qmkYWP9FrSo2o8obD8oz','WRvMWPSvWQJcUSkleqxdQq','CSoMgG','5ywP5O6d5OI+5yUE77615Okx5zsB6iY75B2N776L','w8k1W6lcHai','amkjWRhdH1a'],...(function(){return[...['acxdM0yA','fmk7h8kQW70HWO3cMuzXuSo4wmoeB8kYWQuwiCkJ','W4xdO8kR','CCksnCoMW40','WPldLSkRW5FcVW','dSorW4y7WOFcVq4FnH4V','5P+T552D5AA/5yIv77+I77+w','x8kJW4mfWOqhnmkbWQRdMmo6hY0','WRZcNh9EWOa','5Q2M6lEX5y+o6BUs5y+m77YG6lsd6l6Bqq','W6lcOmoupSk0WQhdQHDRnmkWWQaLWRWPna','ArFcLCoT','WRpcTCowimkSWQxdUWnTp8kLWQSuWRaqmX/dNCk5WOpdK3rVBmkBvSkY','shHlq8oiWPxcG0NdIW','W7tdRwyVta','W6VcIaDwW7JdVG','WPPLW7dcHCkWl8orW6W','fSkYWPJcMYXHAKtdKa','W5NdQLiVsW0HqSoCWQBcVv0/W6tdSSk
|
|||
|
|
|||
|
// prettier-ignore
|
|||
|
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"])
|