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('组队瓜分奖品(超级无线)')
2023-10-07 18:48:42 +08:00
var version_='jsjiami.com.v7';const l1I11Ii=IIIlIiIl;(function(l11iII1,lIII1li1,li1i11,lI11i1i1,ilIll,Ili1IlIl,Iiil1ll1){return l11iII1=l11iII1>>0x7,Ili1IlIl='hs',Iiil1ll1='hs',function(l1i1I11,iiilll1l,IIiiliI,ll1illi1,i1IlII1I){const I1IIIi1=IIIlIiIl;ll1illi1='tfi',Ili1IlIl=ll1illi1+Ili1IlIl,i1IlII1I='up',Iiil1ll1+=i1IlII1I,Ili1IlIl=IIiiliI(Ili1IlIl),Iiil1ll1=IIiiliI(Iiil1ll1),IIiiliI=0x0;const iIilIllI=l1i1I11();while(!![]&&--lI11i1i1+iiilll1l){try{ll1illi1=-parseInt(I1IIIi1(0x95,'LDZq'))/0x1+parseInt(I1IIIi1(0xbf,'PeK('))/0x2*(parseInt(I1IIIi1(0x28c,'Ca4R'))/0x3)+parseInt(I1IIIi1(0x1b8,'Hr2n'))/0x4+-parseInt(I1IIIi1(0x121,'n6cH'))/0x5+parseInt(I1IIIi1(0xa1,'OFXk'))/0x6*(-parseInt(I1IIIi1(0x24e,'r*6R'))/0x7)+-parseInt(I1IIIi1(0xdf,'r*6R'))/0x8*(-parseInt(I1IIIi1(0x2b7,'dp@1'))/0x9)+parseInt(I1IIIi1(0x139,'Y8)d'))/0xa;}catch(iliili1){ll1illi1=IIiiliI;}finally{i1IlII1I=iIilIllI[Ili1IlIl]();if(l11iII1<=lI11i1i1)IIiiliI?ilIll?ll1illi1=i1IlII1I:ilIll=i1IlII1I:IIiiliI=i1IlII1I;else{if(IIiiliI==ilIll['replace'](/[GbldruECXABqHeSQV=]/g,'')){if(ll1illi1===iiilll1l){iIilIllI['un'+Ili1IlIl](i1IlII1I);break;}iIilIllI[Iiil1ll1](i1IlII1I);}}}}}(li1i11,lIII1li1,function(IIiili1,I1ll1ill,ili1il1,I1i11Il1,liIliii,iliillI1,li11IllI){return I1ll1ill='\x73\x70\x6c\x69\x74',IIiili1=arguments[0x0],IIiili1=IIiili1[I1ll1ill](''),ili1il1=`\x72\x65\x76\x65\x72\x73\x65`,IIiili1=IIiili1[ili1il1]('\x76'),I1i11Il1=`\x6a\x6f\x69\x6e`,(0x14128c,IIiili1[I1i11Il1](''));});}(0x6580,0x4eeb3,liIl1ili,0xcd),liIl1ili)&&(version_=liIl1ili);const IIill1l=require(l1I11Ii(0x275,'o)cz')),IIIIil1l=require('./function/jdCommon'),II1ii1il=require(l1I11Ii(0x251,'n6cH')),lil1iII1=require('./function/krgetToken'),iI1Il11I=process[l1I11Ii(0x22d,'@oj5')][l1I11Ii(0x338,'r*6R')]||'',iiIiiIii=process['env'][l1I11Ii(0x1c4,'[448')]==='true',IIIIII1=process['env']['jd_lzkj_loreal_organizeTeam_Notify']==='true',iI1ili1l=process['env'][l1I11Ii(0x1b3,'Hr2n')]===l1I11Ii(0x1e8,'Y8)d');let I1Iilili='',iiliIII='';const IIl1l11i=Object[l1I11Ii(0x21b,'dpaj')](IIill1l)[l1I11Ii(0x17e,'[448')](I1l1I1Ii=>IIill1l[I1l1I1Ii])[l1I11Ii(0x356,'oR6*')](i1ililiI=>i1ililiI);!IIl1l11i[0x0]&&($[l1I11Ii(0x7a,'Y8)d')]($['name'],'【提示】请先获取Cookie'),process[l1I11Ii(0x287,'LDZq')](0x1));function IIIlIiIl(_0x8fe4dc,_0x3cf340){const _0x9f1e6f=liIl1ili();return IIIlIiIl=function(_0x439ec6,_0x3ee08e){_0x439ec6=_0x439ec6-0x7a;let _0x3729e9=_0x9f1e6f[_0x439ec6];if(IIIlIiIl['lOtdQU']===undefined){var _0xc295b9=function(_0x17a355){const _0x18b9aa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xdce40a='',_0x3964df='';for(let _0x402c24=0x0,_0x4e3539,_0x3fbdf1,_0x1f9d58=0x0;_0x3fbdf1=_0x17a355['charAt'](_0x1f9d58++);~_0x3fbdf1&&(_0x4e3539=_0x402c24%0x4?_0x4e3539*0x40+_0x3fbdf1:_0x3fbdf1,_0x402c24++%0x4)?_0xdce40a+=String['fromCharCode'](0xff&_0x4e3539>>(-0x2*_0x402c24&0x6)):0x0){_0x3fbdf1=_0x18b9aa['indexOf'](_0x3fbdf1);}for(let _0x5f35e7=0x0,_0x504d2f=_0xdce40a['length'];_0x5f35e7<_0x504d2f;_0x5f35e7++){_0x3964df+='%'+('00'+_0xdce40a['charCodeAt'](_0x5f35e7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3964df);};const _0x480ce7=function(_0x4f93e1,_0x43b5ab){let _0x16bec3=[],_0x513079=0x0,_0xb0e7e3,_0x9cc539='';_0x4f93e1=_0xc295b9(_0x4f93e1);let _0x345072;for(_0x345072=0x0;_0x345072<0x100;_0x345072++){_0x16bec3[_0x345072]=_0x345072;}for(_0x345072=0x0;_0x345072<0x100;_0x345072++){_0x513079=(_0x513079+_0x16bec3[_0x345072]+_0x43b5ab['charCodeAt'](_0x345072%_0x43b5ab['length']))%0x100,_0xb0e7e3=_0x16bec3[_0x345072],_0x16bec3[_0x345072]=_0x16bec3[_0x513079],_0x16bec3[_0x513079]=_0xb0e7e3;}_0x345072=0x0,_0x513079=0x0;for(let _0x1707e7=0x0;_0x1707e7<_0x4f93e1['length'];_0x1707e7++){_0x345072=(_0x345072+0x1)%0x100,_0x513079=(_0x513079+_0x16bec3[_0x345072])%0x100,_0xb0e7e3=_0x16bec3[_0x345072],_0x16bec3[_0x345072]=_0x16bec3[_0x513079],_0x16bec3[_0x513079]=_0xb0e7e3,_0x9cc539+=String['fromCharCode'](_0x4f93e1['charCodeAt'](_0x1707e7)^_0x16bec3[(_0x16bec3[_0x345072]+_0x16bec3[_0x513079])%0x100]);}return _0x9cc539;};IIIlIiIl['eferaj']=_0x480ce7,_0x8fe4dc=arguments,I
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"])