faker3/jd_supermh.js

12 lines
38 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
超市盲盒
cron:1 1 1 1 *
*/
const $ = new Env('超市盲盒')
var il='jsjiami.com.v7';const li1i1l=iii1II;(function(Iliii1,iIiIi,iil1ll,iiilil,iil1li,lillIl,iIiIl){return Iliii1=Iliii1>>0x7,lillIl='hs',iIiIl='hs',function(iiilii,li1i1i,IlIli1,illIiI,lI1lli){const lllI1i=iii1II;illIiI='tfi',lillIl=illIiI+lillIl,lI1lli='up',iIiIl+=lI1lli,lillIl=IlIli1(lillIl),iIiIl=IlIli1(iIiIl),IlIli1=0x0;const Ill1l=iiilii();while(!![]&&--iiilil+li1i1i){try{illIiI=parseInt(lllI1i(0x1df,'d#M&'))/0x1+parseInt(lllI1i(0x268,'CtdE'))/0x2+parseInt(lllI1i(0x19a,'I)7g'))/0x3*(parseInt(lllI1i(0x25f,'jvby'))/0x4)+-parseInt(lllI1i(0x253,'i]gP'))/0x5*(-parseInt(lllI1i(0x18d,'fFhu'))/0x6)+-parseInt(lllI1i(0x1d5,'qNd]'))/0x7+-parseInt(lllI1i(0x255,'Yb&)'))/0x8*(parseInt(lllI1i(0x209,'qNd]'))/0x9)+parseInt(lllI1i(0x244,'ST4$'))/0xa;}catch(llI1Il){illIiI=IlIli1;}finally{lI1lli=Ill1l[lillIl]();if(Iliii1<=iiilil)IlIli1?iil1li?illIiI=lI1lli:iil1li=lI1lli:IlIli1=lI1lli;else{if(IlIli1==iil1li['replace'](/[wkfKRQxJtbgUrDLYFdq=]/g,'')){if(illIiI===li1i1i){Ill1l['un'+lillIl](lI1lli);break;}Ill1l[iIiIl](lI1lli);}}}}}(iil1ll,iIiIi,function(ii1iii,i11iil,Ill1i,ii1iil,lllI1l,i11iii,llI1Ii){return i11iil='\x73\x70\x6c\x69\x74',ii1iii=arguments[0x0],ii1iii=ii1iii[i11iil](''),Ill1i=`\x72\x65\x76\x65\x72\x73\x65`,ii1iii=ii1iii[Ill1i]('\x76'),ii1iil=`\x6a\x6f\x69\x6e`,(0x16e7ef,ii1iii[ii1iil](''));});}(0x6080,0xc19a8,Iii11l,0xc3),Iii11l)&&(il=li1i1l(0x2eb,'eN[p'));function iii1II(_0x2a145a,_0xaf60cd){const _0x141df7=Iii11l();return iii1II=function(_0x3aa06f,_0x4876c8){_0x3aa06f=_0x3aa06f-0x17a;let _0x53b9da=_0x141df7[_0x3aa06f];if(iii1II['RqRQlw']===undefined){var _0xcf6cfa=function(_0x161259){const _0x8a9608='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5968a0='',_0xc00ad5='';for(let _0x443ac0=0x0,_0x41b30e,_0x1d017e,_0x14d904=0x0;_0x1d017e=_0x161259['charAt'](_0x14d904++);~_0x1d017e&&(_0x41b30e=_0x443ac0%0x4?_0x41b30e*0x40+_0x1d017e:_0x1d017e,_0x443ac0++%0x4)?_0x5968a0+=String['fromCharCode'](0xff&_0x41b30e>>(-0x2*_0x443ac0&0x6)):0x0){_0x1d017e=_0x8a9608['indexOf'](_0x1d017e);}for(let _0x3c95ab=0x0,_0x274360=_0x5968a0['length'];_0x3c95ab<_0x274360;_0x3c95ab++){_0xc00ad5+='%'+('00'+_0x5968a0['charCodeAt'](_0x3c95ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc00ad5);};const _0x28f800=function(_0x5e56fa,_0x370cb6){let _0x1b1e77=[],_0x1d4234=0x0,_0x4b252e,_0x40fba8='';_0x5e56fa=_0xcf6cfa(_0x5e56fa);let _0x5b2231;for(_0x5b2231=0x0;_0x5b2231<0x100;_0x5b2231++){_0x1b1e77[_0x5b2231]=_0x5b2231;}for(_0x5b2231=0x0;_0x5b2231<0x100;_0x5b2231++){_0x1d4234=(_0x1d4234+_0x1b1e77[_0x5b2231]+_0x370cb6['charCodeAt'](_0x5b2231%_0x370cb6['length']))%0x100,_0x4b252e=_0x1b1e77[_0x5b2231],_0x1b1e77[_0x5b2231]=_0x1b1e77[_0x1d4234],_0x1b1e77[_0x1d4234]=_0x4b252e;}_0x5b2231=0x0,_0x1d4234=0x0;for(let _0x1a9947=0x0;_0x1a9947<_0x5e56fa['length'];_0x1a9947++){_0x5b2231=(_0x5b2231+0x1)%0x100,_0x1d4234=(_0x1d4234+_0x1b1e77[_0x5b2231])%0x100,_0x4b252e=_0x1b1e77[_0x5b2231],_0x1b1e77[_0x5b2231]=_0x1b1e77[_0x1d4234],_0x1b1e77[_0x1d4234]=_0x4b252e,_0x40fba8+=String['fromCharCode'](_0x5e56fa['charCodeAt'](_0x1a9947)^_0x1b1e77[(_0x1b1e77[_0x5b2231]+_0x1b1e77[_0x1d4234])%0x100]);}return _0x40fba8;};iii1II['jlWnOv']=_0x28f800,_0x2a145a=arguments,iii1II['RqRQlw']=!![];}const _0x521781=_0x141df7[0x0],_0x547fdd=_0x3aa06f+_0x521781,_0x4db29c=_0x2a145a[_0x547fdd];return!_0x4db29c?(iii1II['uqJiPg']===undefined&&(iii1II['uqJiPg']=!![]),_0x53b9da=iii1II['jlWnOv'](_0x53b9da,_0x4876c8),_0x2a145a[_0x547fdd]=_0x53b9da):_0x53b9da=_0x4db29c,_0x53b9da;},iii1II(_0x2a145a,_0xaf60cd);}const jdCookie=require(li1i1l(0x2b1,')O%W')),notify=require(li1i1l(0x1e1,'ZtMh')),common=require(li1i1l(0x2cc,'UVB2')),{H5st}=require(li1i1l(0x2cd,'UVB2')),linkId=li1i1l(0x1d3,'Xn6D'),isNotify=![];let cookie='';function Iii11l(){const iiiliI=(function(){return[...[il,'LkYjfrsUQjixaFqmiKx.bcqYotJmDd.wqvRg7Ybg==','k8kUW6m','xqpdIetdRrq','W7RdHCoIqmocpL/dOSkUjCk4WP/dGCoZWPhdVSooW4aYbCkqdWRcQedcSw/dS8obyCkNWRldKmkMyHtdTmkzB8o3uspdM2hcQeZdRuBcMmoGWQbRW6NcGLzDWQVdTeLLimkzW7RcOMfse8kWWQpdP2WzW7ZdHSoPWOlcGmkdpCoQWOxdR8kRW7aJWOSdb3i2WP05wmkRW5/dVcrUzKZdMMpd
// 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