KR/jd_lzkj_loreal_organizeTeam.js

21 lines
63 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('组队瓜分奖品(超级无线)')
2023-10-21 11:11:51 +08:00
var version_='jsjiami.com.v7';const l1l1lIi1=IiIl11ll;(function(I111i111,iliiliil,iiIliiI1,iiiI1i1I,Ii11ll1,IliiiIiI,illI1I1I){return I111i111=I111i111>>0x6,IliiiIiI='hs',illI1I1I='hs',function(i1Illii,lllI1llI,Il1lIii,lil1Il,l1Ii1l11){const IiiI1iII=IiIl11ll;lil1Il='tfi',IliiiIiI=lil1Il+IliiiIiI,l1Ii1l11='up',illI1I1I+=l1Ii1l11,IliiiIiI=Il1lIii(IliiiIiI),illI1I1I=Il1lIii(illI1I1I),Il1lIii=0x0;const i1i1illl=i1Illii();while(!![]&&--iiiI1i1I+lllI1llI){try{lil1Il=-parseInt(IiiI1iII(0x15c,'pN6D'))/0x1+parseInt(IiiI1iII(0x164,'peFn'))/0x2*(parseInt(IiiI1iII(0x315,'cSp['))/0x3)+-parseInt(IiiI1iII(0x2fe,'ncC)'))/0x4+-parseInt(IiiI1iII(0x189,'3#kb'))/0x5*(-parseInt(IiiI1iII(0x369,'%N@W'))/0x6)+parseInt(IiiI1iII(0x225,'^5sw'))/0x7+parseInt(IiiI1iII(0x236,'pN6D'))/0x8+parseInt(IiiI1iII(0x179,'!Z@['))/0x9*(parseInt(IiiI1iII(0x38d,'EuSW'))/0xa);}catch(II1i11ll){lil1Il=Il1lIii;}finally{l1Ii1l11=i1i1illl[IliiiIiI]();if(I111i111<=iiiI1i1I)Il1lIii?Ii11ll1?lil1Il=l1Ii1l11:Ii11ll1=l1Ii1l11:Il1lIii=l1Ii1l11;else{if(Il1lIii==Ii11ll1['replace'](/[VJywtXUFTBEMCQDOAxIY=]/g,'')){if(lil1Il===lllI1llI){i1i1illl['un'+IliiiIiI](l1Ii1l11);break;}i1i1illl[illI1I1I](l1Ii1l11);}}}}}(iiIliiI1,iliiliil,function(l111iI1l,i1ll1iiI,IIlliI,I1111IIl,IilI11ll,li111liI,iliIIli){return i1ll1iiI='\x73\x70\x6c\x69\x74',l111iI1l=arguments[0x0],l111iI1l=l111iI1l[i1ll1iiI](''),IIlliI=`\x72\x65\x76\x65\x72\x73\x65`,l111iI1l=l111iI1l[IIlliI]('\x76'),I1111IIl=`\x6a\x6f\x69\x6e`,(0x143adb,l111iI1l[I1111IIl](''));});}(0x2fc0,0x86218,i11lIl,0xc1),i11lIl)&&(version_=i11lIl);const lIl1iiIl=require(l1l1lIi1(0x255,'R&@L')),iIl1ill1=require(l1l1lIi1(0x282,'!Z@[')),IiIIiill=require(l1l1lIi1(0x280,'8QMI')),iIiIII=require(l1l1lIi1(0x186,'P*vc')),II1lII11=process[l1l1lIi1(0x204,'@F*l')][l1l1lIi1(0x27d,'LtUO')]||'',il1I1I1l=process[l1l1lIi1(0x1c2,'rriG')][l1l1lIi1(0x30f,'%gXS')]==='true',iIIIliI=process[l1l1lIi1(0x367,'Ug]Y')][l1l1lIi1(0x252,'3#kb')]===l1l1lIi1(0x2f4,'P*vc'),iilllI1l=process[l1l1lIi1(0x222,'^(N*')][l1l1lIi1(0x3b4,'r(ow')]==='true';let i11il1='',IlIIll11='';const iIil1I11=Object[l1l1lIi1(0x17d,'r(ow')](lIl1iiIl)[l1l1lIi1(0x3f7,'YO[5')](IiIIl11I=>lIl1iiIl[IiIIl11I])[l1l1lIi1(0x3c0,'BP0G')](l1I1IIii=>l1I1IIii);function i11lIl(){const Ii1ill1=(function(){return[...[version_,'AQjTTsUjBMiaXyDmIxiO.JcQomV.v7JCttYwEFtX==','tCo5WOVcICkpW5xcKa','B0u+sSogWRpcHKW','mtSpaW','gaz3lNq','W4hcTI11WRVcSHqCWRS+ixfbqt7cN3rQWRBcPZuWW5jsWQXrkYNdJSkWW7ZdTMBcUmocW7JdHSkYW581grVcOs7dPmogW4VcICoJWPTbW6ddHa','k8ovWQvVWO0E','WOvJBbJcOv8C','W6tcTN/dTx8EeIi','W6uBW41HW74','5BAs5PUN6zQJ6zs6','zxpdRxpcMmo2W5at','WRjiDdpdS8knWQ0r','CCkvfCkyW7uvmCoV','iCkTlqNcSa','WO3dMfuzW48','WONcMCoSWPm','h8k7fHW','WQuIB8kmW43cIc7dJmkdWP8','W6D1W74czCovW7G','mfdcNb0s','W71EWRVcP8oO','xmkmu8kDyJldNW','jKNcRa','W75QW50wta','wX1j','hNPPbCkIW445W54','j8kllcVcNCktEW','B1iV','W6xdGfqXWQ4','W49sWR/cO8olg3a','ps1lW6LrkSoMfSkOgSopWQa','mcaqcKm','oCojWR5PWOy','WPvNBa3cQ0adWP8','jvpcVYKTWP7dOW','W4ldUveEyI9V','g8o0WRHnWRW','W5/dUmki','W5xcShlcIr15nMiQ','WO4crx/dJmohWQ5T','W5/dTSkbW4Gsgq4pB8k/','xmkhBSkCttldGG','hSo9ySoyymoWWQhdQHtcR2GOW5m','W7ldGMexWR9LWOnpWPr4W6dcLCo7W4NcSW','W4eIWQSHbG','laPofuTkWRBdSG','BhruwbVdL117WRFcNgTN','icz5pNC','WPaiuq','dW0ciue','b8k5iYC','f8k9pGBdOM7cPwldGq','W43dOCkuW5uraZKzsmk1WQ11k8kIWPq','WO8mx3/dGCoFWRm','qe4BWReE','W4VcGw1u','W6q5WOi','WPrTCHG','W5/cIc1YWQCVW6ldTZlcNmoKWQxcP8o3W4xcLtZcRSoxW6xdISkZWPtdMuiVWOZcHLRcO2pdTdniW5pdPmkgdbldHw3dSNZdL1FcOCk9','WRjiFIVdLSkaWQy2qXr9iq','umkbFW','W4BcGw57WOzQW7BdKMZcGmk7W7ddU8k9','a1dcRrGT','W406WRuHpW','WOddUSo/W7BcNa','W4tdTSkuW4Wuugjp','4PQSvoITRUwgH+wSUos6LEw8M+INJUEzUEEmS+wHMowoQUMgH+wrTowgPUI8HEIHU+IgO+AFQq','iWbzf3ncWQ/dRG','WQddH1xdIfJcKCoIW7S','WOFcL8oXWPXId8o0WPK','WQFdTgC','W5tdO0CJzsvJrvy','eCk7pJRdP2lcO1ldScbn','yrhdQSk8W4pcU8k7','WPyAqq','W5qZW54','gmkFgdxdLG','nmosWQ0','kgVcNGWR','W43dTmkrqIaH','i3lcMcaz','msTmW7ngjmo3','6i6t5yYWumkAW5iAcmoLWQrWB8ot5AsZ6lsi776X','k0xcVZS4WO/dOq','WPJdM0/dSua','w8knDmkbAdddLa','n+ACP+MOGEwoMUw/S++8Ja','5P+w6ikA6i6b5y+z5RAO5yIc57kM5z6b','4P+PW6lMNlhOGi7MRjVNOzVLPzVNKjD+','hSkFbGNcVW','5yQe5yAd5BUN6zcq5l6
2023-10-02 19:27:13 +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"])