mirror of https://github.com/KingRan/KR.git
27 lines
64 KiB
JavaScript
27 lines
64 KiB
JavaScript
|
/*
|
|||
|
蒙牛积分抽奖
|
|||
|
|
|||
|
抽奖本 99积分抽一次
|
|||
|
|
|||
|
变量:jd_mengniu_id // 活动id 8月id:export jd_mengniu_id="dzafc981cb4f499745f04ca689b1e5"
|
|||
|
变量:opencard_draw // 抽奖次数 export opencard_draw="3"
|
|||
|
|
|||
|
————————————————
|
|||
|
入口:[ 蒙牛积分抽奖 ]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
过10分钟再执行
|
|||
|
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#蒙牛积分抽奖
|
|||
|
11 11 11 11 * jd_mengniu_draw.js, tag=蒙牛积分抽奖, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('蒙牛积分抽奖')
|
|||
|
var version_='jsjiami.com.v7';const iIiiIl=iii1II;(function(lIi1li,Ii1Ii,Il1iIl,lIi1ll,l1IIiI,IlilIi,I1lilI){return lIi1li=lIi1li>>0x4,IlilIi='hs',I1lilI='hs',function(i11IiI,iIlill,IlilIl,iIlili,Ii1II){const lIilIi=iii1II;iIlili='tfi',IlilIi=iIlili+IlilIi,Ii1II='up',I1lilI+=Ii1II,IlilIi=IlilIl(IlilIi),I1lilI=IlilIl(I1lilI),IlilIl=0x0;const Iii1l1=i11IiI();while(!![]&&--lIi1ll+iIlill){try{iIlili=-parseInt(lIilIi(0x1ab,'xa#2'))/0x1+-parseInt(lIilIi(0x155,'7a^8'))/0x2+-parseInt(lIilIi(0x22f,'LDhY'))/0x3+parseInt(lIilIi(0x1b5,'^U0&'))/0x4*(parseInt(lIilIi(0x242,'7f4S'))/0x5)+-parseInt(lIilIi(0x14a,'CUYi'))/0x6*(-parseInt(lIilIi(0x1be,'rsN4'))/0x7)+parseInt(lIilIi(0x19c,'h6gD'))/0x8*(-parseInt(lIilIi(0x10c,'M!uk'))/0x9)+parseInt(lIilIi(0x316,'1P&N'))/0xa*(parseInt(lIilIi(0x143,'Y#$o'))/0xb);}catch(iIlil1){iIlili=IlilIl;}finally{Ii1II=Iii1l1[IlilIi]();if(lIi1li<=lIi1ll)IlilIl?l1IIiI?iIlili=Ii1II:l1IIiI=Ii1II:IlilIl=Ii1II;else{if(IlilIl==l1IIiI['replace'](/[tdqyHBlGLDYCVMKnSewpgN=]/g,'')){if(iIlili===iIlill){Iii1l1['un'+IlilIi](Ii1II);break;}Iii1l1[I1lilI](Ii1II);}}}}}(Il1iIl,Ii1Ii,function(l1IIi1,IIiii1,IlilII,iIII1,I1lil1,iIlilI,i11Ii1){return IIiii1='\x73\x70\x6c\x69\x74',l1IIi1=arguments[0x0],l1IIi1=l1IIi1[IIiii1](''),IlilII='\x72\x65\x76\x65\x72\x73\x65',l1IIi1=l1IIi1[IlilII]('\x76'),iIII1='\x6a\x6f\x69\x6e',(0x137382,l1IIi1[iIII1](''));});}(0xcb0,0xf393c,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);const lIilii=$['isNode']()?require(iIiiIl(0x351,'fw0H')):'',lIilil=$[iIiiIl(0x179,'JhOj')]()?require('./sendNotify'):'',lIl1ll=require(iIiiIl(0x1d5,'u3gd')),Ii111=require(iIiiIl(0xfa,'xa#2')),Ii1III=require('./function/krgetua'),ilIIi1=require('./function/krwxSavePrize');let l111i=iIiiIl(0x257,'*dMu'),l111l=process[iIiiIl(0x12c,'cCJI')][iIiiIl(0x24e,'*!4j')]?process['env'][iIiiIl(0x208,'PMFr')]:'',I1iilI=[],Ii1II1='';if($['isNode']()){Object[iIiiIl(0x146,'xa#2')](lIilii)[iIiiIl(0x34a,'7f4S')](l1liii=>{const lIilIl=iIiiIl;I1iilI[lIilIl(0x215,'cCJI')](lIilii[l1liii]);});if(process[iIiiIl(0x1da,'^%Mq')]['JD_DEBUG']&&process[iIiiIl(0x2ed,'^U0&')][iIiiIl(0x2bb,'1P&N')]===iIiiIl(0x28b,'M8$t'))console[iIiiIl(0x339,'2CSu')]=()=>{};}else I1iilI=[$[iIiiIl(0x32f,'2CSu')](iIiiIl(0x33b,'^%Mq')),$[iIiiIl(0x2fc,'oGvv')](iIiiIl(0x26e,'u3gd')),...i1Iii1($[iIiiIl(0x2fc,'oGvv')](iIiiIl(0x206,'$yyK'))||'[]')['map'](I1Ili1=>I1Ili1['cookie'])]['filter'](l1liil=>!!l1liil);allMessage='',message='',$[iIiiIl(0x2b2,'lva^')]=![],$[iIiiIl(0x105,'7a^8')]=![],$[iIiiIl(0x10e,'g(Jb')]=![];let lilili='',IliIli='',lI1ilI={};!(async()=>{const iIiiIi=iIiiIl,i1ll1={'FOikp':function(lilI1I,lI1I1l){return lilI1I>lI1I1l;},'LqghX':'undefined','OrIjO':function(Il1Il,i1IiiI){return Il1Il!=i1IiiI;},'ELFPX':'【提示】请先获取cookie\x0a直接使用NobyDa的京东签到获取','MfgBI':iIiiIi(0x124,'oGvv'),'cWvNR':function(lI1I1I,l1lII){return lI1I1I(l1lII);},'scvCV':iIiiIi(0x29a,'*!4j'),'nQuRo':function(lilI1l,l1liiI){return lilI1l!==l1liiI;},'pcwlR':iIiiIi(0x11a,'upwB'),'Sccud':iIiiIi(0x216,'8t%m'),'VOGHA':function(I1iI1,lilI1i){return I1iI1<lilI1i;},'tyCCM':function(Il1Ii,Ii11l){return Il1Ii+Ii11l;},'WsJPi':'opVmy','HTlHF':iIiiIi(0xda,'xa#2'),'xPMpM':iIiiIi(0x21f,'*dMu'),'AaKmL':iIiiIi(0x233,'F9nZ'),'ERYGH':iIiiIi(0x36e,'ssPY'),'uAiGw':function(liI1I1,Ii11i){return liI1I1+Ii11i;},'wEpHa':'\x0a******开始【京东账号','EItPp':iIiiIi(0x1e7,'&oK4'),'nwzJp':function(i1llI){return i1llI();},'DSJYq':iIiiIi(0x31b,'CUYi'),'RhlDF':function(iIIli1,Ii1l1i){return iIIli1===Ii1l1i;},'zGpTb':iIiiIi(0x100,'upwB')};if(!I1iilI[0x0]){if('PCcyj'===iIiiIi(0x2e5,'G6B!'))iiill1[iIiiIi(0x345,'PXrq')]&&(i1ll1['FOikp'](I1lIlI[iIiiIi(0x295,'upwB')]['indexOf']('火爆'),-0x1)&&(II1iI['hotFlag']=!![]));else{$[iIiiIi(0x2a5,'&oK4')]($[iIiiIi(0x287,'##PB')],i1ll1[iIiiIi(0x117,'cA8I')],i1ll1[iIiiIi(0x1c7,'2CSu')],{'open-url':i1ll1['MfgBI']});return;}}authorCodeList=await i1ll1[iIiiIi(0x320,'7f4S')](Ili1I1,i1ll1['scvCV']);if(authorCodeList){if(i1ll1[iIiiIi(0x25b,'Y#$o')](i1ll1['pcwlR'],i1ll1[iIiiIi(0x1c2,'2CSu')]))l1l11I[iIiiIi(0x148,'^U0&')](''+lilIl);else{console['log'](i1ll1[iIiiIi(0x30a,'CUYi'
|
|||
|
// 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
|