KR/jd_lzkj_loreal_draw.js

28 lines
106 KiB
JavaScript
Raw Normal View History

2023-09-08 09:56:36 +08:00
/*
活动名称幸运抽奖超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10020/10021/10026/10041/10042/10046/10062/10063/10073/10080>&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
环境变量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('幸运抽奖(超级无线)');
var version_='jsjiami.com.v7';const i1I111II=Iii111Il;(function(lIIliiI1,IlIlIIi,IiiliIl,iIl11iI1,I11lI1II,iiI11iil,li1IlI1l){return lIIliiI1=lIIliiI1>>0x9,iiI11iil='hs',li1IlI1l='hs',function(i11Iill,IIIlli1,iil1l1li,llII11lI,iIlliIlI){const liiI1IIi=Iii111Il;llII11lI='tfi',iiI11iil=llII11lI+iiI11iil,iIlliIlI='up',li1IlI1l+=iIlliIlI,iiI11iil=iil1l1li(iiI11iil),li1IlI1l=iil1l1li(li1IlI1l),iil1l1li=0x0;const iII1iiI1=i11Iill();while(!![]&&--iIl11iI1+IIIlli1){try{llII11lI=-parseInt(liiI1IIi(0x1da,'!Ude'))/0x1*(-parseInt(liiI1IIi(0x380,'JP@J'))/0x2)+-parseInt(liiI1IIi(0x28c,'6Mc*'))/0x3+-parseInt(liiI1IIi(0x54f,'S7Zz'))/0x4+-parseInt(liiI1IIi(0x4de,'1S9V'))/0x5+parseInt(liiI1IIi(0x541,'7zp9'))/0x6+parseInt(liiI1IIi(0x1a6,'kUR5'))/0x7*(-parseInt(liiI1IIi(0x1f4,'p)nK'))/0x8)+parseInt(liiI1IIi(0x347,'dnyL'))/0x9;}catch(ii1IliII){llII11lI=iil1l1li;}finally{iIlliIlI=iII1iiI1[iiI11iil]();if(lIIliiI1<=iIl11iI1)iil1l1li?I11lI1II?llII11lI=iIlliIlI:I11lI1II=iIlliIlI:iil1l1li=iIlliIlI;else{if(iil1l1li==I11lI1II['replace'](/[uKXQJDfFEhLNknVCeBAY=]/g,'')){if(llII11lI===IIIlli1){iII1iiI1['un'+iiI11iil](iIlliIlI);break;}iII1iiI1[li1IlI1l](iIlliIlI);}}}}}(IiiliIl,IlIlIIi,function(I1Ili1iI,i11liII,IlIl1Ili,lii1l1li,llillIl1,lIillii1,lI1Ii1I){return i11liII='\x73\x70\x6c\x69\x74',I1Ili1iI=arguments[0x0],I1Ili1iI=I1Ili1iI[i11liII](''),IlIl1Ili=`\x72\x65\x76\x65\x72\x73\x65`,I1Ili1iI=I1Ili1iI[IlIl1Ili]('\x76'),lii1l1li=`\x6a\x6f\x69\x6e`,(0x13d281,I1Ili1iI[lii1l1li](''));});}(0x19a00,0x69c8d,l11llIl1,0xcf),l11llIl1)&&(version_=l11llIl1);function Iii111Il(_0x2f3654,_0x53444b){const _0x1eba00=l11llIl1();return Iii111Il=function(_0x5dd9c8,_0x23cf4b){_0x5dd9c8=_0x5dd9c8-0x16c;let _0x16920d=_0x1eba00[_0x5dd9c8];if(Iii111Il['WnCoYa']===undefined){var _0x3c4529=function(_0x443596){const _0x1ce0e7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x174c8d='',_0x5b3893='';for(let _0x24996d=0x0,_0x8468d3,_0x31ef29,_0x55307f=0x0;_0x31ef29=_0x443596['charAt'](_0x55307f++);~_0x31ef29&&(_0x8468d3=_0x24996d%0x4?_0x8468d3*0x40+_0x31ef29:_0x31ef29,_0x24996d++%0x4)?_0x174c8d+=String['fromCharCode'](0xff&_0x8468d3>>(-0x2*_0x24996d&0x6)):0x0){_0x31ef29=_0x1ce0e7['indexOf'](_0x31ef29);}for(let _0x57db85=0x0,_0x6ebdbe=_0x174c8d['length'];_0x57db85<_0x6ebdbe;_0x57db85++){_0x5b3893+='%'+('00'+_0x174c8d['charCodeAt'](_0x57db85)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5b3893);};const _0x21281a=function(_0x38f4fc,_0x58e6ab){let _0x16b9e8=[],_0x67340c=0x0,_0x5830df,_0x5ead84='';_0x38f4fc=_0x3c4529(_0x38f4fc);let _0x188336;for(_0x188336=0x0;_0x188336<0x100;_0x188336++){_0x16b9e8[_0x188336]=_0x188336;}for(_0x188336=0x0;_0x188336<0x100;_0x188336++){_0x67340c=(_0x67340c+_0x16b9e8[_0x188336]+_0x58e6ab['charCodeAt'](_0x188336%_0x58e6ab['length']))%0x100,_0x5830df=_0x16b9e8[_0x188336],_0x16b9e8[_0x188336]=_0x16b9e8[_0x67340c],_0x16b9e8[_0x67340c]=_0x5830df;}_0x188336=0x0,_0x67340c=0x0;for(let _0x1cc466=0x0;_0x1cc466<_0x38f4fc['length'];_0x1cc466++){_0x188336=(_0x188336+0x1)%0x100,_0x67340c=(_0x67340c+_0x16b9e8[_0x188336])%0x100,_0x5830df=_0x16b9e8[_0x188336],_0x16b9e8[_0x188336]=_0x16b9e8[_0x67340c],_0x16b9e8[_0x67340c]=_0x5830df,_0x5ead84+=String['fromCharCode'](_0x38f4fc['charCodeAt'](_0x1cc466)^_0x16b9e8[(_0x16b9e8[_0x188336]+_0x16b9e8[_0x67340c])%0x100]);}return _0x5ead84;};Iii111Il['lMgeCI']=_0x21281a,_0x2f3654=arguments,Iii111Il['WnCoYa']=!![];}const _0x4badd5=_0x1eba00[0x0],_0x2a45bf=_0x5dd9c8+_0x4badd5,_0xaa8bd6=_0x2f3654[_0x2a45bf];return!_0xaa8bd6?(Iii111Il['rmJGIi']===undefined&&(Iii111Il['rmJGIi']=!![]),_0x16920d=Iii111Il['lMgeCI'](_0x16920d,_0x23cf4b),_0x2f3654[_0x2a45bf]=_0x16920d):_0x16920d=_0xaa8bd6,_0x16920d;},Iii111Il(_0x2f3654,_0x53444b);}const IIiIIl1=$[i1I111II(0x22f,'mf%A')]()?require(i1I111II(0x448,'5n[V')):'',iI1iiiii=require('./function/jdCommon'),II11illl=require(i1I111II(0x438,'O&5S')),iIliI1il=require(i1I111II(0x590,'G^IT')),IlliIii1=require(i1I111II(0x5ce,'[[P]')),{loreal_savePrize:I1IlIIII}=require(i1I111II(0x180,'TsPh')),llillIli=require(i1I111II(0x426,'JP@J'));let i1illI11=[];const il1iilll=process[
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