KR/jd_lzkj_loreal_share.js

22 lines
121 KiB
JavaScript
Raw Permalink Normal View History

2023-08-06 19:11:07 +08:00
/**
活动名称分享有礼超级无线欧莱雅
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10043>&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
支持activityType (10043)
环境变量
jd_lzkj_loreal_share_url // 活动链接
jd_lzkj_loreal_share_helpnum // 账号数 默认助力前3账号需要助力其他请自行设置变量
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#lzkj_loreal分享有礼
1 1 1 1 * jd_lzkj_loreal_share.js, tag=lzkj_loreal分享有礼, enabled=true
*/
const $ = new Env("分享有礼lzkj_loreal");
var version_='jsjiami.com.v7';const lIii=iii1II;(function(lIiil,iII1ll,I1111i,iliiI,lIil1,Il1lII,iiiill){return lIiil=lIiil>>0x6,Il1lII='hs',iiiill='hs',function(IIl1iI,Ii11ii,llllll,llIl,l111iI){const IIi11=iii1II;llIl='tfi',Il1lII=llIl+Il1lII,l111iI='up',iiiill+=l111iI,Il1lII=llllll(Il1lII),iiiill=llllll(iiiill),llllll=0x0;const llIi=IIl1iI();while(!![]&&--iliiI+Ii11ii){try{llIl=-parseInt(IIi11(0x2bf,'j$tH'))/0x1+parseInt(IIi11(0x1b8,'^Uv*'))/0x2*(-parseInt(IIi11(0x666,'mO&z'))/0x3)+parseInt(IIi11(0x632,'mB%m'))/0x4+-parseInt(IIi11(0x37d,'0bL7'))/0x5*(parseInt(IIi11(0x5c1,']5L2'))/0x6)+parseInt(IIi11(0x3f1,'akee'))/0x7+parseInt(IIi11(0x253,'0bL7'))/0x8*(parseInt(IIi11(0x55e,'n6i2'))/0x9)+-parseInt(IIi11(0x492,'0jZq'))/0xa*(parseInt(IIi11(0x4ca,'W(P2'))/0xb);}catch(Ii11il){llIl=llllll;}finally{l111iI=llIi[Il1lII]();if(lIiil<=iliiI)llllll?lIil1?llIl=l111iI:lIil1=l111iI:llllll=l111iI;else{if(llllll==lIil1['replace'](/[YSWEhueBLNgbXKQIOMJ=]/g,'')){if(llIl===Ii11ii){llIi['un'+Il1lII](l111iI);break;}llIi[iiiill](l111iI);}}}}}(I1111i,iII1ll,function(ilii1,I11lI1,li1l1I,Il1lI1,lIll11,iIlIIl,ilIl11){return I11lI1='\x73\x70\x6c\x69\x74',ilii1=arguments[0x0],ilii1=ilii1[I11lI1](''),li1l1I='\x72\x65\x76\x65\x72\x73\x65',ilii1=ilii1[li1l1I]('\x76'),Il1lI1='\x6a\x6f\x69\x6e',(0x137ffd,ilii1[Il1lI1](''));});}(0x3100,0xe3dc8,Iii11l,0xc6),Iii11l)&&(version_=Iii11l);const iiii1=$['isNode']()?require('./sendNotify'):'',l1li1I=$[lIii(0x21c,'Ft($')]()?require('./jdCookie.js'):'',iIlli1=require('./function/krgetToken'),I1IIIl=require(lIii(0x22c,'72fT')),il1IlI=require('./function/krgetua');let I1IIIi={},lI11=process['env']['jd_lzkj_loreal_share_url'],li11I1=0x3;process[lIii(0x401,'^Uv*')][lIii(0x60d,']Mr(')]&&process[lIii(0x6cc,'ib!$')]['jd_lzkj_loreal_share_helpnum']!=''&&(li11I1=process['env'][lIii(0x411,'%ynT')]);let i1I111=[],l1li11=[],il1Il1=[],li11II=!![],Ii1li=null,iIiIli='',iIllI='';$['activityEnd']=![];function iii1II(_0x4dbb7e,_0x5e5896){const _0x26e1d3=Iii11l();return iii1II=function(_0x53d6da,_0x5a834a){_0x53d6da=_0x53d6da-0x193;let _0x4cc4f6=_0x26e1d3[_0x53d6da];if(iii1II['HwcmBj']===undefined){var _0x36155c=function(_0xa99c16){const _0x4ab9d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5abdc2='',_0x59436c='';for(let _0x490323=0x0,_0x2822f7,_0x614eb2,_0x256e19=0x0;_0x614eb2=_0xa99c16['charAt'](_0x256e19++);~_0x614eb2&&(_0x2822f7=_0x490323%0x4?_0x2822f7*0x40+_0x614eb2:_0x614eb2,_0x490323++%0x4)?_0x5abdc2+=String['fromCharCode'](0xff&_0x2822f7>>(-0x2*_0x490323&0x6)):0x0){_0x614eb2=_0x4ab9d8['indexOf'](_0x614eb2);}for(let _0x29ef90=0x0,_0x3f28cd=_0x5abdc2['length'];_0x29ef90<_0x3f28cd;_0x29ef90++){_0x59436c+='%'+('00'+_0x5abdc2['charCodeAt'](_0x29ef90)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x59436c);};const _0x204f47=function(_0x3a9455,_0x5829b2){let _0x1121f9=[],_0x4a7ad6=0x0,_0x52245f,_0x3c870c='';_0x3a9455=_0x36155c(_0x3a9455);let _0x117562;for(_0x117562=0x0;_0x117562<0x100;_0x117562++){_0x1121f9[_0x117562]=_0x117562;}for(_0x117562=0x0;_0x117562<0x100;_0x117562++){_0x4a7ad6=(_0x4a7ad6+_0x1121f9[_0x117562]+_0x5829b2['charCodeAt'](_0x117562%_0x5829b2['length']))%0x100,_0x52245f=_0x1121f9[_0x117562],_0x1121f9[_0x117562]=_0x1121f9[_0x4a7ad6],_0x1121f9[_0x4a7ad6]=_0x52245f;}_0x117562=0x0,_0x4a7ad6=0x0;for(let _0x4f0b6b=0x0;_0x4f0b6b<_0x3a9455['length'];_0x4f0b6b++){_0x117562=(_0x117562+0x1)%0x100,_0x4a7ad6=(_0x4a7ad6+_0x1121f9[_0x117562])%0x100,_0x52245f=_0x1121f9[_0x117562],_0x1121f9[_0x117562]=_0x1121f9[_0x4a7ad6],_0x1121f9[_0x4a7ad6]=_0x52245f,_0x3c870c+=String['fromCharCode'](_0x3a9455['charCodeAt'](_0x4f0b6b)^_0x1121f9[(_0x1121f9[_0x117562]+_0x1121f9[_0x4a7ad6])%0x100]);}return _0x3c870c;};iii1II['vOqrjz']=_0x204f47,_0x4dbb7e=arguments,iii1II['HwcmBj']=!![];}const _0x10df10=_0x26e1d3[0x0],_0x1bde3d=_0x53d6da+_0x10df10,_0x54748e=_0x4dbb7e[_0x1bde3d];return!_0x54748e?(iii1II['tWVTdP']===undefined&&(iii1II['tWVTdP']=!![]),_0x4cc4f6=iii1II['vOqrjz'](_0x4cc4f6,_0x5a834a),_0x4dbb7e[_0x1bde3d]=_0x4cc4f6):_0x4cc4f6=_0x54748e,_0x4cc4f6;},iii1II(_0x4dbb7e,_0x5e5896);}let iIiIl1=null
// prettier-ignore
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