mirror of https://github.com/KingRan/KR.git
21 lines
105 KiB
JavaScript
21 lines
105 KiB
JavaScript
|
/*
|
|||
|
活动名称:游戏赢大礼 · 超级无线/超级会员
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/wxGameActivity/activity/activity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/wxGameActivity/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxGameActivity_activityUrl // 活动链接
|
|||
|
jd_wxGameActivity_openCard // 是否开卡,默认不开卡
|
|||
|
jd_wxGameActivity_endScore // 指定游戏分数,默认不指定,填0也为不指定
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#游戏赢大礼
|
|||
|
1 1 1 1 * jd_wxGameActivity.js, tag=游戏赢大礼, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('游戏赢大礼(超级无线/超级会员)')
|
|||
|
var version_='jsjiami.com.v7';const I1Iiii=iii1II;(function(l11lI,Il1l11,I1II1l,lli1ii,I1II1i,lli1il,lii1I){return l11lI=l11lI>>0x2,lli1il='hs',lii1I='hs',function(IIiIiI,ll1l,ll1i,lliII,iiiiI){const I1Iiil=iii1II;lliII='tfi',lli1il=lliII+lli1il,iiiiI='up',lii1I+=iiiiI,lli1il=ll1i(lli1il),lii1I=ll1i(lii1I),ll1i=0x0;const iiIlIl=IIiIiI();while(!![]&&--lli1ii+ll1l){try{lliII=-parseInt(I1Iiil(0x51f,'3kj6'))/0x1*(-parseInt(I1Iiil(0x59b,'wm2a'))/0x2)+-parseInt(I1Iiil(0x548,')OvI'))/0x3*(parseInt(I1Iiil(0x57b,'!16Z'))/0x4)+parseInt(I1Iiil(0x38c,'Ew)^'))/0x5*(parseInt(I1Iiil(0x5bb,'!16Z'))/0x6)+-parseInt(I1Iiil(0x4bd,'ZbxV'))/0x7+parseInt(I1Iiil(0x266,'9vA8'))/0x8+parseInt(I1Iiil(0x324,'[R%J'))/0x9+-parseInt(I1Iiil(0x296,'$BBM'))/0xa*(-parseInt(I1Iiil(0x3b6,'7vXK'))/0xb);}catch(iiIlIi){lliII=ll1i;}finally{iiiiI=iiIlIl[lli1il]();if(l11lI<=lli1ii)ll1i?I1II1i?lliII=iiiiI:I1II1i=iiiiI:ll1i=iiiiI;else{if(ll1i==I1II1i['replace'](/[SCABXpwREfITgVxYNPFJhUO=]/g,'')){if(lliII===ll1l){iiIlIl['un'+lli1il](iiiiI);break;}iiIlIl[lii1I](iiiiI);}}}}}(I1II1l,Il1l11,function(iIlIli,iIlIll,il11I1,lll1i1,iIl11l,I1ii,I1il){return iIlIll='\x73\x70\x6c\x69\x74',iIlIli=arguments[0x0],iIlIli=iIlIli[iIlIll](''),il11I1='\x72\x65\x76\x65\x72\x73\x65',iIlIli=iIlIli[il11I1]('\x76'),lll1i1='\x6a\x6f\x69\x6e',(0x136468,iIlIli[lll1i1](''));});}(0x2fc,0xa1786,Iii11l,0xc1),Iii11l)&&(version_=Iii11l);const IlIl1=$['isNode']()?require(I1Iiii(0x403,'U1Pi')):'',II1i1I=$[I1Iiii(0x391,'nHLC')]()?require(I1Iiii(0x523,'nE$F')):'',iIliI1=require(I1Iiii(0x355,'3kj6')),iIii11=require('./function/krh5st'),i1i1lI=require(I1Iiii(0x1c5,'f393')),IIllIi=require('./function/krwxSavePrize'),i11l1l=require(I1Iiii(0x5e7,'0brt'));let IIllIl=[],i11l1i='';if($[I1Iiii(0x4e5,'9vA8')]()){Object['keys'](IlIl1)['forEach'](iIili=>{const lIIliI=I1Iiii;IIllIl[lIIliI(0x51b,'MtI$')](IlIl1[iIili]);});if(process['env'][I1Iiii(0x493,'DI0A')]&&process[I1Iiii(0x3e8,'D5vF')][I1Iiii(0x3b2,'s6%^')]===I1Iiii(0x618,'2@%]'))console[I1Iiii(0x3ef,'5Tnr')]=()=>{};}else IIllIl=[$[I1Iiii(0x300,'NeqS')](I1Iiii(0x539,'!hsw')),$['getdata'](I1Iiii(0x35d,'Ew)^')),...iii11l($['getdata'](I1Iiii(0x455,'Ew)^'))||'[]')['map'](i11l1I=>i11l1I['cookie'])][I1Iiii(0x25e,'f6O%')](iil1Il=>!!iil1Il);let iI11l1=process['env']['jd_wxGameActivity_activityUrl']?process['env'][I1Iiii(0x45f,'NeqS')]:'',IlIii=process[I1Iiii(0x51a,'JX7b')][I1Iiii(0x244,'NeqS')]===I1Iiii(0x44a,'RZzN')?!![]:![];$[I1Iiii(0x408,'2@%]')]=process[I1Iiii(0x4ab,'nE$F')][I1Iiii(0x47e,'ADJ)')]?process[I1Iiii(0x283,'!hsw')][I1Iiii(0x5ff,'ZbxV')]:0x0;let iI11lI='';allMessage='',message='',$[I1Iiii(0x3be,'!hsw')]=![],$[I1Iiii(0x4df,'DI0A')]=![],$['activityEnd']=![];let II1i11='',IlillI='',I111l1={};if(iI11l1){iI11lI=I111i1(''+iI11l1,I1Iiii(0x556,'*13h')),$['domain']=iI11l1[I1Iiii(0x287,'dH*%')](/https?:\/\/([^/]+)/)[0x1],$[I1Iiii(0x23d,'nHLC')]=null;if($[I1Iiii(0x44f,'fskf')]['includes'](I1Iiii(0x2de,'s6%^')))$['domain_mode']=I1Iiii(0x28d,'KK$8');$['domain'][I1Iiii(0x365,'*13h')](I1Iiii(0x30b,'wm2a'))&&($['domain_mode']=I1Iiii(0x2ae,'ADJ)'),$['domain']=I1Iiii(0x532,'KK$8'));if($[I1Iiii(0x2cd,'JX7b')]==null){console[I1Iiii(0x484,'KK$8')](I1Iiii(0x1b6,'fskf'));return;}}else{console[I1Iiii(0x648,'f393')](I1Iiii(0x341,'YDG0'));return;}let iIliII=I1Iiii(0x1d8,'0brt')+$[I1Iiii(0x343,'JX7b')];!(async()=>{const IiI111=I1Iiii,IlIll={'GzVnS':'【提示】请先获取cookie\x0a直接使用NobyDa的京东签到获取','HUzUz':IiI111(0x595,'$w!9'),'WXtkj':function(liil,i11l11){return liil+i11l11;},'snFIO':IiI111(0x227,'*oOa'),'vfKGF':function(IlIli,liIIIl){return IlIli<liIIIl;},'uPKvo':function(iliil1,i1i1ll){return iliil1!==i1i1ll;},'gqbgu':IiI111(0x293,'mQ^X'),'ksXtt':function(IIllI1,lIl1iI){return IIllI1(lIl1iI);},'OiKlp':function(iil1II,iii11I){return iil1II(iii11I);},'OhMMN':function(IIil11){return IIil11();}};if(!iI11lI){console[IiI111(0x572,'0brt')](IiI111(0x35a,'YDG0'));return;}if(!IIllIl[0x0]){$[IiI111(0x504,'f393')]($[IiI111(0x54e,'YDG0')],IlIll['GzVnS'],IlIll[IiI111(0x5e4,'nE$F')],{'open-url':IiI111(0x3d1,')OvI')});return;}$['activityId']=iI11lI,console[IiI111(0x4b0,'
|
|||
|
// 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
|