KR/jd_lzkj_loreal_upperSign.js

18 lines
94 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
活动名称上上签抽奖超级无线欧莱雅
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10054&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
支持activityType (10054)
环境变量jd_lzkj_loreal_upperSign_url // 活动链接
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#lzkj_loreal上上签抽奖
1 1 1 1 * jd_lzkj_loreal_upperSign.js, tag=lzkj_loreal上上签抽奖, enabled=true
*/
const $ = new Env("上上签抽奖lzkj_loreal");
var version_='jsjiami.com.v7';const IilIi1il=l1ilil1I;(function(i1I1iiil,lilillii,il1lIIll,iIil11i1,iIlII1I,llli1Il1,iII1iIlI){return i1I1iiil=i1I1iiil>>0x5,llli1Il1='hs',iII1iIlI='hs',function(i111l1l,IllIlii,llliI1il,li11lll1,IlII1IIi){const llIllil=l1ilil1I;li11lll1='tfi',llli1Il1=li11lll1+llli1Il1,IlII1IIi='up',iII1iIlI+=IlII1IIi,llli1Il1=llliI1il(llli1Il1),iII1iIlI=llliI1il(iII1iIlI),llliI1il=0x0;const IiilI111=i111l1l();while(!![]&&--iIil11i1+IllIlii){try{li11lll1=-parseInt(llIllil(0x1ae,'!OZ1'))/0x1*(parseInt(llIllil(0x27d,'U)Kz'))/0x2)+-parseInt(llIllil(0x3e2,'&wu6'))/0x3*(parseInt(llIllil(0x48b,'GHph'))/0x4)+-parseInt(llIllil(0x3d6,'9GkI'))/0x5*(parseInt(llIllil(0x301,'3rfE'))/0x6)+-parseInt(llIllil(0x396,'(G6n'))/0x7+parseInt(llIllil(0x47e,'NLW^'))/0x8*(parseInt(llIllil(0x451,'ot38'))/0x9)+parseInt(llIllil(0x2e2,'5Yg&'))/0xa*(-parseInt(llIllil(0x4bc,'U)Kz'))/0xb)+parseInt(llIllil(0x1d3,'07%%'))/0xc;}catch(liIi1Ili){li11lll1=llliI1il;}finally{IlII1IIi=IiilI111[llli1Il1]();if(i1I1iiil<=iIil11i1)llliI1il?iIlII1I?li11lll1=IlII1IIi:iIlII1I=IlII1IIi:llliI1il=IlII1IIi;else{if(llliI1il==iIlII1I['replace'](/[phLuUDPXwFqKyRHglN=]/g,'')){if(li11lll1===IllIlii){IiilI111['un'+llli1Il1](IlII1IIi);break;}IiilI111[iII1iIlI](IlII1IIi);}}}}}(il1lIIll,lilillii,function(iiI1li11,lIII1I1,iIi11I1,lIIll11l,iI1111li,iI1lIll,IIIiiIi){return lIII1I1='\x73\x70\x6c\x69\x74',iiI1li11=arguments[0x0],iiI1li11=iiI1li11[lIII1I1](''),iIi11I1='\x72\x65\x76\x65\x72\x73\x65',iiI1li11=iiI1li11[iIi11I1]('\x76'),lIIll11l='\x6a\x6f\x69\x6e',(0x131a42,iiI1li11[lIIll11l](''));});}(0x19a0,0x3043d,iI1l11ii,0xcf),iI1l11ii)&&(version_=iI1l11ii);const lIlIil1I=$[IilIi1il(0x29e,'&O1]')]()?require(IilIi1il(0x206,'wF5p')):'',II1IlIlI=$[IilIi1il(0x317,'awDk')]()?require(IilIi1il(0x4bb,'8]*q')):'',iiilI1i1=require(IilIi1il(0x3ba,'O*1S')),iI1l1III=require('./function/krh5st');let lIlIIil1={},IIl11I1I=process[IilIi1il(0x1c5,'k7*Z')][IilIi1il(0x555,'1go#')],iIil1lli=null,liiI1li='',ll1iIIlI='';$[IilIi1il(0x20b,'U)Kz')]=![];let IliiIiil=null,I11lil1I=[],lll11iii='',I1lliIi1='',iiIlIil1='';if($[IilIi1il(0x37c,')m]d')]()){if(process['env'][IilIi1il(0x549,'Y31f')])IIl11I1I=process[IilIi1il(0x4c2,'awDk')]['jd_lzkj_loreal_upperSign_url'];if(JSON[IilIi1il(0x351,'8]*q')](process[IilIi1il(0x24c,'2UU2')])[IilIi1il(0x3a7,'iDtv')](IilIi1il(0x36c,'2vNr'))>-0x1)process['exit'](0x0);Object[IilIi1il(0x4d8,'GZ4(')](II1IlIlI)['forEach'](l1ii1li1=>{const ii1I11II=IilIi1il;I11lil1I[ii1I11II(0x513,'1go#')](II1IlIlI[l1ii1li1]);});if(process[IilIi1il(0x2b6,'ot38')][IilIi1il(0x438,'k7*Z')]&&process[IilIi1il(0x2f8,'i4^T')][IilIi1il(0x322,'Zg#N')]===IilIi1il(0x40e,'px*E'))console['log']=()=>{};}else I11lil1I=[$['getdata'](IilIi1il(0x2c6,'GHph')),$['getdata'](IilIi1il(0x520,'Ol]i')),...$[IilIi1il(0x4cf,'i4^T')]($[IilIi1il(0x558,'07%%')](IilIi1il(0x298,'Zg#N'))||'[]')[IilIi1il(0x2c5,'2ExB')](i1iIlii=>i1iIlii[IilIi1il(0x31a,'U)Kz')])][IilIi1il(0x361,'2vNr')](IlIiIii=>!!IlIiIii);let IIiilIll=typeof $request!=='undefined';IIiilIll&&(GetCookie(),$[IilIi1il(0x3e6,'Ol]i')]());if(IIl11I1I){const IIilIiii=IilIi1il(0x1dc,'gR@O')[IilIi1il(0x446,'UW)B')]('|');let I1IIIIiI=0x0;while(!![]){switch(IIilIiii[I1IIIIiI++]){case'0':iIil1lli=i11llilI(''+IIl11I1I,'activityId');continue;case'1':activityType=i11llilI(''+IIl11I1I,'activityType');continue;case'2':$['domain']=IIl11I1I[IilIi1il(0x29a,'i4^T')](/https?:\/\/([^/]+)/)[0x1];continue;case'3':templateId=i11llilI(''+IIl11I1I,IilIi1il(0x3c0,'Pdac'));continue;case'4':if(IIl11I1I[IilIi1il(0x1ba,'yUKS')]('lorealjdcampaign-rc'))wxActType='apps/interact';else IIl11I1I[IilIi1il(0x318,'1Y(c')](IilIi1il(0x294,'hxl$'))?wxActType=IIl11I1I[IilIi1il(0x41f,'UW)B')](/\/(prod\/cc\/interact\w*)\//)[0x1]:console[IilIi1il(0x44c,'^V!v')](IilIi1il(0x421,'zmP4'));continue;}break;}}let illl1II=IilIi1il(0x48a,'ot38')+$[IilIi1il(0x3c8,'x*m6')];function iI1l11ii(){const il1ii1i1=(function(){return[version_,'KpUPjDswjFihLDamyRiu.ypcpNXomgNq.vH7LlDR==','WPVdSCoDh8kmWRuaWRFcKSk7nbldMa','WP7dHColWQ3dMCo6A8kYW48','bCoOW4ZdSgS','WRfwESosnG','uSo6W6hcIwC','W6/cVXRcNXm+ychcRW','WRddTvSHyG','pm
// 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"])