mirror of https://github.com/KingRan/KR.git
30 lines
72 KiB
JavaScript
30 lines
72 KiB
JavaScript
|
/*
|
|||
|
a2集成长值赢千元礼包
|
|||
|
|
|||
|
任务本,邀请不清楚,抽奖概率豆子
|
|||
|
|
|||
|
变量:jd_a2_id // 活动id 7月id:export jd_a2_id="2307100000664403"
|
|||
|
变量:opencard_draw // 抽奖次数 export opencard_draw="3"
|
|||
|
|
|||
|
————————————————
|
|||
|
入口:[ a2集成长值赢千元礼包 ]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
过10分钟再执行
|
|||
|
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#a2集成长值赢千元礼包
|
|||
|
11 11 11 11 * jd_a2.js, tag=a2集成长值赢千元礼包, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('a2集成长值赢千元礼包');
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const i1IiI1=iii1II;(function(iliii1,i1IiI,lIllil,iilIi1,I111,I1I11l,I1I11i){return iliii1=iliii1>>0x5,I1I11l='hs',I1I11i='hs',function(l1iI1l,III1ll,l1lIIi,iII11I,IiIii1){const iII11l=iii1II;iII11I='tfi',I1I11l=iII11I+I1I11l,IiIii1='up',I1I11i+=IiIii1,I1I11l=l1lIIi(I1I11l),I1I11i=l1lIIi(I1I11i),l1lIIi=0x0;const l1lIIl=l1iI1l();while(!![]&&--iilIi1+III1ll){try{iII11I=parseInt(iII11l(0x415,'gIj!'))/0x1+parseInt(iII11l(0x28f,'T(]P'))/0x2+-parseInt(iII11l(0x171,'[*94'))/0x3+-parseInt(iII11l(0x129,'%]a]'))/0x4+-parseInt(iII11l(0x242,'9lGl'))/0x5*(parseInt(iII11l(0x3ee,'Hp$b'))/0x6)+-parseInt(iII11l(0x3a8,'gIj!'))/0x7+parseInt(iII11l(0x300,'1zSm'))/0x8;}catch(i1lIl){iII11I=l1lIIi;}finally{IiIii1=l1lIIl[I1I11l]();if(iliii1<=iilIi1)l1lIIi?I111?iII11I=IiIii1:I111=IiIii1:l1lIIi=IiIii1;else{if(l1lIIi==I111['replace'](/[NyIWuUPJTGnkDMQeEVBx=]/g,'')){if(iII11I===III1ll){l1lIIl['un'+I1I11l](IiIii1);break;}l1lIIl[I1I11i](IiIii1);}}}}}(lIllil,i1IiI,function(i1lIi,iilIiI,III1li,Ili1iI,lIlll1,Ili1i1,I1I11I){return iilIiI='\x73\x70\x6c\x69\x74',i1lIi=arguments[0x0],i1lIi=i1lIi[iilIiI](''),III1li='\x72\x65\x76\x65\x72\x73\x65',i1lIi=i1lIi[III1li]('\x76'),Ili1iI='\x6a\x6f\x69\x6e',(0x1360f0,i1lIi[Ili1iI](''));});}(0x1880,0xbfe26,Iii11l,0xc6),Iii11l)&&(version_=Iii11l);const IiIiI1=$[i1IiI1(0x2c0,'(Vfm')]()?require(i1IiI1(0x1cc,'NGPH')):'',iIIlii=$[i1IiI1(0x2f4,'!zUz')]()?require(i1IiI1(0x163,')1nv')):'',llIII1=require('./function/krgetToken'),IiIiI=require('./function/krgetua'),iill1I=require(i1IiI1(0x230,'Ibbu')),Illi1=require(i1IiI1(0x36a,'Hp$b'));let l1iiIl='https://lzkjdz-isv.isvjcloud.com',lIIi1i=process['env'][i1IiI1(0x355,'gIj!')]?process[i1IiI1(0x39a,'erZh')]['jd_a2_id']:'',liI11I=$[i1IiI1(0x3ff,'%3$A')]()?process[i1IiI1(0x3c3,'(Vfm')]['opencard_draw']?process['env'][i1IiI1(0x2dd,'l4]i')]:'10':$[i1IiI1(0x3d2,'JJV4')](i1IiI1(0xe7,'(rpO'))?$[i1IiI1(0x1ed,'gIj!')](i1IiI1(0x3bb,'!zeg')):'10',III1={},l1IIl1=[],l1iiIi='';if($[i1IiI1(0x378,'AZt$')]()){Object[i1IiI1(0xf4,'9lGl')](IiIiI1)[i1IiI1(0x224,'l4]i')](lIIi1I=>{const l1lIII=i1IiI1;l1IIl1[l1lIII(0x39c,'T(]P')](IiIiI1[lIIi1I]);});if(process[i1IiI1(0x1d0,'bR)0')]['JD_DEBUG']&&process['env']['JD_DEBUG']===i1IiI1(0x32b,'zt(4'))console[i1IiI1(0x259,'@)hd')]=()=>{};}else l1IIl1=[$['getdata']('CookieJD'),$['getdata'](i1IiI1(0x389,'qg]z')),...l1IIii($[i1IiI1(0x405,'ZeWe')](i1IiI1(0x149,'1zSm'))||'[]')[i1IiI1(0x2ae,'%]a]')](l1IIil=>l1IIil[i1IiI1(0x28d,'ybz^')])][i1IiI1(0x2c2,'Ka$8')](l1iiII=>!!l1iiII);allMessage='',message='',$[i1IiI1(0x18c,'%3$A')]=![],$['outFlag']=![],$[i1IiI1(0x3be,'NGPH')]=![];let lIIi1l='',I1lI1i='',illili=i1IiI1(0x1ea,'6YV7')+lIIi1i+'/';!(async()=>{const iII11i=i1IiI1,I1lI1I={'ZJcho':function(lIi1i1,l1l11){return lIi1i1!=l1l11;},'KEvPh':iII11i(0x1d7,'@)hd'),'jAciW':iII11i(0x1fd,'gIj!'),'PlrND':iII11i(0x27a,'jh5W'),'azaxi':iII11i(0x25a,'jh5W'),'qIgxn':iII11i(0x1bf,'AZt$'),'FGtYs':iII11i(0x2d3,'ybz^'),'dJPzK':function(illill,IIIli1){return illill+IIIli1;},'qfsOk':iII11i(0x365,'ZeWe'),'JNjbz':function(I1lI11,I1I1Il){return I1lI11<I1I1Il;},'DcGUB':function(l1l1I,iIlI1I){return l1l1I+iIlI1I;},'Qcbxr':function(I1I1Ii,IiIl1){return I1I1Ii+IiIl1;},'eQguo':function(IIIl,IIIi){return IIIl+IIIi;},'EByDR':'\x0a******开始【京东账号','kaajA':iII11i(0x150,'JJV4'),'IHrDb':function(l1IIli,iII1I1){return l1IIli(iII1I1);},'MVfor':function(iiiIIi,lIi1iI){return iiiIIi==lIi1iI;},'vXogt':function(l1IIll,iiiIIl){return l1IIll!==iiiIIl;},'iGoYQ':iII11i(0x2aa,'jh5W'),'Xzvuh':iII11i(0x318,'mmBN')};if(!l1IIl1[0x0]){$[iII11i(0xfd,'bR)0')]($[iII11i(0x3fc,'AZt$')],iII11i(0x1b7,')JZQ'),I1lI1I['jAciW'],{'open-url':iII11i(0x261,'!)tW')});return;}authorCodeList=await llIill(I1lI1I[iII11i(0x28e,'QSN2')]);if(authorCodeList){console[iII11i(0x311,'6YV7')](I1lI1I[iII11i(0x119,'QSN2')]);for(let lIIi11=0x0;lIIi11<authorCodeList['length'];lIIi11++){console[iII11i(0x3a3,'erZh')](iII11i(0x3cf,'AZt$')+(lIIi11+0x1)+iII11i(0x344,'ZeWe')+authorCodeList[lIIi11]+'\x22');}}else console[iII11i(0x36f,'T(]P')](I1lI1I[iII11i(0x30a,'[*94')]);if(!lIIi1i){console[iII11i(0x2e2,'@p2T')]('\x0a
|
|||
|
|
|||
|
// 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
|
|||
|
|