KR/jd_lzkj_loreal_draw.js

22 lines
102 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
2023-07-28 21:29:02 +08:00
lzkj_loreal抽奖
必须条件配置文件或者环境变量中添加变量
## lzkj_loreal抽奖-jd_lzkj_loreal_draw.js
//export jd_lzkj_loreal_draw_url="活动链接"
此类活动必须强制入会否则无法参加
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-07-28 21:29:02 +08:00
#lzkj_loreal抽奖
1 1 1 1 * jd_lzkj_loreal_draw.js, tag=lzkj_loreal抽奖, enabled=true
2023-07-27 16:14:01 +08:00
*/
const $ = new Env("幸运抽奖lzkj_loreal");
2023-07-28 21:29:02 +08:00
var version_='jsjiami.com.v7';const iII=iii1II;(function(I111II,lII1,iIlIlI,lIl11,ilIili,ilIill,Il1l1l){return I111II=I111II>>0x1,ilIill='hs',Il1l1l='hs',function(iIlIil,IIlll1,Il1l1i,I1II11,iI1){const ilIiil=iii1II;I1II11='tfi',ilIill=I1II11+ilIill,iI1='up',Il1l1l+=iI1,ilIill=Il1l1i(ilIill),Il1l1l=Il1l1i(Il1l1l),Il1l1i=0x0;const I111Il=iIlIil();while(!![]&&--lIl11+IIlll1){try{I1II11=-parseInt(ilIiil(0x269,')*[^'))/0x1+-parseInt(ilIiil(0x2f1,'!Vx2'))/0x2*(parseInt(ilIiil(0x4ce,'Zy&]'))/0x3)+-parseInt(ilIiil(0x419,'A(*Y'))/0x4+-parseInt(ilIiil(0x3b8,'OyOI'))/0x5*(parseInt(ilIiil(0x2e7,'q%yc'))/0x6)+-parseInt(ilIiil(0x5db,'5%N7'))/0x7+-parseInt(ilIiil(0x5ea,'lG9@'))/0x8+parseInt(ilIiil(0x5d6,'0lTY'))/0x9;}catch(lIl1I){I1II11=Il1l1i;}finally{iI1=I111Il[ilIill]();if(I111II<=lIl11)Il1l1i?ilIili?I1II11=iI1:ilIili=iI1:Il1l1i=iI1;else{if(Il1l1i==ilIili['replace'](/[SHKugILkWyGxUOeARb=]/g,'')){if(I1II11===IIlll1){I111Il['un'+ilIill](iI1);break;}I111Il[Il1l1l](iI1);}}}}}(iIlIlI,lII1,function(I111Ii,IIlllI,l11Iil,Iili1I,lli1i1,IIlli1,ilIiii){return IIlllI='\x73\x70\x6c\x69\x74',I111Ii=arguments[0x0],I111Ii=I111Ii[IIlllI](''),l11Iil='\x72\x65\x76\x65\x72\x73\x65',I111Ii=I111Ii[l11Iil]('\x76'),Iili1I='\x6a\x6f\x69\x6e',(0x136a8a,I111Ii[Iili1I](''));});}(0x17e,0x80e52,Iii11l,0xc1),Iii11l)&&(version_=Iii11l);const iII11i=$[iII(0x616,'lG9@')]()?require('./sendNotify'):'',l1iI1i=$[iII(0x59c,'IuM!')]()?require(iII(0x306,'IuM!')):'',lIlllI=require(iII(0x560,'3ZWU')),III1lI=require('./function/krh5st'),I11i=require(iII(0x226,'$B$h'));let ll1IlI={},I11l=process['env'][iII(0x21b,'z&@U')],Ili1l1='',iilIil=null,illI1i='';$[iII(0x3d1,'s7)^')]=![];let i1IiII=null,illI1l=[],l1ll1I='',i1lI1='',l1ll11='';if($['isNode']()){if(process[iII(0x37f,'^svf')][iII(0x55e,'A(*Y')])I11l=process['env'][iII(0x426,'R5JJ')];if(JSON[iII(0x4be,'3ZWU')](process['env'])[iII(0x26e,'^svf')](iII(0x32c,'2mdb'))>-0x1)process[iII(0x1e3,'Ozn!')](0x0);Object[iII(0x456,'3tsw')](l1iI1i)[iII(0x542,'OyOI')](iilIli=>{const l11IlI=iII;illI1l[l11IlI(0x4d0,'8JZa')](l1iI1i[iilIli]);});if(process[iII(0x498,'OyOI')][iII(0x482,'[X[%')]&&process[iII(0x45d,'8JZa')][iII(0x2b7,'2mdb')]===iII(0x4fd,')*[^'))console['log']=()=>{};}else illI1l=[$[iII(0x23f,'v#AB')](iII(0x585,'b^!a')),$[iII(0x2ac,'SdMp')]('CookieJD2'),...$[iII(0x411,'5MsR')]($[iII(0x45c,'OyOI')](iII(0x2c7,'b^!a'))||'[]')[iII(0x1f0,'^svf')](IlIi1I=>IlIi1I[iII(0x27c,'W*@^')])][iII(0x470,'V$Sg')](i111I=>!!i111I);let I1I111=typeof $request!==iII(0x4e6,'cSw[');I1I111&&(GetCookie(),$[iII(0x601,'pQrr')]());if(I11l){const llIiiI=iII(0x629,'5Hl[')[iII(0x208,'%S$g')]('|');let IiIilI=0x0;while(!![]){switch(llIiiI[IiIilI++]){case'0':iilIil=III1iI(''+I11l,iII(0x2ef,'C73B'));continue;case'1':$[iII(0x5e0,'5MsR')]=I11l['match'](/https?:\/\/([^/]+)/)[0x1];continue;case'2':if(I11l[iII(0x466,'SdMp')](iII(0x59a,'Zy&]')))wxActType=iII(0x251,'HlOA');else I11l[iII(0x25d,'Q%gd')](iII(0x30c,'2mdb'))?wxActType=I11l[iII(0x5b6,'Zn6V')](/\/(prod\/cc\/interact\w*)\//)[0x1]:console[iII(0x548,'!Vx2')](iII(0x23e,'v#AB'));continue;case'3':templateId=III1iI(''+I11l,iII(0x515,'^svf'));continue;case'4':activityType=III1iI(''+I11l,iII(0x4c5,'5%N7'));continue;}break;}}let lIllli=iII(0x47a,'HlOA')+$[iII(0x3f4,'o(F8')];!(async()=>{const lIIl=iII,lIiIl1={'zaCWv':function(l1II1,III1i1){return l1II1+III1i1;},'MqBJH':function(IlI1,I1IlIl){return IlI1!=I1IlIl;},'KDoYg':function(l1I1i1,I1IlIi){return l1I1i1==I1IlIi;},'odMMr':lIIl(0x381,'^svf'),'xrEFb':lIIl(0x4f6,'#eq6'),'HfdKL':function(l1ll1i,IiIil1){return l1ll1i<IiIil1;},'qvCky':function(i111l,lIiIlI){return i111l*lIiIlI;},'corJB':function(iilIlI){return iilIlI();},'gKzAf':function(i111i,lIlli1){return i111i==lIlli1;},'rIqSz':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','FOJzg':function(llIii1,I1IlII){return llIii1+I1IlII;},'wqEFq':lIIl(0x5a0,'$B$h'),'KSfED':lIIl(0x43b,'b^!a'),'Mmkoa':function(l1III,l1I1iI){return l1III===l1I1iI;},'CSRdG':'pQnAP','KeJog':lIIl(0x2eb,'3ZWU'),'vJkAU':'RGzah','oazbG':function(III1l1,Il111){return III1l1==Il111;},'TDIuQ':function(lIiIli,IiIII){return lIiIli!=
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