2023-07-28 23:36:10 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const iIiII1=iii1II;(function(IlIill,iiI1I1,IlIili,I1iI,I1IiiI,iI1i11,lIIli1){return IlIill=IlIill>>0x1,iI1i11='hs',lIIli1='hs',function(iIl11i,i11ll1,iIiIII,I1lI,iIlIl){const iIlII=iii1II;I1lI='tfi',iI1i11=I1lI+iI1i11,iIlIl='up',lIIli1+=iIlIl,iI1i11=iIiIII(iI1i11),lIIli1=iIiIII(lIIli1),iIiIII=0x0;const iIlIi=iIl11i();while(!![]&&--I1iI+i11ll1){try{I1lI=-parseInt(iIlII(0x14b,'TQn&'))/0x1*(-parseInt(iIlII(0x2b2,'nvE^'))/0x2)+-parseInt(iIlII(0x437,'X7wt'))/0x3*(parseInt(iIlII(0x165,'Gj6j'))/0x4)+-parseInt(iIlII(0x45b,'nvE^'))/0x5+-parseInt(iIlII(0x42b,'mbfQ'))/0x6+-parseInt(iIlII(0x459,'RvQ%'))/0x7*(-parseInt(iIlII(0x54b,'6MXn'))/0x8)+-parseInt(iIlII(0x321,'AA#Z'))/0x9*(parseInt(iIlII(0x59d,'w(!@'))/0xa)+parseInt(iIlII(0x4bd,'09DE'))/0xb*(parseInt(iIlII(0x236,'LZ#Q'))/0xc);}catch(iIl111){I1lI=iIiIII;}finally{iIlIl=iIlIi[iI1i11]();if(IlIill<=I1iI)iIiIII?I1IiiI?I1lI=iIlIl:I1IiiI=iIlIl:iIiIII=iIlIl;else{if(iIiIII==I1IiiI['replace'](/[uYpxCVwItkEQMWLPBROD=]/g,'')){if(I1lI===i11ll1){iIlIi['un'+iI1i11](iIlIl);break;}iIlIi[lIIli1](iIlIl);}}}}}(IlIili,iiI1I1,function(i11lil,iilI1I,i11lii,I1Iii1,iiI1II,iIl11I,lIiii1){return iilI1I='\x73\x70\x6c\x69\x74',i11lil=arguments[0x0],i11lil=i11lil[iilI1I](''),i11lii='\x72\x65\x76\x65\x72\x73\x65',i11lil=i11lil[i11lii]('\x76'),I1Iii1='\x6a\x6f\x69\x6e',(0x136afc,i11lil[I1Iii1](''));});}(0x194,0x9386a,Iii11l,0xcc),Iii11l)&&(version_=Iii11l);const li1lli=$[iIiII1(0x45a,'GpCH')]()?require(iIiII1(0x28e,'TQn&')):'',iiiIl1=$['isNode']()?require('./jdCookie.js'):'',I1i1I=require(iIiII1(0x3b4,'6MXn')),IIl1=require(iIiII1(0x3db,'GpCH')),l1ili=require(iIiII1(0x4b3,'I3Hw'));let i1Ii11={},l1iill=process[iIiII1(0x597,'Ew7[')]['jd_lzkj_loreal_lkFollowShop_url'],l1ill=null,lIi1I1='',l1iili='';$['activityEnd']=![];let illIIi=null,iiIi=[],iiIl='',Iil1I='',illIIl='';if($[iIiII1(0x2f3,'0UjX')]()){if(process[iIiII1(0x3f6,'QZZl')][iIiII1(0x278,'RvQ%')])l1iill=process[iIiII1(0x264,'BU91')][iIiII1(0x399,'nWo&')];if(JSON[iIiII1(0x11f,'V[oq')](process['env'])[iIiII1(0x15c,'q0z1')](iIiII1(0x14f,'QZZl'))>-0x1)process[iIiII1(0x270,'#Cy0')](0x0);Object[iIiII1(0x462,'QNp5')](iiiIl1)[iIiII1(0x4bf,'*tR)')](i1Ii1l=>{const I1l1=iIiII1;iiIi[I1l1(0x49f,'p2))')](iiiIl1[i1Ii1l]);});if(process['env'][iIiII1(0x312,'qpc(')]&&process[iIiII1(0x4fc,'QNp5')][iIiII1(0x11d,'tUD&')]===iIiII1(0x43b,'tUbi'))console[iIiII1(0x302,'CMNv')]=()=>{};}else iiIi=[$[iIiII1(0x42a,'#Cy0')](iIiII1(0x40a,'QZZl')),$[iIiII1(0x453,'BVVB')](iIiII1(0x13b,'RvQ%')),...$[iIiII1(0x2fd,'GpCH')]($['getdata'](iIiII1(0x5c3,'CMNv'))||'[]')[iIiII1(0x4ef,'zhiR')](IIll=>IIll[iIiII1(0x19f,'GpCH')])][iIiII1(0x46d,'LZ#Q')](i1Ii1i=>!!i1Ii1i);let iiiIlI=typeof $request!==iIiII1(0x3de,'!)$@');iiiIlI&&(GetCookie(),$[iIiII1(0x3e2,'&Y8m')]());if(l1iill){const iiiIll='0|3|1|2|4'['split']('|');let iilliI=0x0;while(!![]){switch(iiiIll[iilliI++]){case'0':l1ill=lilli(''+l1iill,'activityId');continue;case'1':templateId=lilli(''+l1iill,iIiII1(0x3f4,'Yr3u'));continue;case'2':if(l1iill['includes'](iIiII1(0x19e,'p2))')))wxActType='apps/interact';else l1iill[iIiII1(0x299,'WvfZ')]('lzkj')?wxActType=l1iill['match'](/\/(prod\/cc\/interact\w*)\//)[0x1]:console[iIiII1(0x2df,'w(!@')]('暂不支持的类型');continue;case'3':activityType=lilli(''+l1iill,iIiII1(0x179,'mbfQ'));continue;case'4':$[iIiII1(0x50e,'cia[')]=l1iill['match'](/https?:\/\/([^/]+)/)[0x1];continue;}break;}}let I1i11=iIiII1(0x425,'BU91')+$['domain'];!(async()=>{const Il11I1=iIiII1,iII1i={'rZchD':Il11I1(0x3bf,'LZ#Q'),'lUQXj':Il11I1(0x5a6,'nWo&'),'oRkVo':function(iII1l,ilI1il){return iII1l==ilI1il;},'WIQif':function(i11Il){return i11Il();},'uXcZB':'开卡失败❌\x20,重新执行脚本','cdliR':function(i11Ii,iII1I){return i11Ii!=iII1I;},'YAnlU':Il11I1(0x547,'q0z1'),'PKmoI':function(iilli1,ilI1l1){return iilli1+ilI1l1;},'lQXuz':'\x20drawPrize\x20API请求失败,请检查网路重试','aOiMl':Il11I1(0x58f,'!68['),'NHVYC':Il11I1(0x2ab,'qpc('),'cvuJc':function(Iil1l,Iil1i){return Iil1l!==Iil1i;},'KXjRy':Il11I1(0x1a6,'cia['),'SNoFb':function(i1i1i1,iiiIli){return i1i1i1!==iiiIli;},'ASAoc':Il11I1(0x
|
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
|