mirror of https://github.com/KingRan/KR.git
27 lines
87 KiB
JavaScript
27 lines
87 KiB
JavaScript
|
/*
|
|||
|
11.11时尚大牌云集 黑马新品聚惠
|
|||
|
新增开卡脚本,一次性脚本
|
|||
|
|
|||
|
变量
|
|||
|
//export opencard_draw="3" //抽奖次数 3
|
|||
|
|
|||
|
————————————————
|
|||
|
入口:[ 11.11时尚大牌云集 黑马新品聚惠]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
过10分钟再执行
|
|||
|
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#11.11时尚大牌云集 黑马新品聚惠
|
|||
|
11 11 11 11 * jd_opencardL342.js, tag=11.11时尚大牌云集 黑马新品聚惠, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('11.11时尚大牌云集 黑马新品聚惠');
|
|||
|
var version_='jsjiami.com.v7';const l111Ii=iii1II;(function(IiIII1,I1II1,lIil1i,lIil1l,l1II1i,lili11,lIllIi){return IiIII1=IiIII1>>0x9,lili11='hs',lIllIi='hs',function(iIi11l,lIllIl,iIi11i,ii11i1,ll1l1l){const iI1iII=iii1II;ii11i1='tfi',lili11=ii11i1+lili11,ll1l1l='up',lIllIi+=ll1l1l,lili11=iIi11i(lili11),lIllIi=iIi11i(lIllIi),iIi11i=0x0;const l1II11=iIi11l();while(!![]&&--lIil1l+lIllIl){try{ii11i1=-parseInt(iI1iII(0x38d,'[Th$'))/0x1+-parseInt(iI1iII(0x1cc,'Jd@['))/0x2+-parseInt(iI1iII(0x427,'HuVS'))/0x3+-parseInt(iI1iII(0x3a9,'[619'))/0x4+parseInt(iI1iII(0x3eb,'rW0t'))/0x5+-parseInt(iI1iII(0x28e,'jPPF'))/0x6+parseInt(iI1iII(0x1b5,'fp]c'))/0x7*(parseInt(iI1iII(0x2eb,'PB3e'))/0x8);}catch(iIl1Ii){ii11i1=iIi11i;}finally{ll1l1l=l1II11[lili11]();if(IiIII1<=lIil1l)iIi11i?l1II1i?ii11i1=ll1l1l:l1II1i=ll1l1l:iIi11i=ll1l1l;else{if(iIi11i==l1II1i['replace'](/[FqnNDTBUpwOxfXdYtgAL=]/g,'')){if(ii11i1===lIllIl){l1II11['un'+lili11](ll1l1l);break;}l1II11[lIllIi](ll1l1l);}}}}}(lIil1i,I1II1,function(ll1l1i,iI1iI1,i1IIii,i1IIil,il111l,iIl1Il,il111i){return iI1iI1='\x73\x70\x6c\x69\x74',ll1l1i=arguments[0x0],ll1l1i=ll1l1i[iI1iI1](''),i1IIii=`\x72\x65\x76\x65\x72\x73\x65`,ll1l1i=ll1l1i[i1IIii]('\x76'),i1IIil=`\x6a\x6f\x69\x6e`,(0x145257,ll1l1i[i1IIil](''));});}(0x17c00,0x75b2e,Iii11l,0xc0),Iii11l)&&(version_=l111Ii(0x154,'jPPF'));const IIlIIi=$[l111Ii(0x86,'FEig')]()?require(l111Ii(0xb6,'kSqr')):'',iliiil=$[l111Ii(0x45d,'6Su5')]()?require(l111Ii(0x335,'C8^o')):'',li11ll=require(l111Ii(0x12d,'RO^U')),i1Il1=require(l111Ii(0xe8,'yfq%')),li1l1=require(l111Ii(0x37f,'fbh5')),IIiI1l=require('./function/krwxSavePrize');let IIiI1i=l111Ii(0x439,'p3qP'),ilIllI=$[l111Ii(0x207,'w#3g')]()?process['env'][l111Ii(0x17a,'HdX6')]?process['env']['opencard_draw']:'0':$['getdata'](l111Ii(0x11d,'Jd@['))?$[l111Ii(0x2ea,'[Th$')](l111Ii(0x24c,'[Th$')):'0',I1IIli=[],Il1I1i='';if($[l111Ii(0x383,'ReNo')]()){Object[l111Ii(0x3fb,'#J5R')](IIlIIi)[l111Ii(0x462,'w#3g')](iliii1=>{const lI1i11=l111Ii;I1IIli[lI1i11(0x35e,'kSqr')](IIlIIi[iliii1]);});if(process['env'][l111Ii(0x466,')F%r')]&&process['env'][l111Ii(0x197,'w#3g')]==='false')console[l111Ii(0x157,'6Su5')]=()=>{};}else I1IIli=[$[l111Ii(0x206,'iQwq')](l111Ii(0x3b8,'b2td')),$[l111Ii(0x352,'Mj9M')](l111Ii(0x280,'#J5R')),...Ii1Iil($[l111Ii(0x249,'fbh5')]('CookiesJD')||'[]')[l111Ii(0x24e,']MGu')](i1IiI=>i1IiI['cookie'])][l111Ii(0x1d4,'QNMs')](lIllil=>!!lIllil);allMessage='',message='',$[l111Ii(0x18d,'fbh5')]=![],$['outFlag']=![],$[l111Ii(0x3d5,'C8^o')]=![];let lIilI1='',Il1I1l='',Ii1Il1={};!(async()=>{const lili1I=l111Ii,iilIi1={'LzZyi':function(I111,I1I11l){return I111===I1I11l;},'wJcZz':lili1I(0x272,'kSqr'),'dmDOM':lili1I(0x2f7,'[619'),'VGdAT':lili1I(0x11a,'VlvW'),'goQTu':function(I1I11i,l1iI1l){return I1I11i&&l1iI1l;},'UusnA':lili1I(0x425,'HnOf'),'qcIqx':function(III1ll,l1lIIi){return III1ll(l1lIIi);},'DOYZE':lili1I(0x442,'[Th$'),'yfZvl':lili1I(0x243,'UYAP'),'cJWoq':lili1I(0x2d7,'p3qP'),'xPAnI':'a691d33f3c7f4cd7b699796d59988c1f','gesyN':function(iII11I,IiIii1,l1lIIl){return iII11I(IiIii1,l1lIIl);},'WoRYd':lili1I(0xb8,'8p$4'),'tOkYu':function(i1lIl,i1lIi){return i1lIl<i1lIi;},'Ytquh':function(iilIiI,III1li){return iilIiI===III1li;},'TlYIe':'EyhxS','lIYUg':function(Ili1iI){return Ili1iI();},'qBVZC':function(lIlll1,Ili1i1){return lIlll1!==Ili1i1;},'uhYEt':lili1I(0x1e9,'7jc('),'JbAVf':lili1I(0x360,'rW0t')};if(!I1IIli[0x0]){$[lili1I(0x361,'B[aL')]($[lili1I(0x3f7,'FEig')],iilIi1[lili1I(0xe7,'yfq%')],iilIi1[lili1I(0x88,'8p$4')],{'open-url':iilIi1[lili1I(0x401,'fbh5')]});return;}authorCodeList=await iilIi1[lili1I(0x8e,']MGu')](ll1Ii1,lili1I(0x43d,'VlvW'));if(authorCodeList){if(iilIi1[lili1I(0x338,'xVYJ')](iilIi1[lili1I(0x3e1,'HdX6')],iilIi1['yfZvl'])){if(IllIiI[lili1I(0x326,'(uEt')]&&iilIi1[lili1I(0x291,'8p$4')](i1il1[lili1I(0x1f3,'p3qP')],!![])&&I1l111['data'])I1iII1[lili1I(0x345,'xpMo')](lili1I(0x192,'fp]c')+(lilII1[lili1I(0x1ba,'#J5R')][lili1I(0x33a,'rW0t')]||0x0)+'\x20');else liiI11[lili1I(0x1dd,'kSqr')]?iill1[lili1I(0x189,'qfQm')](''+(iii1l1[lili1I(0x448,'w#3g')]||'')):IIliIl['log'](''+II11ll);}else console['log'](lili1I(0x
|
|||
|
// 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
|
|||
|
|