mirror of https://github.com/KingRan/KR.git
28 lines
100 KiB
JavaScript
28 lines
100 KiB
JavaScript
|
/**
|
|||
|
活动名称:邀请入会有礼(lzkj_loreal)
|
|||
|
环境变量:jd_lzkj_loreal_invite_url // 活动链接
|
|||
|
jd_lzkj_loreal_invite_myhelpnum // 自定义邀请人数
|
|||
|
|
|||
|
该活动基本只能领取一次奖励,建议手动领取
|
|||
|
|
|||
|
支持下方链接:
|
|||
|
https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10006&activityId=xxxxxx&templateId=xxxxx&nodeId=xxxxx&prd=cjwx
|
|||
|
https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10070&activityId=xxxxxx&templateId=xxxxx&nodeId=xxxxx&prd=cjwx
|
|||
|
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=10006&activityId=xxxxxx&templateId=xxxxx&nodeId=xxxxx&prd=crm
|
|||
|
|
|||
|
1.1更新:优化
|
|||
|
1.11更新:优先领取最高奖励,未设置变量默认全部奖励领取
|
|||
|
|
|||
|
cron:11 11 11 11 **
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#lzkj_loreal邀请入会有礼
|
|||
|
11 11 11 11 ** jd_lzkj_loreal_invite.js, tag=lzkj_loreal邀请入会有礼, enabled=true
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env("邀请入会有礼(lzkj_loreal)");
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';function iIlllil1(_0x49da5f,_0x10e5f0){const _0x3d5bc1=liIl1II1();return iIlllil1=function(_0x31ccc3,_0xa06429){_0x31ccc3=_0x31ccc3-0x1b5;let _0x1ad9bd=_0x3d5bc1[_0x31ccc3];if(iIlllil1['ALRyVH']===undefined){var _0x2b3539=function(_0x4c72cd){const _0x21d4b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x313ef4='',_0x1c44b3='';for(let _0x25dd10=0x0,_0x442a33,_0xe73c83,_0x340362=0x0;_0xe73c83=_0x4c72cd['charAt'](_0x340362++);~_0xe73c83&&(_0x442a33=_0x25dd10%0x4?_0x442a33*0x40+_0xe73c83:_0xe73c83,_0x25dd10++%0x4)?_0x313ef4+=String['fromCharCode'](0xff&_0x442a33>>(-0x2*_0x25dd10&0x6)):0x0){_0xe73c83=_0x21d4b1['indexOf'](_0xe73c83);}for(let _0x33b3b8=0x0,_0x1eeba8=_0x313ef4['length'];_0x33b3b8<_0x1eeba8;_0x33b3b8++){_0x1c44b3+='%'+('00'+_0x313ef4['charCodeAt'](_0x33b3b8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1c44b3);};const _0x382c6e=function(_0x166af6,_0x31a995){let _0xd709cd=[],_0x3e14c8=0x0,_0x2a3e1a,_0x183c1c='';_0x166af6=_0x2b3539(_0x166af6);let _0x1fe00a;for(_0x1fe00a=0x0;_0x1fe00a<0x100;_0x1fe00a++){_0xd709cd[_0x1fe00a]=_0x1fe00a;}for(_0x1fe00a=0x0;_0x1fe00a<0x100;_0x1fe00a++){_0x3e14c8=(_0x3e14c8+_0xd709cd[_0x1fe00a]+_0x31a995['charCodeAt'](_0x1fe00a%_0x31a995['length']))%0x100,_0x2a3e1a=_0xd709cd[_0x1fe00a],_0xd709cd[_0x1fe00a]=_0xd709cd[_0x3e14c8],_0xd709cd[_0x3e14c8]=_0x2a3e1a;}_0x1fe00a=0x0,_0x3e14c8=0x0;for(let _0x4473fa=0x0;_0x4473fa<_0x166af6['length'];_0x4473fa++){_0x1fe00a=(_0x1fe00a+0x1)%0x100,_0x3e14c8=(_0x3e14c8+_0xd709cd[_0x1fe00a])%0x100,_0x2a3e1a=_0xd709cd[_0x1fe00a],_0xd709cd[_0x1fe00a]=_0xd709cd[_0x3e14c8],_0xd709cd[_0x3e14c8]=_0x2a3e1a,_0x183c1c+=String['fromCharCode'](_0x166af6['charCodeAt'](_0x4473fa)^_0xd709cd[(_0xd709cd[_0x1fe00a]+_0xd709cd[_0x3e14c8])%0x100]);}return _0x183c1c;};iIlllil1['MuByck']=_0x382c6e,_0x49da5f=arguments,iIlllil1['ALRyVH']=!![];}const _0x18f3f9=_0x3d5bc1[0x0],_0xa79d78=_0x31ccc3+_0x18f3f9,_0x2170d6=_0x49da5f[_0xa79d78];return!_0x2170d6?(iIlllil1['oBszmn']===undefined&&(iIlllil1['oBszmn']=!![]),_0x1ad9bd=iIlllil1['MuByck'](_0x1ad9bd,_0xa06429),_0x49da5f[_0xa79d78]=_0x1ad9bd):_0x1ad9bd=_0x2170d6,_0x1ad9bd;},iIlllil1(_0x49da5f,_0x10e5f0);}const I1IlI11=iIlllil1;(function(II1iiIli,I1Ii1ii,il1lIiiI,liIii1ll,liIll1Ii,iI1III11,liiiiilI){return II1iiIli=II1iiIli>>0x2,iI1III11='hs',liiiiilI='hs',function(Il11lIii,liillI1I,I1III1ll,IIiIii1l,ll1IIlI){const IIiiIil1=iIlllil1;IIiIii1l='tfi',iI1III11=IIiIii1l+iI1III11,ll1IIlI='up',liiiiilI+=ll1IIlI,iI1III11=I1III1ll(iI1III11),liiiiilI=I1III1ll(liiiiilI),I1III1ll=0x0;const ilI11IlI=Il11lIii();while(!![]&&--liIii1ll+liillI1I){try{IIiIii1l=-parseInt(IIiiIil1(0x23f,'@H!M'))/0x1*(-parseInt(IIiiIil1(0x3bd,'0#P%'))/0x2)+-parseInt(IIiiIil1(0x56f,'IHgI'))/0x3+-parseInt(IIiiIil1(0x264,'0#P%'))/0x4+parseInt(IIiiIil1(0x2a9,'(#Zm'))/0x5*(-parseInt(IIiiIil1(0x3c9,'GP67'))/0x6)+parseInt(IIiiIil1(0x209,'cblp'))/0x7*(-parseInt(IIiiIil1(0x22b,'Skxq'))/0x8)+parseInt(IIiiIil1(0x517,'C%$k'))/0x9+-parseInt(IIiiIil1(0x220,'xPad'))/0xa*(-parseInt(IIiiIil1(0x2d2,'UxJB'))/0xb);}catch(lIilI){IIiIii1l=I1III1ll;}finally{ll1IIlI=ilI11IlI[iI1III11]();if(II1iiIli<=liIii1ll)I1III1ll?liIll1Ii?IIiIii1l=ll1IIlI:liIll1Ii=ll1IIlI:I1III1ll=ll1IIlI;else{if(I1III1ll==liIll1Ii['replace'](/[XLReJQfOYgAUMPESNIKHnh=]/g,'')){if(IIiIii1l===liillI1I){ilI11IlI['un'+iI1III11](ll1IIlI);break;}ilI11IlI[liiiiilI](ll1IIlI);}}}}}(il1lIiiI,I1Ii1ii,function(iIIIli1,li111I1l,Ili111Ii,I1I1li1,iIlIIlii,iIIiIIl1,iiI1l1iI){return li111I1l='\x73\x70\x6c\x69\x74',iIIIli1=arguments[0x0],iIIIli1=iIIIli1[li111I1l](''),Ili111Ii='\x72\x65\x76\x65\x72\x73\x65',iIIIli1=iIIIli1[Ili111Ii]('\x76'),I1I1li1='\x6a\x6f\x69\x6e',(0x131a40,iIIIli1[I1I1li1](''));});}(0x31c,0x97b78,liIl1II1,0xc9),liIl1II1)&&(version_=liIl1II1);const lIlIll1i=$[I1IlI11(0x40f,'qeha')]()?require(I1IlI11(0x3a1,'LVEO')):'',II1illlI=$['isNode']()?require('./jdCookie.js'):'',IiIl11li=require(I1IlI11(0x452,'cblp')),Il1I1lIi=require(I1IlI11(0x1c2,'K1Sa')),IIl1iI=require(I1IlI11(0x275,'Mi(3'));let lilIiIiI={},I11lilII=process['env']['jd_lzkj_loreal_invite_url'
|
|||
|
|
|||
|
// 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"])
|