KR/jd_lzkj_loreal_upperSign.js

20 lines
102 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
活动名称上上签抽奖超级无线欧莱雅
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10054&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
环境变量jd_lzkj_loreal_upperSign_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_upperSign.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 I1II1l=iii1II;(function(liIilI,Ii1li1,iiil1,liIil1,IIiIlI,ilII1I,iiIlI1){return liIilI=liIilI>>0x1,ilII1I='hs',iiIlI1='hs',function(lli1l1,lii1l,lii1i,lliIl,lliIi){const Il1l11=iii1II;lliIl='tfi',ilII1I=lliIl+ilII1I,lliIi='up',iiIlI1+=lliIi,ilII1I=lii1i(ilII1I),iiIlI1=lii1i(iiIlI1),lii1i=0x0;const l1Iii1=lli1l1();while(!![]&&--liIil1+lii1l){try{lliIl=-parseInt(Il1l11(0x4c1,'9P)u'))/0x1+parseInt(Il1l11(0x2b5,'68D!'))/0x2+parseInt(Il1l11(0x476,'P*Da'))/0x3*(-parseInt(Il1l11(0x3b5,'G82V'))/0x4)+-parseInt(Il1l11(0x38f,'X2!2'))/0x5*(-parseInt(Il1l11(0x1ce,'gLVp'))/0x6)+-parseInt(Il1l11(0x445,'hkSr'))/0x7*(parseInt(Il1l11(0x34d,')kBV'))/0x8)+-parseInt(Il1l11(0x47e,'DTdz'))/0x9+parseInt(Il1l11(0x3de,'m7JQ'))/0xa*(parseInt(Il1l11(0x1b5,'t@Sb'))/0xb);}catch(IIiIi1){lliIl=lii1i;}finally{lliIi=l1Iii1[ilII1I]();if(liIilI<=liIil1)lii1i?IIiIlI?lliIl=lliIi:IIiIlI=lliIi:lii1i=lliIi;else{if(lii1i==IIiIlI['replace'](/[FuEPKMABJSTrxyNHDfWn=]/g,'')){if(lliIl===lii1l){l1Iii1['un'+ilII1I](lliIi);break;}l1Iii1[iiIlI1](lliIi);}}}}}(iiil1,Ii1li1,function(I1i1,iiiii,iiiil,iiIlII,il11II,l11l1,l11lI){return iiiii='\x73\x70\x6c\x69\x74',I1i1=arguments[0x0],I1i1=I1i1[iiiii](''),iiiil='\x72\x65\x76\x65\x72\x73\x65',I1i1=I1i1[iiiil]('\x76'),iiIlII='\x6a\x6f\x69\x6e',(0x136a8d,I1i1[iiIlII](''));});}(0x18a,0x6546e,Iii11l,0xc7),Iii11l)&&(version_=Iii11l);const IiIII=$[I1II1l(0x4ea,'BMEo')]()?require(I1II1l(0x427,'t@Sb')):'',IiIiii=$['isNode']()?require(I1II1l(0x25e,'xnoa')):'',lIiIll=require('./function/krgetToken'),lIlliI=require('./function/krh5st'),iIIlI1=require(I1II1l(0x2e7,'b*5h'));let IiIiil={},IlIi=process['env']['jd_lzkj_loreal_upperSign_url'],IlIl=null,IiII1='',l1IIi='';function iii1II(_0x3e882d,_0x354730){const _0x16cce9=Iii11l();return iii1II=function(_0x2b175e,_0x4d082b){_0x2b175e=_0x2b175e-0x119;let _0x4a2fc2=_0x16cce9[_0x2b175e];if(iii1II['sZrTdc']===undefined){var _0x5223e2=function(_0x3d450f){const _0x150a06='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x344e89='',_0x1d61b3='';for(let _0x11ad97=0x0,_0x112f35,_0x3df15f,_0x593bd3=0x0;_0x3df15f=_0x3d450f['charAt'](_0x593bd3++);~_0x3df15f&&(_0x112f35=_0x11ad97%0x4?_0x112f35*0x40+_0x3df15f:_0x3df15f,_0x11ad97++%0x4)?_0x344e89+=String['fromCharCode'](0xff&_0x112f35>>(-0x2*_0x11ad97&0x6)):0x0){_0x3df15f=_0x150a06['indexOf'](_0x3df15f);}for(let _0x244e92=0x0,_0x286427=_0x344e89['length'];_0x244e92<_0x286427;_0x244e92++){_0x1d61b3+='%'+('00'+_0x344e89['charCodeAt'](_0x244e92)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1d61b3);};const _0x1f42c1=function(_0x5dcb15,_0x4dbfe3){let _0x212b0d=[],_0x2e25a9=0x0,_0x163c8d,_0x4acdef='';_0x5dcb15=_0x5223e2(_0x5dcb15);let _0x25ac86;for(_0x25ac86=0x0;_0x25ac86<0x100;_0x25ac86++){_0x212b0d[_0x25ac86]=_0x25ac86;}for(_0x25ac86=0x0;_0x25ac86<0x100;_0x25ac86++){_0x2e25a9=(_0x2e25a9+_0x212b0d[_0x25ac86]+_0x4dbfe3['charCodeAt'](_0x25ac86%_0x4dbfe3['length']))%0x100,_0x163c8d=_0x212b0d[_0x25ac86],_0x212b0d[_0x25ac86]=_0x212b0d[_0x2e25a9],_0x212b0d[_0x2e25a9]=_0x163c8d;}_0x25ac86=0x0,_0x2e25a9=0x0;for(let _0x40c5a1=0x0;_0x40c5a1<_0x5dcb15['length'];_0x40c5a1++){_0x25ac86=(_0x25ac86+0x1)%0x100,_0x2e25a9=(_0x2e25a9+_0x212b0d[_0x25ac86])%0x100,_0x163c8d=_0x212b0d[_0x25ac86],_0x212b0d[_0x25ac86]=_0x212b0d[_0x2e25a9],_0x212b0d[_0x2e25a9]=_0x163c8d,_0x4acdef+=String['fromCharCode'](_0x5dcb15['charCodeAt'](_0x40c5a1)^_0x212b0d[(_0x212b0d[_0x25ac86]+_0x212b0d[_0x2e25a9])%0x100]);}return _0x4acdef;};iii1II['NNsRRV']=_0x1f42c1,_0x3e882d=arguments,iii1II['sZrTdc']=!![];}const _0x1c5829=_0x16cce9[0x0],_0x26aa19=_0x2b175e+_0x1c5829,_0x109dfc=_0x3e882d[_0x26aa19];return!_0x109dfc?(iii1II['TDtQGo']===undefined&&(iii1II['TDtQGo']=!![]),_0x4a2fc2=iii1II['NNsRRV'](_0x4a2fc2,_0x4d082b),_0x3e882d[_0x26aa19]=_0x4a2fc2):_0x4a2fc2=_0x109dfc,_0x4a2fc2;},iii1II(_0x3e882d,_0x354730);}$[I1II1l(0x292,'D4#f')]=![];let l1IIl=null,l1I1il=[],III1ii='',l1I1ii='',III1il='';if($['isNode']()){if(process[I1II1l(0x490,'f[XA')]['jd_lzkj_loreal_upperSign_url'])IlIi=process['env']['jd_lzkj_loreal_upperSign_url'];if(JSON['str
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-07-28 21:29:02 +08:00
async 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 &&