KR/jd_lzkj_loreal_upperSign.js

20 lines
105 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 23:36:10 +08:00
var version_='jsjiami.com.v7';const ilIII1=iii1II;(function(iIlIl,iIlIi,iIl111,i11lil,iilI1I,i11lii,I1Iii1){return iIlIl=iIlIl>>0x7,i11lii='hs',I1Iii1='hs',function(iiI1II,iIl11I,lIiii1,iIlII,iIiII1){const IlIiii=iii1II;iIlII='tfi',i11lii=iIlII+i11lii,iIiII1='up',I1Iii1+=iIiII1,i11lii=lIiii1(i11lii),I1Iii1=lIiii1(I1Iii1),lIiii1=0x0;const I1l1=iiI1II();while(!![]&&--i11lil+iIl11I){try{iIlII=-parseInt(IlIiii(0x1ce,'0j5)'))/0x1*(parseInt(IlIiii(0x548,'@2F7'))/0x2)+parseInt(IlIiii(0x3d3,'r522'))/0x3*(-parseInt(IlIiii(0x38c,'0Hdx'))/0x4)+-parseInt(IlIiii(0x41b,'K*v@'))/0x5*(parseInt(IlIiii(0x306,'1#XI'))/0x6)+-parseInt(IlIiii(0x1f6,'B@fU'))/0x7+parseInt(IlIiii(0x32d,'r522'))/0x8+parseInt(IlIiii(0x644,'JbFh'))/0x9*(parseInt(IlIiii(0x37d,'[9(@'))/0xa)+parseInt(IlIiii(0x1c2,'@EsI'))/0xb*(parseInt(IlIiii(0x273,'zJ&H'))/0xc);}catch(Il11I1){iIlII=lIiii1;}finally{iIiII1=I1l1[i11lii]();if(iIlIl<=i11lil)lIiii1?iilI1I?iIlII=iIiII1:iilI1I=iIiII1:lIiii1=iIiII1;else{if(lIiii1==iilI1I['replace'](/[tTqQSgGYfbWMuXCLAlxRn=]/g,'')){if(iIlII===iIl11I){I1l1['un'+i11lii](iIiII1);break;}I1l1[I1Iii1](iIiII1);}}}}}(iIl111,iIlIi,function(i11liI,iilI11,lIiiiI,iiI1Il,iiI1Ii,Il1i1,IlIiil){return iilI11='\x73\x70\x6c\x69\x74',i11liI=arguments[0x0],i11liI=i11liI[iilI11](''),lIiiiI='\x72\x65\x76\x65\x72\x73\x65',i11liI=i11liI[lIiiiI]('\x76'),iiI1Il='\x6a\x6f\x69\x6e',(0x136aff,i11liI[iiI1Il](''));});}(0x6180,0xd4d6c,Iii11l,0xc5),Iii11l)&&(version_=Iii11l);const illl11=$[ilIII1(0x1e9,'dJrW')]()?require('./sendNotify'):'',iiI1=$[ilIII1(0x5a4,'PnDG')]()?require(ilIII1(0x449,'zJ&H')):'',Il11l=require('./function/krgetToken'),l1iiil=require('./function/krh5st'),l1ilI=require(ilIII1(0x569,'2oFN'));let IIi1={},illl1i=process[ilIII1(0x302,'9u22')]['jd_lzkj_loreal_upperSign_url'],l1iiii=null,iiiIi1='',illl1l='';$[ilIII1(0x363,'0doO')]=![];let Il11I=null,li1lll=[],lill1='',IiIIl='',IiIIi='';if($[ilIII1(0x5a4,'PnDG')]()){if(process[ilIII1(0x388,'B@fU')][ilIII1(0x53b,'GN$V')])illl1i=process['env'][ilIII1(0x575,'0j5)')];if(JSON[ilIII1(0x4a5,'zJ&H')](process[ilIII1(0x324,'z8CZ')])[ilIII1(0x634,'uMIj')](ilIII1(0x497,')GRU'))>-0x1)process[ilIII1(0x469,'z8CZ')](0x0);Object[ilIII1(0x2b2,'H1]%')](iiI1)['forEach'](IIil=>{const lll1lI=ilIII1;li1lll[lll1lI(0x58e,'qCef')](iiI1[IIil]);});if(process[ilIII1(0x3f1,'#JGX')]['JD_DEBUG']&&process[ilIII1(0x354,'S*GB')]['JD_DEBUG']===ilIII1(0x5ee,'qCef'))console[ilIII1(0x615,'zJ&H')]=()=>{};}else li1lll=[$[ilIII1(0x59a,']HHY')]('CookieJD'),$[ilIII1(0x2ff,'74gd')](ilIII1(0x397,'S*GB')),...$[ilIII1(0x5a0,'hmeW')]($[ilIII1(0x4b1,'@EsI')](ilIII1(0x61c,'[9(@'))||'[]')[ilIII1(0x3ae,'#JGX')](IIii=>IIii['cookie'])][ilIII1(0x4c7,'9u22')](i1Ii1I=>!!i1Ii1I);let li1lli=typeof $request!==ilIII1(0x3cd,'uMIj');li1lli&&(GetCookie(),$[ilIII1(0x2e8,'Q4Ck')]());if(illl1i){const llIiIl='4|0|2|1|3'[ilIII1(0x540,'hmeW')]('|');let I1i1i=0x0;while(!![]){switch(llIiIl[I1i1i++]){case'0':activityType=Ill1il(''+illl1i,'activityType');continue;case'1':if(illl1i[ilIII1(0x304,'66ZU')]('lorealjdcampaign-rc'))wxActType=ilIII1(0x206,'B@fU');else illl1i[ilIII1(0x230,'jB0*')](ilIII1(0x3f0,'GN$V'))?wxActType=illl1i['match'](/\/(prod\/cc\/interact\w*)\//)[0x1]:console[ilIII1(0x5ff,'$@pn')](ilIII1(0x25a,'H1]%'));continue;case'2':templateId=Ill1il(''+illl1i,ilIII1(0x514,'sSCx'));continue;case'3':$['domain']=illl1i[ilIII1(0x5b6,'[9(@')](/https?:\/\/([^/]+)/)[0x1];continue;case'4':l1iiii=Ill1il(''+illl1i,ilIII1(0x53f,'#Hlj'));continue;}break;}}let iiiIl1=ilIII1(0x649,'74gd')+$[ilIII1(0x333,'$@pn')];!(async()=>{const lliliI=ilIII1,lIi1II={'elEeZ':function(IllI1,iiiIil){return IllI1+iiiIil;},'UEiYA':'【京东账号','uMFnr':lliliI(0x3b6,'uMIj'),'huryO':function(lilll){return lilll();},'NhBAO':lliliI(0x398,'2L8r'),'mErne':lliliI(0x5fb,'#JGX'),'Idjzk':function(l1iilI,lilli){return l1iilI+lilli;},'jTBts':function(iiII,Iil11){return iiII===Iil11;},'KDkoG':lliliI(0x609,'i[!8'),'Curxr':lliliI(0x4c9,'Tyjp'),'tzmfd':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','qeALS':'https://bean.m.jd.com/','meSff':function(Ill1iI,i1Ii1l){return Ill1iI===i
2023-07-28 21:29:02 +08:00
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 &&