KR/jd_lzkj_loreal_pointsExchan...

15 lines
61 KiB
JavaScript
Raw Normal View History

2023-10-16 10:51:57 +08:00
/*
活动名称积分兑换超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10079&templateId=<模板id>&activityId=<活动id>&prd=cjwx
环境变量jd_lzkj_loreal_pointsExchange_url // 活动链接
jd_lzkj_loreal_pointsExchange_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_pointsExchange_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_pointsExchange_break // 493后继续执行默认退出运行true/false
*/
const $ = new Env('积分兑换(超级无线)')
2023-11-12 16:44:11 +08:00
var version_='jsjiami.com.v7';const i11111=iii1II;(function(i1111I,IliIl1,lIl1lI,iiI1ll,lIiliI,iIiill,Ii1IIi){return i1111I=i1111I>>0x6,iIiill='hs',Ii1IIi='hs',function(Ii1IIl,l111I,ll1lli,ll1lll,Illlil){const i1lli=iii1II;ll1lll='tfi',iIiill=ll1lll+iIiill,Illlil='up',Ii1IIi+=Illlil,iIiill=ll1lli(iIiill),Ii1IIi=ll1lli(Ii1IIi),ll1lli=0x0;const I1iili=Ii1IIl();while(!![]&&--iiI1ll+l111I){try{ll1lll=-parseInt(i1lli(0x22c,'Mnsf'))/0x1+-parseInt(i1lli(0x23a,'gHIw'))/0x2+parseInt(i1lli(0x45d,'xqeS'))/0x3+parseInt(i1lli(0x37a,'L00X'))/0x4+-parseInt(i1lli(0x355,'jQFG'))/0x5+-parseInt(i1lli(0x38d,'hCz2'))/0x6*(parseInt(i1lli(0x349,'n!dG'))/0x7)+parseInt(i1lli(0x35a,'Fm&a'))/0x8;}catch(lililI){ll1lll=ll1lli;}finally{Illlil=I1iili[iIiill]();if(i1111I<=iiI1ll)ll1lli?lIiliI?ll1lll=Illlil:lIiliI=Illlil:ll1lli=Illlil;else{if(ll1lli==lIiliI['replace'](/[wXtDrGCudkHOpNbJPlQK=]/g,'')){if(ll1lll===l111I){I1iili['un'+iIiill](Illlil);break;}I1iili[Ii1IIi](Illlil);}}}}}(lIl1lI,IliIl1,function(lI1ill,Illlii,lI1ili,Il1II,i1lll,Ii11I,I1iill){return Illlii='\x73\x70\x6c\x69\x74',lI1ill=arguments[0x0],lI1ill=lI1ill[Illlii](''),lI1ili=`\x72\x65\x76\x65\x72\x73\x65`,lI1ill=lI1ill[lI1ili]('\x76'),Il1II=`\x6a\x6f\x69\x6e`,(0x147129,lI1ill[Il1II](''));});}(0x32c0,0x683e9,Iii11l,0xcd),Iii11l)&&(version_=i11111(0x3fb,'Lyte'));const llii1I=require(i11111(0x3e4,'!2dz')),iiIiIi=require(i11111(0x242,'n!dG')),l1lll1=require(i11111(0x474,'jQFG')),IilI=require(i11111(0x25d,'lm8k')),{wuxianDefense:liIlli}=require('./function/jdCrypto'),{loreal_savePrize:lil11}=require(i11111(0x315,'ZX^0')),Iillll=process['env']['jd_lzkj_loreal_pointsExchange_url']||'',lllI1=process[i11111(0x26d,'G[$q')][i11111(0x453,'xqeS')]==='true',III11I=process[i11111(0x264,'X5hx')]['jd_lzkj_loreal_pointsExchange_break']===i11111(0x472,'I$Nn'),Ilii1=process['env'][i11111(0x2c0,'33d2')]==='true';let ll11i1='',ili1I1='';const Iill=Object[i11111(0x46e,'xV#p')](llii1I)[i11111(0x2a1,'&4^g')](I1I1li=>llii1I[I1I1li])[i11111(0x419,'$]z8')](l1i11=>l1i11);!Iill[0x0]&&($['msg']($[i11111(0x457,'22@7')],'【提示】请先获取Cookie'),process[i11111(0x207,'X5hx')](0x1));!(async()=>{const lIl1li=i11111,IlI1li={'jibZt':function(III111,liIll1){return III111(liIll1);},'EuMBL':function(l1llli,iI1lII){return l1llli-iI1lII;},'lCwwf':function(ll11iI,l1i1I){return ll11iI!==l1i1I;},'NcTDR':'YXhXy','qlbLw':lIl1li(0x2ca,'I$Nn'),'hZjYH':lIl1li(0x467,'t!yG'),'xLavc':lIl1li(0x236,'L00X'),'ueWeG':lIl1li(0x42b,'wOut'),'mZinj':lIl1li(0x298,'$GRf'),'jCsDS':function(l1llll,I1I1ll){return l1llll!==I1I1ll;},'mhbfs':lIl1li(0x432,'S^s*'),'lnmVK':lIl1li(0x39c,'zfbI'),'YqSaY':function(lil1i,liiiil){return lil1i+liiiil;},'JqIvv':lIl1li(0x1f5,'hCz2'),'QkcpP':function(IIIIli,lllIi){return IIIIli<lllIi;},'LHzUy':function(lil1l,lllIl){return lil1l===lllIl;},'tuHki':lIl1li(0x1cf,'$GRf'),'rkTHA':lIl1li(0x243,'vuSy'),'wsgaw':function(Iliii,illlii){return Iliii*illlii;},'oSdLt':function(I1lIIi){return I1lIIi();}};if(!Iillll){if(IlI1li['lCwwf'](IlI1li[lIl1li(0x31b,')vE2')],lIl1li(0x1fa,'S^s*'))){console[lIl1li(0x2b8,'I$Nn')](lIl1li(0x3a9,'!2dz'));return;}else IIIIII='❌\x20'+lillII+lIl1li(0x20b,'n!dG')+ii1ilI['message'],lI1ll1[lIl1li(0x299,'gVe4')](lIl1li(0x3b9,'p&#o')+iIiI1+'\x20=>\x20'+IlI1li['jibZt'](liil1I,i11ii1)),IlIliI++;}const IlI1ll=iiIiIi[lIl1li(0x37d,'i%!T')](Iillll);if(!IlI1ll){if(IlI1li[lIl1li(0x2e7,'vfS&')]!==IlI1li[lIl1li(0x335,'xqeS')])return IlI1li['EuMBL'](I1i11l['num'],llIlii[lIl1li(0x3e7,'eW@N')]);else{console['log'](IlI1li['hZjYH']);return;}}$['activityUrl']=Iillll,$[lIl1li(0x2c4,'B6dA')]=iiIiIi['getUrlParameter'](Iillll,lIl1li(0x219,'X5hx')),$[lIl1li(0x3d1,'kSG[')]=iiIiIi[lIl1li(0x2d8,'t!yG')](Iillll,lIl1li(0x36f,'jQFG')),$[lIl1li(0x3a1,'igaX')]=IlI1ll[lIl1li(0x341,')vE2')],$[lIl1li(0x455,'CGf3')]=IlI1ll[lIl1li(0x455,'CGf3')];let ll11l='';if($[lIl1li(0x430,'26#Q')]){if($[lIl1li(0x439,'&4^g')][lIl1li(0x48f,'L00X')](IlI1li[lIl1li(0x300,'zfbI')]))ll11l=IlI1li[lIl1li(0x44d,'&4^g')];else $['hostname']['includes'](IlI1li[lIl1li(0x1ba,'Lyte')])&&(IlI1li[lIl1li(0x213,'cVbd')](IlI1li[lIl1li(0x1df,'jQFG')],IlI1li[lIl1li(0x3
2023-10-16 10:51:57 +08:00
// 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"])