KR/jd_lzkj_loreal_draw.js

28 lines
103 KiB
JavaScript
Raw Normal View History

2023-09-08 09:56:36 +08:00
/*
活动名称幸运抽奖超级无线
2023-10-02 19:16:18 +08:00
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10001/10004/10020/10021/10026/10041/10042/10046/10054/10062/10063/10073/10080>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
2023-09-08 09:56:36 +08:00
环境变量jd_lzkj_loreal_draw_url // 活动链接
jd_lzkj_loreal_draw_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_draw_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_draw_break // 493后继续执行默认退出运行true/false
jd_lzkj_loreal_draw_Interval // 自定义抽奖间隔正整数默认1秒
jd_lzkj_loreal_draw_Number // 连续无次数跳出,默认 7 次,火爆账号请设置黑名单,否则也会占用次数
jd_lzkj_loreal_draw_MaxMiss // 最大连续未抽中次数(正整数),达到此次数后会跳过运行对应账号,默认不启用此功能
注释
2023-07-28 21:29:02 +08:00
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
2023-09-08 09:56:36 +08:00
需要链接中的三个必要参数才能正常访问活动页运行脚本至少需要提供 activityId 参数
只有在没有抽奖次数的前提下才会做任务做任务静默运行没有打印日志
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-09-08 09:56:36 +08:00
#幸运抽奖超级无线
1 1 1 1 * jd_lzkj_loreal_draw.js, tag=幸运抽奖超级无线, enabled=true
2023-07-28 23:36:10 +08:00
2023-09-08 09:56:36 +08:00
*/
const $ = new Env('幸运抽奖(超级无线)');
2023-10-11 11:07:20 +08:00
var version_='jsjiami.com.v7';const IiilIi1=iIllii1i;function iIllii1i(_0x1cb457,_0x57524d){const _0x5a3418=lI11iiIi();return iIllii1i=function(_0x5cba05,_0x1321fb){_0x5cba05=_0x5cba05-0x95;let _0x5d1c22=_0x5a3418[_0x5cba05];if(iIllii1i['vxIQmf']===undefined){var _0x17b52c=function(_0x2faa26){const _0xa6bd40='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c0d3d='',_0x1754be='';for(let _0x5607c1=0x0,_0x19b8f5,_0x471c72,_0x413234=0x0;_0x471c72=_0x2faa26['charAt'](_0x413234++);~_0x471c72&&(_0x19b8f5=_0x5607c1%0x4?_0x19b8f5*0x40+_0x471c72:_0x471c72,_0x5607c1++%0x4)?_0x1c0d3d+=String['fromCharCode'](0xff&_0x19b8f5>>(-0x2*_0x5607c1&0x6)):0x0){_0x471c72=_0xa6bd40['indexOf'](_0x471c72);}for(let _0xb866c9=0x0,_0x241809=_0x1c0d3d['length'];_0xb866c9<_0x241809;_0xb866c9++){_0x1754be+='%'+('00'+_0x1c0d3d['charCodeAt'](_0xb866c9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1754be);};const _0x3bed6a=function(_0x2a547a,_0x55dfb7){let _0x3fec63=[],_0xeb2793=0x0,_0x5cb781,_0x1f581f='';_0x2a547a=_0x17b52c(_0x2a547a);let _0x5eff28;for(_0x5eff28=0x0;_0x5eff28<0x100;_0x5eff28++){_0x3fec63[_0x5eff28]=_0x5eff28;}for(_0x5eff28=0x0;_0x5eff28<0x100;_0x5eff28++){_0xeb2793=(_0xeb2793+_0x3fec63[_0x5eff28]+_0x55dfb7['charCodeAt'](_0x5eff28%_0x55dfb7['length']))%0x100,_0x5cb781=_0x3fec63[_0x5eff28],_0x3fec63[_0x5eff28]=_0x3fec63[_0xeb2793],_0x3fec63[_0xeb2793]=_0x5cb781;}_0x5eff28=0x0,_0xeb2793=0x0;for(let _0x5a8aba=0x0;_0x5a8aba<_0x2a547a['length'];_0x5a8aba++){_0x5eff28=(_0x5eff28+0x1)%0x100,_0xeb2793=(_0xeb2793+_0x3fec63[_0x5eff28])%0x100,_0x5cb781=_0x3fec63[_0x5eff28],_0x3fec63[_0x5eff28]=_0x3fec63[_0xeb2793],_0x3fec63[_0xeb2793]=_0x5cb781,_0x1f581f+=String['fromCharCode'](_0x2a547a['charCodeAt'](_0x5a8aba)^_0x3fec63[(_0x3fec63[_0x5eff28]+_0x3fec63[_0xeb2793])%0x100]);}return _0x1f581f;};iIllii1i['uPkuPR']=_0x3bed6a,_0x1cb457=arguments,iIllii1i['vxIQmf']=!![];}const _0x29b7e5=_0x5a3418[0x0],_0x1e0be7=_0x5cba05+_0x29b7e5,_0x4d7a56=_0x1cb457[_0x1e0be7];return!_0x4d7a56?(iIllii1i['WCUuwp']===undefined&&(iIllii1i['WCUuwp']=!![]),_0x5d1c22=iIllii1i['uPkuPR'](_0x5d1c22,_0x1321fb),_0x1cb457[_0x1e0be7]=_0x5d1c22):_0x5d1c22=_0x4d7a56,_0x5d1c22;},iIllii1i(_0x1cb457,_0x57524d);}(function(Il1l1i1I,i1l1llll,l1ill1ii,llllIiii,lIIi1I,Ii1iIIl1,il1I1lll){return Il1l1i1I=Il1l1i1I>>0x1,Ii1iIIl1='hs',il1I1lll='hs',function(illi1lI1,iIIiiIl1,iiiiiIl,ilI1IlIi,li1i1li){const II11l1lI=iIllii1i;ilI1IlIi='tfi',Ii1iIIl1=ilI1IlIi+Ii1iIIl1,li1i1li='up',il1I1lll+=li1i1li,Ii1iIIl1=iiiiiIl(Ii1iIIl1),il1I1lll=iiiiiIl(il1I1lll),iiiiiIl=0x0;const ii1ll1iI=illi1lI1();while(!![]&&--llllIiii+iIIiiIl1){try{ilI1IlIi=parseInt(II11l1lI(0x23b,'y(e6'))/0x1*(parseInt(II11l1lI(0x1f2,'2@BB'))/0x2)+parseInt(II11l1lI(0x1a7,'!Y6f'))/0x3+-parseInt(II11l1lI(0x25f,'*@4k'))/0x4+parseInt(II11l1lI(0x45c,')E#$'))/0x5+-parseInt(II11l1lI(0x22f,'BhK%'))/0x6+parseInt(II11l1lI(0x491,'S[LH'))/0x7+-parseInt(II11l1lI(0x117,'F2(P'))/0x8*(parseInt(II11l1lI(0x46b,'di$b'))/0x9);}catch(llIllIi1){ilI1IlIi=iiiiiIl;}finally{li1i1li=ii1ll1iI[Ii1iIIl1]();if(Il1l1i1I<=llllIiii)iiiiiIl?lIIi1I?ilI1IlIi=li1i1li:lIIi1I=li1i1li:iiiiiIl=li1i1li;else{if(iiiiiIl==lIIi1I['replace'](/[NeUMOHDxVkwlEtYnRJu=]/g,'')){if(ilI1IlIi===iIIiiIl1){ii1ll1iI['un'+Ii1iIIl1](li1i1li);break;}ii1ll1iI[il1I1lll](li1i1li);}}}}}(l1ill1ii,i1l1llll,function(lI1lIi11,ll1ll1l1,IliI1lII,II111I1I,IIi11ilI,i11iiiII,II1Ilii){return ll1ll1l1='\x73\x70\x6c\x69\x74',lI1lIi11=arguments[0x0],lI1lIi11=lI1lIi11[ll1ll1l1](''),IliI1lII=`\x72\x65\x76\x65\x72\x73\x65`,lI1lIi11=lI1lIi11[IliI1lII]('\x76'),II111I1I=`\x6a\x6f\x69\x6e`,(0x141b9d,lI1lIi11[II111I1I](''));});}(0x18e,0x5c446,lI11iiIi,0xc9),lI11iiIi)&&(version_=lI11iiIi);const I1li1il=$[IiilIi1(0x33b,'LJiY')]()?require(IiilIi1(0x389,'VLUS')):'',i1lII1I=require(IiilIi1(0x3a7,'ji5C')),ii111II=require('./function/sendJDNotify'),IIiIlIIl=require(IiilIi1(0x15e,'fmxw')),{loreal_savePrize:iIIIiii}=require(IiilIi1(0x9f,'b(B9')),iii1111I=require('crypto-js');let liIl1I1i=[];const liili1li=process['env'][IiilIi1(0xe0,'y(e6')]||'',I1il1i1l=process['env'][IiilIi1(0x3b9,'[e5P')
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-09-08 09:56:36 +08:00
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.d