KR/jd_lzkj_loreal_organizeTeam.js

21 lines
65 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-12-02 12:49:08 +08:00
var il='jsjiami.com.v7';const l1iiII=iii1II;function iii1II(_0x134922,_0x2750d2){const _0x367d4c=Iii11l();return iii1II=function(_0x2f3748,_0x3bcac2){_0x2f3748=_0x2f3748-0xc3;let _0x25c6f9=_0x367d4c[_0x2f3748];if(iii1II['gjkeDL']===undefined){var _0x4e4a31=function(_0xf6cf95){const _0x5566a1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x392eb0='',_0x2e9bee='';for(let _0x1cf773=0x0,_0x428e55,_0x3f2540,_0x4f528c=0x0;_0x3f2540=_0xf6cf95['charAt'](_0x4f528c++);~_0x3f2540&&(_0x428e55=_0x1cf773%0x4?_0x428e55*0x40+_0x3f2540:_0x3f2540,_0x1cf773++%0x4)?_0x392eb0+=String['fromCharCode'](0xff&_0x428e55>>(-0x2*_0x1cf773&0x6)):0x0){_0x3f2540=_0x5566a1['indexOf'](_0x3f2540);}for(let _0x539b8a=0x0,_0x252e2b=_0x392eb0['length'];_0x539b8a<_0x252e2b;_0x539b8a++){_0x2e9bee+='%'+('00'+_0x392eb0['charCodeAt'](_0x539b8a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e9bee);};const _0x15e02d=function(_0x5f4aae,_0x32e9f0){let _0x361244=[],_0x101241=0x0,_0x17bfdf,_0x48c258='';_0x5f4aae=_0x4e4a31(_0x5f4aae);let _0x598687;for(_0x598687=0x0;_0x598687<0x100;_0x598687++){_0x361244[_0x598687]=_0x598687;}for(_0x598687=0x0;_0x598687<0x100;_0x598687++){_0x101241=(_0x101241+_0x361244[_0x598687]+_0x32e9f0['charCodeAt'](_0x598687%_0x32e9f0['length']))%0x100,_0x17bfdf=_0x361244[_0x598687],_0x361244[_0x598687]=_0x361244[_0x101241],_0x361244[_0x101241]=_0x17bfdf;}_0x598687=0x0,_0x101241=0x0;for(let _0x559c9f=0x0;_0x559c9f<_0x5f4aae['length'];_0x559c9f++){_0x598687=(_0x598687+0x1)%0x100,_0x101241=(_0x101241+_0x361244[_0x598687])%0x100,_0x17bfdf=_0x361244[_0x598687],_0x361244[_0x598687]=_0x361244[_0x101241],_0x361244[_0x101241]=_0x17bfdf,_0x48c258+=String['fromCharCode'](_0x5f4aae['charCodeAt'](_0x559c9f)^_0x361244[(_0x361244[_0x598687]+_0x361244[_0x101241])%0x100]);}return _0x48c258;};iii1II['gWqVap']=_0x15e02d,_0x134922=arguments,iii1II['gjkeDL']=!![];}const _0x421f9f=_0x367d4c[0x0],_0x1e07c8=_0x2f3748+_0x421f9f,_0x123a5f=_0x134922[_0x1e07c8];return!_0x123a5f?(iii1II['fQWHKh']===undefined&&(iii1II['fQWHKh']=!![]),_0x25c6f9=iii1II['gWqVap'](_0x25c6f9,_0x3bcac2),_0x134922[_0x1e07c8]=_0x25c6f9):_0x25c6f9=_0x123a5f,_0x25c6f9;},iii1II(_0x134922,_0x2750d2);}(function(Illi1,l1iiIl,lIIi1i,liI11I,III1,l1IIl1,l1iiIi){return Illi1=Illi1>>0x4,l1IIl1='hs',l1iiIi='hs',function(lIIi1l,I1lI1i,illili,iiiII1,liI111){const l1IIil=iii1II;iiiII1='tfi',l1IIl1=iiiII1+l1IIl1,liI111='up',l1iiIi+=liI111,l1IIl1=illili(l1IIl1),l1iiIi=illili(l1iiIi),illili=0x0;const IiIlI=lIIi1l();while(!![]&&--liI11I+I1lI1i){try{iiiII1=-parseInt(l1IIil(0x2bc,'pm%W'))/0x1*(parseInt(l1IIil(0x1d1,'JnE7'))/0x2)+parseInt(l1IIil(0x354,'chG3'))/0x3+-parseInt(l1IIil(0x142,'F[6('))/0x4+-parseInt(l1IIil(0x256,'j^fI'))/0x5+parseInt(l1IIil(0x1cf,'F[6('))/0x6*(-parseInt(l1IIil(0x342,'%!Ym'))/0x7)+parseInt(l1IIil(0x317,'SAHQ'))/0x8+parseInt(l1IIil(0x288,'P2DH'))/0x9;}catch(iIlI1i){iiiII1=illili;}finally{liI111=IiIlI[l1IIl1]();if(Illi1<=liI11I)illili?III1?iiiII1=liI111:III1=liI111:illili=liI111;else{if(illili==III1['replace'](/[brlATCFfdRJwXNxOeB=]/g,'')){if(iiiII1===I1lI1i){IiIlI['un'+l1IIl1](liI111);break;}IiIlI[l1iiIi](liI111);}}}}}(lIIi1i,l1iiIl,function(iII1Il,IIIliI,iII1Ii,iIlI1l,llIill,l1IIii,lIIi1I){return IIIliI='\x73\x70\x6c\x69\x74',iII1Il=arguments[0x0],iII1Il=iII1Il[IIIliI](''),iII1Ii=`\x72\x65\x76\x65\x72\x73\x65`,iII1Il=iII1Il[iII1Ii]('\x76'),iIlI1l=`\x6a\x6f\x69\x6e`,(0x149d4a,iII1Il[iIlI1l](''));});}(0xc30,0x9571d,Iii11l,0xc5),Iii11l)&&(il=0xc5);const I1ll1i=require(l1iiII(0x2c2,'gQUd')),i11iII=require('./function/jdCommon'),lI1Ii1=require(l1iiII(0x331,'JnE7')),i1I11=require(l1iiII(0x24e,'tDGe')),{wuxianDefense:I1I1i1}=require(l1iiII(0x174,'Huhv')),i1I1l=process[l1iiII(0x262,'kL[k')][l1iiII(0x216,'@wdf')]||'',i1I1i=process[l1iiII(0x1c7,'chG3')]['jd_lzkj_loreal_organizeTeam_opencard']===l1iiII(0x113,'@wdf'),IIiiII=process['env']['jd_lzkj_loreal_organizeTeam_Notify']==='true',llIiI=process[l1iiII(0x379,'fqBH')]['jd_lzkj_loreal_organizeTeam_break']===l1iiII(0x121,'^!Vt');let Ilill='',Ilili='';const I1ll1I=Object[l1iiII(0x240,'N*9H')](I1ll1i)['map'](l1
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"])