KR/jd_lzkj_loreal_draw.js

28 lines
102 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-02 19:16:18 +08:00
var version_='jsjiami.com.v7';const lIlI11lI=lii1I11l;(function(I1i1l,lllIIIli,IiIlIi1i,iII11iIi,il1IiIli,liIill1I,ll1IlIIl){return I1i1l=I1i1l>>0x4,liIill1I='hs',ll1IlIIl='hs',function(lll11l11,Iiiil,iiiiI1lI,IllI1Il1,I1l1IIl1){const lIilIli=lii1I11l;IllI1Il1='tfi',liIill1I=IllI1Il1+liIill1I,I1l1IIl1='up',ll1IlIIl+=I1l1IIl1,liIill1I=iiiiI1lI(liIill1I),ll1IlIIl=iiiiI1lI(ll1IlIIl),iiiiI1lI=0x0;const I1IIIllI=lll11l11();while(!![]&&--iII11iIi+Iiiil){try{IllI1Il1=parseInt(lIilIli(0x1f9,']zf%'))/0x1*(-parseInt(lIilIli(0x160,'O1Ah'))/0x2)+-parseInt(lIilIli(0x234,'^j&2'))/0x3+-parseInt(lIilIli(0x12a,'K&0#'))/0x4+-parseInt(lIilIli(0x166,'%w$c'))/0x5*(parseInt(lIilIli(0x4eb,')T[B'))/0x6)+parseInt(lIilIli(0x101,'mD4H'))/0x7*(-parseInt(lIilIli(0x2e1,'scS!'))/0x8)+parseInt(lIilIli(0x536,'8O5H'))/0x9*(parseInt(lIilIli(0x21e,'8O5H'))/0xa)+-parseInt(lIilIli(0x17e,'iSQJ'))/0xb*(-parseInt(lIilIli(0x3e7,'[aKb'))/0xc);}catch(II111iiI){IllI1Il1=iiiiI1lI;}finally{I1l1IIl1=I1IIIllI[liIill1I]();if(I1i1l<=iII11iIi)iiiiI1lI?il1IiIli?IllI1Il1=I1l1IIl1:il1IiIli=I1l1IIl1:iiiiI1lI=I1l1IIl1;else{if(iiiiI1lI==il1IiIli['replace'](/[OpwKGWqydTXCxAlkn=]/g,'')){if(IllI1Il1===Iiiil){I1IIIllI['un'+liIill1I](I1l1IIl1);break;}I1IIIllI[ll1IlIIl](I1l1IIl1);}}}}}(IiIlIi1i,lllIIIli,function(Iii111I,i1iIllIl,iII11III,Ili11,ilIl1I11,IIlliI,illi1II){return i1iIllIl='\x73\x70\x6c\x69\x74',Iii111I=arguments[0x0],Iii111I=Iii111I[i1iIllIl](''),iII11III=`\x72\x65\x76\x65\x72\x73\x65`,Iii111I=Iii111I[iII11III]('\x76'),Ili11=`\x6a\x6f\x69\x6e`,(0x140a7d,Iii111I[Ili11](''));});}(0xc00,0xc8ea5,iIIl,0xc2),iIIl)&&(version_=iIIl);const I1I1111l=$['isNode']()?require('./jdCookie'):'',III1lIl1=require(lIlI11lI(0x289,'CV]6')),lIiIll11=require(lIlI11lI(0x38d,'mD4H')),I111lIiI=require('./function/krgetToken'),{loreal_savePrize:lI1ilIii}=require(lIlI11lI(0x468,']zf%')),ilIlll1I=require('crypto-js');function lii1I11l(_0x219f56,_0x1a6ca1){const _0x3ab864=iIIl();return lii1I11l=function(_0x20fffd,_0x561275){_0x20fffd=_0x20fffd-0xf2;let _0x3f60ac=_0x3ab864[_0x20fffd];if(lii1I11l['AECUWL']===undefined){var _0x4dbd36=function(_0x484683){const _0x39cdea='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x464467='',_0x196a83='';for(let _0x14d16c=0x0,_0x41a44e,_0x344bc6,_0x26f970=0x0;_0x344bc6=_0x484683['charAt'](_0x26f970++);~_0x344bc6&&(_0x41a44e=_0x14d16c%0x4?_0x41a44e*0x40+_0x344bc6:_0x344bc6,_0x14d16c++%0x4)?_0x464467+=String['fromCharCode'](0xff&_0x41a44e>>(-0x2*_0x14d16c&0x6)):0x0){_0x344bc6=_0x39cdea['indexOf'](_0x344bc6);}for(let _0x38e9b4=0x0,_0x4ae0ee=_0x464467['length'];_0x38e9b4<_0x4ae0ee;_0x38e9b4++){_0x196a83+='%'+('00'+_0x464467['charCodeAt'](_0x38e9b4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x196a83);};const _0x5ea665=function(_0x51ca09,_0x570835){let _0x41ca90=[],_0x4ba06e=0x0,_0x2a885c,_0x26d129='';_0x51ca09=_0x4dbd36(_0x51ca09);let _0x14b41d;for(_0x14b41d=0x0;_0x14b41d<0x100;_0x14b41d++){_0x41ca90[_0x14b41d]=_0x14b41d;}for(_0x14b41d=0x0;_0x14b41d<0x100;_0x14b41d++){_0x4ba06e=(_0x4ba06e+_0x41ca90[_0x14b41d]+_0x570835['charCodeAt'](_0x14b41d%_0x570835['length']))%0x100,_0x2a885c=_0x41ca90[_0x14b41d],_0x41ca90[_0x14b41d]=_0x41ca90[_0x4ba06e],_0x41ca90[_0x4ba06e]=_0x2a885c;}_0x14b41d=0x0,_0x4ba06e=0x0;for(let _0x1d09c1=0x0;_0x1d09c1<_0x51ca09['length'];_0x1d09c1++){_0x14b41d=(_0x14b41d+0x1)%0x100,_0x4ba06e=(_0x4ba06e+_0x41ca90[_0x14b41d])%0x100,_0x2a885c=_0x41ca90[_0x14b41d],_0x41ca90[_0x14b41d]=_0x41ca90[_0x4ba06e],_0x41ca90[_0x4ba06e]=_0x2a885c,_0x26d129+=String['fromCharCode'](_0x51ca09['charCodeAt'](_0x1d09c1)^_0x41ca90[(_0x41ca90[_0x14b41d]+_0x41ca90[_0x4ba06e])%0x100]);}return _0x26d129;};lii1I11l['cSvJUh']=_0x5ea665,_0x219f56=arguments,lii1I11l['AECUWL']=!![];}const _0x28a489=_0x3ab864[0x0],_0x4d368e=_0x20fffd+_0x28a489,_0x23f6e5=_0x219f56[_0x4d368e];return!_0x23f6e5?(lii1I11l['PSNZpP']===undefined&&(lii1I11l['PSNZpP']=!![]),_0x3f60ac=lii1I11l['cSvJUh'](_0x3f60ac,_0x561275),_0x219f56[_0x4d368e]=_0x3f60ac):_0x3f60ac=_0x23f6e5,_0x3f60ac;},lii1I11l(_0x219f56,_0x1a6ca1);}let liI1i1II=[];const II1IIi11=process['env']['jd_lzkj_l
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