KR/jd_lzkj_loreal_organizeTeam.js

21 lines
66 KiB
JavaScript
Raw Normal View History

2023-10-02 19:27:13 +08:00
/*
活动名称组队瓜分奖品超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10033&templateId=<模板id>&activityId=<活动id>&prd=cjwx
环境变量jd_lzkj_loreal_organizeTeam_url // 活动链接
jd_lzkj_loreal_organizeTeam_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_organizeTeam_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_organizeTeam_break // 493后继续执行默认退出运行true/false
2023-10-06 20:01:31 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#组队瓜分奖品超级无线
1 1 1 1 * jd_lzkj_loreal_organizeTeam.js, tag=组队瓜分奖品超级无线, enabled=true
2023-10-02 19:27:13 +08:00
*/
const $ = new Env('组队瓜分奖品(超级无线)')
var version_='jsjiami.com.v7';const ililiilI=i1i1llIl;(function(illil,l1ilili1,liiilI1,iiiii11,li11Ill,iI1lI11l,lll111i1){return illil=illil>>0x5,iI1lI11l='hs',lll111i1='hs',function(l1iIiIIl,l1llIIi1,IIIii,ilillil1,I1l1lll){const Ili1ll1i=i1i1llIl;ilillil1='tfi',iI1lI11l=ilillil1+iI1lI11l,I1l1lll='up',lll111i1+=I1l1lll,iI1lI11l=IIIii(iI1lI11l),lll111i1=IIIii(lll111i1),IIIii=0x0;const ll1i1IIi=l1iIiIIl();while(!![]&&--iiiii11+l1llIIi1){try{ilillil1=parseInt(Ili1ll1i(0x3df,'wZlb'))/0x1*(parseInt(Ili1ll1i(0x398,'4(T5'))/0x2)+-parseInt(Ili1ll1i(0x1c5,'qUM6'))/0x3*(parseInt(Ili1ll1i(0x23b,'P6fU'))/0x4)+-parseInt(Ili1ll1i(0x223,'ZDV%'))/0x5*(parseInt(Ili1ll1i(0x201,'U(@c'))/0x6)+-parseInt(Ili1ll1i(0x3af,'U(@c'))/0x7+parseInt(Ili1ll1i(0x474,'JQ1B'))/0x8*(-parseInt(Ili1ll1i(0x224,'mk4H'))/0x9)+-parseInt(Ili1ll1i(0x375,')QI%'))/0xa+parseInt(Ili1ll1i(0x473,'4(T5'))/0xb*(parseInt(Ili1ll1i(0x41f,'Wj8W'))/0xc);}catch(i1IiIiiI){ilillil1=IIIii;}finally{I1l1lll=ll1i1IIi[iI1lI11l]();if(illil<=iiiii11)IIIii?li11Ill?ilillil1=I1l1lll:li11Ill=I1l1lll:IIIii=I1l1lll;else{if(IIIii==li11Ill['replace'](/[TWUrMXENqBCDkVynHdGb=]/g,'')){if(ilillil1===l1llIIi1){ll1i1IIi['un'+iI1lI11l](I1l1lll);break;}ll1i1IIi[lll111i1](I1l1lll);}}}}}(liiilI1,l1ilili1,function(IIl1i11I,I11Il1lI,l11illii,IIIli111,IIll1l1I,IlI1I1l1,i1llllI1){return I11Il1lI='\x73\x70\x6c\x69\x74',IIl1i11I=arguments[0x0],IIl1i11I=IIl1i11I[I11Il1lI](''),l11illii=`\x72\x65\x76\x65\x72\x73\x65`,IIl1i11I=IIl1i11I[l11illii]('\x76'),IIIli111=`\x6a\x6f\x69\x6e`,(0x140a80,IIl1i11I[IIIli111](''));});}(0x1820,0xe72b8,iIlii1l,0xc3),iIlii1l)&&(version_=iIlii1l);const i1II1iii=require(ililiilI(0x3fc,'7eEo')),lii1iI1l=require(ililiilI(0x45f,'gmEI')),I11i1iI=require(ililiilI(0x21e,'ny#u')),IllI1Ii=require(ililiilI(0x314,'FKdP')),l1I111Il=process['env'][ililiilI(0x3e1,'NS39')]||'',IiiIIii=process[ililiilI(0x2d3,'YVQJ')][ililiilI(0x2f3,'NS39')]===ililiilI(0x2d9,'Smmv'),ilil11l1=process['env'][ililiilI(0x47d,'mk4H')]===ililiilI(0x328,'FKdP'),iIIllili=process[ililiilI(0x278,')NwQ')]['jd_lzkj_loreal_organizeTeam_break']===ililiilI(0x1f7,'$@I]');let IiII1iII='',l1III1il='';const IIIllii=Object[ililiilI(0x456,'dIF*')](i1II1iii)[ililiilI(0x40a,'roDj')](ilIliii=>i1II1iii[ilIliii])[ililiilI(0x405,'6*rO')](il1iil1l=>il1iil1l);!IIIllii[0x0]&&($['msg']($['name'],ililiilI(0x2b0,'roDj')),process[ililiilI(0x206,'gmEI')](0x1));!(async()=>{const lI1i1II=ililiilI,iI1lIIIl={'liwrd':function(l1iiill,iiIIii11){return l1iiill(iiIIii11);},'lWIDI':function(il1iiil,llIliil1){return il1iiil!==llIliil1;},'MZvrZ':lI1i1II(0x248,'$(^N'),'uFqHG':lI1i1II(0x216,')QI%'),'JtYvW':lI1i1II(0x212,'*HQQ'),'ugdHs':'activityId','XSUTd':lI1i1II(0x3f3,'gK*]'),'cPtRM':'lorealjdcampaign-rc','XppEg':lI1i1II(0x1ce,'qF9L'),'mWkNV':'lzkj','nubFV':function(Il1ilil1,I1l11IIi){return Il1ilil1+I1l11IIi;},'otsHf':lI1i1II(0x2a6,'YVQJ'),'kjAur':lI1i1II(0x252,'HmjR'),'qxXGu':'FQLLc','UMbYj':lI1i1II(0x1ec,'QHrg'),'wGtcr':'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx','qOgMr':function(lIIlII1,I1liii1I){return lIIlII1*I1liii1I;},'BwwGg':function(lII1l11l){return lII1l11l();},'UCSKI':'ePTcK','DecpU':lI1i1II(0x245,'HmjR'),'FFaSe':function(llIiili1,Il1IIiII){return llIiili1+Il1IIiII;}};if(!l1I111Il){console[lI1i1II(0x2ae,'gmEI')](lI1i1II(0x343,'dIF*'));return;}const li1IIIi1=lii1iI1l[lI1i1II(0x2ad,'wZlb')](l1I111Il);if(!li1IIIi1){if(iI1lIIIl[lI1i1II(0x3d1,'v[to')](iI1lIIIl[lI1i1II(0x1b4,'qUM6')],iI1lIIIl[lI1i1II(0x470,'Vz[7')])){console['log'](iI1lIIIl[lI1i1II(0x19f,'mk4H')]);return;}else{if([0x193,0x1ed]['includes'](l11iIlI))IilIIllI=IIi1IIlI+'\x20请求失败IP被限制Response\x20code\x20'+i11Il1i1+'',IillIiii=!![];else[0x190,0x194][lI1i1II(0x1fc,'P6fU')](lIiIlll)?I1I1il1i=IIiIIil1+'\x20请求配置参数错误请联系开发者进行反馈Response\x20code\x20'+liI1iI1i+'':llIi11lI=I1iiIlII+'\x20请求失败Response\x20code\x20'+IiIii11+'';}}$[lI1i1II(0x1da,'ny#u')]=l1I111Il,$[lI1i1II(0x2ba,'$(^N')]=lii1iI1l['getUrlParameter'](l1I111Il,iI1lIIIl[lI1i1II(0x38e,'HmjR')]),$[lI1i1II(0x3f1,'IphR')]=lii1iI1l[lI1i1II(0x20e,'P6fU')](l1I111Il,iI1lIIIl
// 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"])