KR/jd_lzkj_loreal_sign.js

20 lines
104 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
活动名称签到抽奖超级无线欧莱雅
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10001/10002/10003/10004>&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
支持activityType (10001/10002/10003/10004)
环境变量jd_lzkj_loreal_sign_url // 活动链接
2023-07-28 21:29:02 +08:00
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#lzkj_loreal签到抽奖
1 1 1 1 * jd_lzkj_loreal_sign.js, tag=lzkj_loreal签到抽奖, enabled=true
*/
const $ = new Env("签到抽奖lzkj_loreal");
2023-07-28 21:29:02 +08:00
var version_='jsjiami.com.v7';const IiIlI1=iii1II;(function(ll1iiI,lIIlll,ll1ii1,i11li1,iIlI1,IiIlII,iI11i){return ll1iiI=ll1iiI>>0x4,IiIlII='hs',iI11i='hs',function(I1Iili,ilIIII,I1li,iIllIi,iI11l){const iilI1i=iii1II;iIllIi='tfi',IiIlII=iIllIi+IiIlII,iI11l='up',iI11i+=iI11l,IiIlII=I1li(IiIlII),iI11i=I1li(iI11i),I1li=0x0;const IlIiiI=I1Iili();while(!![]&&--i11li1+ilIIII){try{iIllIi=-parseInt(iilI1i(0x16a,'EJPV'))/0x1*(parseInt(iilI1i(0x218,'Jjm&'))/0x2)+-parseInt(iilI1i(0x4b8,'Jjm&'))/0x3+-parseInt(iilI1i(0x30d,'9gSR'))/0x4*(-parseInt(iilI1i(0x57f,'Vlmv'))/0x5)+parseInt(iilI1i(0x425,'Yij!'))/0x6*(parseInt(iilI1i(0x3a7,'tWmQ'))/0x7)+-parseInt(iilI1i(0x59c,'8rNq'))/0x8+-parseInt(iilI1i(0x243,'pFvk'))/0x9+parseInt(iilI1i(0x598,'h4uq'))/0xa;}catch(lll1l1){iIllIi=I1li;}finally{iI11l=IlIiiI[IiIlII]();if(ll1iiI<=i11li1)I1li?iIlI1?iIllIi=iI11l:iIlI1=iI11l:I1li=iI11l;else{if(I1li==iIlI1['replace'](/[urflYxnwSCKMUdOqFDeBk=]/g,'')){if(iIllIi===ilIIII){IlIiiI['un'+IiIlII](iI11l);break;}IlIiiI[iI11i](iI11l);}}}}}(ll1ii1,lIIlll,function(llili1,iIllIl,I1ll,ll1iii,ll1iil,lIIlli,I1Iill){return iIllIl='\x73\x70\x6c\x69\x74',llili1=arguments[0x0],llili1=llili1[iIllIl](''),I1ll='\x72\x65\x76\x65\x72\x73\x65',llili1=llili1[I1ll]('\x76'),ll1iii='\x6a\x6f\x69\x6e',(0x136a8e,llili1[ll1iii](''));});}(0xc20,0x971cf,Iii11l,0xc4),Iii11l)&&(version_=Iii11l);const IllII=$[IiIlI1(0x1c7,')&HE')]()?require(IiIlI1(0x19a,'9gSR')):'',Ill1il=$[IiIlI1(0x515,'^rN(')]()?require(IiIlI1(0x1cd,'oSGo')):'',IIlI=require(IiIlI1(0x29b,'tWmQ')),I1i1l=require('./function/krh5st'),llIiIi=require(IiIlI1(0x18b,'h4uq'));let IIil={},IIii=process['env'][IiIlI1(0x461,'%eV^')],i1Ii1I=null,llIiIl='',I1i1i='';$[IiIlI1(0x1aa,'Qb9h')]=![];let lIi1II=null,iiiIii=[],IllI1='',iiiIil='',lilll='';function iii1II(_0x1cfd02,_0x517444){const _0x16f315=Iii11l();return iii1II=function(_0x3ab82c,_0xf9d976){_0x3ab82c=_0x3ab82c-0x163;let _0x49160b=_0x16f315[_0x3ab82c];if(iii1II['AbvqXV']===undefined){var _0x5d3ec9=function(_0x564316){const _0x5145b8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f5ad4='',_0x4f18ed='';for(let _0x35cd23=0x0,_0x19d3e0,_0x1d1930,_0x53c223=0x0;_0x1d1930=_0x564316['charAt'](_0x53c223++);~_0x1d1930&&(_0x19d3e0=_0x35cd23%0x4?_0x19d3e0*0x40+_0x1d1930:_0x1d1930,_0x35cd23++%0x4)?_0x1f5ad4+=String['fromCharCode'](0xff&_0x19d3e0>>(-0x2*_0x35cd23&0x6)):0x0){_0x1d1930=_0x5145b8['indexOf'](_0x1d1930);}for(let _0x4e629f=0x0,_0x4d0f35=_0x1f5ad4['length'];_0x4e629f<_0x4d0f35;_0x4e629f++){_0x4f18ed+='%'+('00'+_0x1f5ad4['charCodeAt'](_0x4e629f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4f18ed);};const _0x562606=function(_0x2c9fdc,_0x4dea0d){let _0x215e8e=[],_0x8961fc=0x0,_0x5962e9,_0x2d8291='';_0x2c9fdc=_0x5d3ec9(_0x2c9fdc);let _0x300206;for(_0x300206=0x0;_0x300206<0x100;_0x300206++){_0x215e8e[_0x300206]=_0x300206;}for(_0x300206=0x0;_0x300206<0x100;_0x300206++){_0x8961fc=(_0x8961fc+_0x215e8e[_0x300206]+_0x4dea0d['charCodeAt'](_0x300206%_0x4dea0d['length']))%0x100,_0x5962e9=_0x215e8e[_0x300206],_0x215e8e[_0x300206]=_0x215e8e[_0x8961fc],_0x215e8e[_0x8961fc]=_0x5962e9;}_0x300206=0x0,_0x8961fc=0x0;for(let _0x5cd131=0x0;_0x5cd131<_0x2c9fdc['length'];_0x5cd131++){_0x300206=(_0x300206+0x1)%0x100,_0x8961fc=(_0x8961fc+_0x215e8e[_0x300206])%0x100,_0x5962e9=_0x215e8e[_0x300206],_0x215e8e[_0x300206]=_0x215e8e[_0x8961fc],_0x215e8e[_0x8961fc]=_0x5962e9,_0x2d8291+=String['fromCharCode'](_0x2c9fdc['charCodeAt'](_0x5cd131)^_0x215e8e[(_0x215e8e[_0x300206]+_0x215e8e[_0x8961fc])%0x100]);}return _0x2d8291;};iii1II['LLaIPe']=_0x562606,_0x1cfd02=arguments,iii1II['AbvqXV']=!![];}const _0x520612=_0x16f315[0x0],_0x2fa8a1=_0x3ab82c+_0x520612,_0x1e02e8=_0x1cfd02[_0x2fa8a1];return!_0x1e02e8?(iii1II['tlAIed']===undefined&&(iii1II['tlAIed']=!![]),_0x49160b=iii1II['LLaIPe'](_0x49160b,_0xf9d976),_0x1cfd02[_0x2fa8a1]=_0x49160b):_0x49160b=_0x1e02e8,_0x49160b;},iii1II(_0x1cfd02,_0x517444);}if($[IiIlI1(0x44e,'H]J9')]()){if(process[IiIlI1(0x25f,'FkCq')][IiIlI1(0x48a,'13HR')])IIii=process[IiIlI1(0x4f3,'%eV^')][IiIlI1(0x43e,'8rNq')];if(JSON[IiIlI1(0x1dd,'0$62')](proce
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-07-28 21:29:02 +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