KR/jd_sk2_draw.js

28 lines
83 KiB
JavaScript
Raw Permalink Normal View History

2023-07-27 16:14:01 +08:00
/*
SK2互动抽奖至高赢经典神仙水
任务本,邀请不清楚抽奖概率豆子
变量jd_sk2_id // 活动id 7月idexport jd_sk2_id="2307100000982163"
变量opencard_draw // 抽奖次数 export opencard_draw="3"
入口[ SK2互动抽奖至高赢经典神仙水 ]
请求太频繁会被黑ip
过10分钟再执行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#SK2互动抽奖至高赢经典神仙水
1 1 1 1 * jd_sk2.js, tag=SK2互动抽奖至高赢经典神仙水, enabled=true
*/
const $ = new Env('SK2互动抽奖至高赢经典神仙水');
2023-08-01 11:15:32 +08:00
var version_='jsjiami.com.v7';const l1Ilil=iii1II;(function(i11l1i,iI11l1,IlIii,iI11lI,II1i11,IlillI,I111l1){return i11l1i=i11l1i>>0x2,IlillI='hs',I111l1='hs',function(iIliII,iIii1I,I1liI1,I1ii11,IlIil){const lIl1i1=iii1II;I1ii11='tfi',IlillI=I1ii11+IlillI,IlIil='up',I111l1+=IlIil,IlillI=I1liI1(IlillI),I111l1=I1liI1(I111l1),I1liI1=0x0;const iI11i1=iIliII();while(!![]&&--iI11lI+iIii1I){try{I1ii11=-parseInt(lIl1i1(0x465,'@2j7'))/0x1+-parseInt(lIl1i1(0x37f,'(0Ej'))/0x2*(-parseInt(lIl1i1(0x1bf,'UOfM'))/0x3)+parseInt(lIl1i1(0x119,'$qs9'))/0x4+-parseInt(lIl1i1(0x408,'4]wA'))/0x5+-parseInt(lIl1i1(0x11d,'sF4T'))/0x6*(parseInt(lIl1i1(0x3d2,'pYIi'))/0x7)+-parseInt(lIl1i1(0x23c,'NrIM'))/0x8+parseInt(lIl1i1(0x24b,']pF*'))/0x9;}catch(i1i1li){I1ii11=I1liI1;}finally{IlIil=iI11i1[IlillI]();if(i11l1i<=iI11lI)I1liI1?II1i11?I1ii11=IlIil:II1i11=IlIil:I1liI1=IlIil;else{if(I1liI1==II1i11['replace'](/[HfIguUAEqLCDRYxT=]/g,'')){if(I1ii11===iIii1I){iI11i1['un'+IlillI](IlIil);break;}iI11i1[I111l1](IlIil);}}}}}(IlIii,iI11l1,function(iIill,iil1Ii,iii11i,iii11l,l1Ilii,IIl11l,I111i1){return iil1Ii='\x73\x70\x6c\x69\x74',iIill=arguments[0x0],iIill=iIill[iil1Ii](''),iii11i='\x72\x65\x76\x65\x72\x73\x65',iIill=iIill[iii11i]('\x76'),iii11l='\x6a\x6f\x69\x6e',(0x137245,iIill[iii11l](''));});}(0x32c,0x3059a,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);function iii1II(_0x4781e9,_0x49567f){const _0xb736cb=Iii11l();return iii1II=function(_0x17da02,_0x8b7e0e){_0x17da02=_0x17da02-0xe3;let _0x3b51ef=_0xb736cb[_0x17da02];if(iii1II['cojjer']===undefined){var _0x5e3e43=function(_0x45eaee){const _0x3e254e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8168f5='',_0x24e34c='';for(let _0x105bf4=0x0,_0x197213,_0x3f0e21,_0x3e7a6b=0x0;_0x3f0e21=_0x45eaee['charAt'](_0x3e7a6b++);~_0x3f0e21&&(_0x197213=_0x105bf4%0x4?_0x197213*0x40+_0x3f0e21:_0x3f0e21,_0x105bf4++%0x4)?_0x8168f5+=String['fromCharCode'](0xff&_0x197213>>(-0x2*_0x105bf4&0x6)):0x0){_0x3f0e21=_0x3e254e['indexOf'](_0x3f0e21);}for(let _0x34c221=0x0,_0x4ba4dd=_0x8168f5['length'];_0x34c221<_0x4ba4dd;_0x34c221++){_0x24e34c+='%'+('00'+_0x8168f5['charCodeAt'](_0x34c221)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24e34c);};const _0x4ccae9=function(_0x2f0c81,_0x1360f5){let _0x4d1c02=[],_0xe3118d=0x0,_0xbf1817,_0x31a70b='';_0x2f0c81=_0x5e3e43(_0x2f0c81);let _0xf6c5b2;for(_0xf6c5b2=0x0;_0xf6c5b2<0x100;_0xf6c5b2++){_0x4d1c02[_0xf6c5b2]=_0xf6c5b2;}for(_0xf6c5b2=0x0;_0xf6c5b2<0x100;_0xf6c5b2++){_0xe3118d=(_0xe3118d+_0x4d1c02[_0xf6c5b2]+_0x1360f5['charCodeAt'](_0xf6c5b2%_0x1360f5['length']))%0x100,_0xbf1817=_0x4d1c02[_0xf6c5b2],_0x4d1c02[_0xf6c5b2]=_0x4d1c02[_0xe3118d],_0x4d1c02[_0xe3118d]=_0xbf1817;}_0xf6c5b2=0x0,_0xe3118d=0x0;for(let _0x35f416=0x0;_0x35f416<_0x2f0c81['length'];_0x35f416++){_0xf6c5b2=(_0xf6c5b2+0x1)%0x100,_0xe3118d=(_0xe3118d+_0x4d1c02[_0xf6c5b2])%0x100,_0xbf1817=_0x4d1c02[_0xf6c5b2],_0x4d1c02[_0xf6c5b2]=_0x4d1c02[_0xe3118d],_0x4d1c02[_0xe3118d]=_0xbf1817,_0x31a70b+=String['fromCharCode'](_0x2f0c81['charCodeAt'](_0x35f416)^_0x4d1c02[(_0x4d1c02[_0xf6c5b2]+_0x4d1c02[_0xe3118d])%0x100]);}return _0x31a70b;};iii1II['tSJpBR']=_0x4ccae9,_0x4781e9=arguments,iii1II['cojjer']=!![];}const _0x2e35a9=_0xb736cb[0x0],_0xc7d2f1=_0x17da02+_0x2e35a9,_0x182933=_0x4781e9[_0xc7d2f1];return!_0x182933?(iii1II['pWhYXw']===undefined&&(iii1II['pWhYXw']=!![]),_0x3b51ef=iii1II['tSJpBR'](_0x3b51ef,_0x8b7e0e),_0x4781e9[_0xc7d2f1]=_0x3b51ef):_0x3b51ef=_0x182933,_0x3b51ef;},iii1II(_0x4781e9,_0x49567f);}const Il1i=$['isNode']()?require(l1Ilil(0x18f,'A1Z5')):'',lIiIl=$[l1Ilil(0x311,']yfz')]()?require(l1Ilil(0x424,'Bu!7')):'',iiil1l=require(l1Ilil(0x427,'m54K')),Il1l=require(l1Ilil(0x356,'DO!H')),ll11I1=require(l1Ilil(0x142,'Co%S')),Illll=require(l1Ilil(0x321,'4va$'));let iiil1i=l1Ilil(0x296,'Ht#!'),ilIIli=process[l1Ilil(0x289,'A1Z5')]['jd_sk2_id']?process[l1Ilil(0x15e,'QP$*')][l1Ilil(0x23d,'NwMP')]:'',ilIIll=$[l1Ilil(0xf7,'4wx*')]()?process[l1Ilil(0x215,'!NvK')][l1Ilil(0x211,'NwMP')]?process['env'][l1Ilil(0x31f,'!NvK')]:'10':$[l1Ilil(0x3a4,'K)Om')](l1Ilil(0xff,'WoMp'))?$[l1Ilil(0x3c9,'T4bD')](l1Ilil(0
2023-07-27 16:14:01 +08:00
// 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