KR/jd_fans_fansactiveall.js

17 lines
40 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
粉丝福利红包
远程更新看频道通知
变量jd_fans_fansactiveall_id // 活动链接 "
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#粉丝福利红包
1 1 1 1 * jd_fans_fansactiveall.js, tag=粉丝福利红包, enabled=true
*/
const $ = new Env('粉丝福利红包');
var version_='jsjiami.com.v7';const IIIlI=iii1II;(function(III11i,i1lIil,III11l,llIl1i,llIl1l,IiiII,Iiil){return III11i=III11i>>0x3,IiiII='hs',Iiil='hs',function(IIIli,ii1i1,Iiii,llIl11,IIIll){const IIIlIl=iii1II;llIl11='tfi',IiiII=llIl11+IiiII,IIIll='up',Iiil+=IIIll,IiiII=Iiii(IiiII),Iiil=Iiii(Iiil),Iiii=0x0;const I1I1il=IIIli();while(!![]&&--llIl1i+ii1i1){try{llIl11=-parseInt(IIIlIl(0x1b7,'g@bO'))/0x1+parseInt(IIIlIl(0x197,'DeR!'))/0x2*(-parseInt(IIIlIl(0x130,'KjZt'))/0x3)+parseInt(IIIlIl(0x1ff,'fbaX'))/0x4*(parseInt(IIIlIl(0x1e8,'lqAQ'))/0x5)+parseInt(IIIlIl(0x15e,'v#5i'))/0x6*(-parseInt(IIIlIl(0x1ae,'lqAQ'))/0x7)+parseInt(IIIlIl(0x199,'y]Sz'))/0x8*(-parseInt(IIIlIl(0x1e3,']mM*'))/0x9)+parseInt(IIIlIl(0x210,'hZ#A'))/0xa+parseInt(IIIlIl(0x20e,'9sQE'))/0xb;}catch(l1llii){llIl11=Iiii;}finally{IIIll=I1I1il[IiiII]();if(III11i<=llIl1i)Iiii?llIl1l?llIl11=IIIll:llIl1l=IIIll:Iiii=IIIll;else{if(Iiii==llIl1l['replace'](/[QrXgbJNyuIklTRxDeAHEG=]/g,'')){if(llIl11===ii1i1){I1I1il['un'+IiiII](IIIll);break;}I1I1il[Iiil](IIIll);}}}}}(III11l,i1lIil,function(liII1,I1I1ii,l1llil,IIIlIi,llIl1I,i1lIl1,liIli1){return I1I1ii='\x73\x70\x6c\x69\x74',liII1=arguments[0x0],liII1=liII1[I1I1ii](''),l1llil='\x72\x65\x76\x65\x72\x73\x65',liII1=liII1[l1llil]('\x76'),IIIlIi='\x6a\x6f\x69\x6e',(0x13669e,liII1[IIIlIi](''));});}(0x600,0xda9e4,Iii11l,0xc2),Iii11l)&&(version_=Iii11l);const Iiilil=$[IIIlI(0x1b1,'TW#4')]()?require(IIIlI(0x163,'^DHL')):'',Iil1ll=$[IIIlI(0x168,'dc@4')]()?require('./jdCookie.js'):'';CryptoJS=$[IIIlI(0x1cb,'eT1o')]()?require(IIIlI(0x14b,'zjYB')):CryptoJS;const iillI=require('./function/krgetToken');let lI1III=process[IIIlI(0x23e,'LgtV')][IIIlI(0x126,'U@c#')]?process['env']['jd_fans_fansactiveall_id']:'',IIliIi=[],IllIiI='';if($['isNode']()){Object[IIIlI(0x200,'rR3p')](Iil1ll)[IIIlI(0x1d9,'y]Sz')](iill1=>{const IiiI=IIIlI;IIliIi[IiiI(0x15f,'DeR!')](Iil1ll[iill1]);});if(process[IIIlI(0x174,'0FdZ')][IIIlI(0x211,'hiHU')]&&process['env'][IIIlI(0x171,'eT1o')]===IIIlI(0x183,'lnYE'))console['log']=()=>{};}else IIliIi=[$[IIIlI(0x1a4,'TW#4')](IIIlI(0x146,'xq5q')),$[IIIlI(0x11a,'hZ#A')](IIIlI(0x16c,'M4w1')),...I1iII1($[IIIlI(0x224,'v#5i')]('CookiesJD')||'[]')[IIIlI(0x23f,'o%LH')](iii1l1=>iii1l1[IIIlI(0x11e,'rR3p')])]['filter'](IIliIl=>!!IIliIl);let i1il1=Date[IIIlI(0x177,'hZIj')](),I1l111='';lI1III&&(activityId=lilII1(''+lI1III,'qwer'));!(async()=>{const iIi1i=IIIlI,II11ll={'dYbka':function(liiI1I,ililII){return liiI1I!=ililII;},'OfuMe':function(lI1II1,i1ilII){return lI1II1+i1ilII;},'IwfgY':function(iIIii1,IllIi1){return iIIii1+IllIi1;},'FbshA':iIi1i(0x158,'q3Du'),'LiAbh':'获得:空气','PbKmz':function(lilIII,Ii1ilI){return lilIII(Ii1ilI);},'wfqOv':function(II11i1,iliIil){return II11i1||iliIil;},'CdVHh':function(iliIii,lill1i){return iliIii+lill1i;},'IuLXf':function(il1li,iIIill){return il1li+iIIill;},'qKMCg':iIi1i(0x18f,'U@c#'),'ynDfO':function(iilii,Ill11i){return iilii(Ill11i);},'nsgLS':iIi1i(0x245,'$k$!'),'OhmiM':'❖\x20远程获取数据中...\x0a❖\x20数据获取正常...\x0a','KAlrF':function(iilil,Ill11l){return iilil<Ill11l;},'AntXT':iIi1i(0x213,'y]Sz'),'NySWm':function(il1ll,i1ilIi){return il1ll===i1ilIi;},'EohWv':iIi1i(0x1d6,')@iE'),'RgCCU':'\x0a暂无活动~\x0a','VrPew':iIi1i(0x120,'dc@4'),'kKKoA':function(lill1l,l1l1i1){return lill1l===l1l1i1;},'hCHQZ':iIi1i(0x1ab,'Ve0p'),'CSTjd':function(i1iiI,i1ilIl){return i1iiI(i1ilIl);},'diJSK':iIi1i(0x143,'zjYB'),'ennat':iIi1i(0x217,'M4w1'),'rQyzn':iIi1i(0x21b,'[5be'),'MRjnU':'mRGIX','ERGMx':iIi1i(0x176,'KPh1'),'zNRbk':function(llI11I){return llI11I();},'BczxQ':function(Il1i11,iii1li){return Il1i11!==iii1li;},'DLtCA':'LDamg'};if(!IIliIi[0x0]){$[iIi1i(0x17a,'EG6x')]($[iIi1i(0x216,'0m6!')],'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取',II11ll[iIi1i(0x131,'EG6x')],{'open-url':iIi1i(0x12e,'GsH5')});return;}authorCodeList=await II11ll[iIi1i(0x129,'O[x(')](IIii1i,II11ll['nsgLS']);if(authorCodeList){console['log'](II11ll[iIi1i(0x13c,'^DHL')]);for(let Iil1i1=0x0;II11ll[iIi1i(0x221,'rR3p')](Iil1i1,authorCodeList[iIi1i(0x240,'O[x(')]);Iil1i1++){c
// 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