mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-25 15:49:11 +08:00
15 lines
143 KiB
JavaScript
15 lines
143 KiB
JavaScript
|
/*
|
|||
|
活动名称:抽生肖金币
|
|||
|
活动地址:https://pro.m.jd.com/mall/active/38fBeMPN3sLNzhvpxCZBbsteaLsv/index.html
|
|||
|
活动变量:jd_sx_task //是否做任务获取次数,默认开启
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('抽生肖金币')
|
|||
|
function Fm3Gs7(){}var DNQa5t=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],QHVXZ5,LhuKRb,XnSOlDE,SzqYdB,nEpVtok,tSPU0Hu,IJ_ouwL,_2Mouwf,EcZQPw,vbRbiT,I2RUMM,ZCFI97_,DKHwLj,rWT_t6c,CTo1Y9,p9M5dx,CuRIpxR,h1A25z,sbD4HR,yhtjAJI,jv_j97,DlT9LDC;function VDSBA3(Fm3Gs7){return QHVXZ5[Fm3Gs7>-0x23?Fm3Gs7+0x22:Fm3Gs7+0x14]}Fm3Gs7(QHVXZ5=SVo9PW0(),LhuKRb=rQrMLKC((Fm3Gs7,DNQa5t)=>{return DNQa5t(Fm3Gs7())},0x2)(D3DKRP,jl009UB));var V_enT0C=[],tPNaVaw=['<_Vg9}sf','\u004b\u0059\u0051\u004c\u0053\u003a\u0031\u0066',gs47i8a(VDSBA3(0x2)),gs47i8a(0x1),gs47i8a(VDSBA3(0x11)),'\u0028\u007e\u0035\u002f\u007b\u0056\u007c\u0031','\u0038\u0024\u003b\u0044\u0044\u004f\u0045','\u007c\u0052\u003f\u0051\u0036\u003e\u004c\u006b\u002c\u003f\u0044\u0067\u0031\u003a\u002c','\x3f\x3f\x45\x34\x4d\x4a\x26\x4b\x54\x5b\x38\x5e\x73\x3c\x7e\x69\x42\x55','\x78\x4d\x38\x54\x76','>i%T','\x2f\x6b\x2a\x51\x39\x2c\x2b\x66\x46\x7c\x61\x48\x5e\x3f\x3f',gs47i8a(0x3),'/k*Q9,6DUSaepn','/k*Q9,[rH&^STj?','\x2f\x6b\x2a\x51\x39\x2c\x5a\x71\x31\x37\x4f\x51\x2e\x6e','\u002f\u006b\u002a\u0051\u0039\u002c\u0026\u0042\u0031\u0053\u002e\u005f\u0065\u0022\u0057\u0029\u0054\u0055',gs47i8a(VDSBA3(0x5b)),'\u002f\u006b\u002a\u0051\u0039\u002c\u005a\u0071\u0038\u005b\u0024\u004a\u003e\u0031\u006a\u0025\u003b\u0055','\x2f\x6b\x2a\x51\x39\x2c\x5a\x71\x23\x53\x55\x49\x6a\x2c\x7c\x69\x4e\x60\x46\x3d\x42','\u002f\u006b\u002a\u0051\u0039\u002c\u005a\u0071\u0038\u005b\u0024\u004a\u0063\u003c\u0035\u0047\u004c\u0046\u0035\u0054',gs47i8a(0x5),'\x2f\x6b\x47\x68\x3f\x24\x7b\x7e\x6c\x5b\x71\x65\x5b\x6e',gs47i8a(VDSBA3(0x7)),'\u005b\u0040\u0031\u0042\u0050\u0067\u0060\u0049\u002b\u0068\u002b\u0063\u003d\u0032\u0038\u002f\u007b\u0046\u0047\u0076\u0063\u004e\u0066\u006b\u005e\u0035\u0046','\x69\x3c\x50\x4a\x4f\x28\x7c\x24\x64','\x6b\x6b\x45\x61\x59\x4a\x44\x4b','\u0062\u003f\u0023\u002b\u0061','\u0055\u006e\u0066\u0040','\x69\x3c\x32\x40\x3d\x22\x45\x4b',VDSBA3(-0xf),gs47i8a(0x7),'\u003e\u004b\u005b\u0060\u0031\u0038\u0046\u006c\u0058\u0061\u005d\u0059\u004c\u0031\u0022\u0024\u0060\u0053\u0063\u006c\u0058\u006a\u0066\u004c\u003b\u004a\u003d\u0062\u004e\u0069\u0038\u0067\u003f\u003d\u0077\u0034\u003b','\x60\x5e\x71\x40\x76',gs47i8a(0x8),gs47i8a(VDSBA3(0x9)),'\x44\x3f\x37\x54\x29\x66\x6f\x49\x57\x53\x5a\x2e\x3c\x7d\x75\x6f\x71\x55','\x3c\x33\x5b\x5a\x38\x28\x71\x4b','\u0025\u0053\u0049\u0055\u003e\u0076\u0047',']?&J+$<K','\u007d\u0069\u0042\u0034\u0035\u002c\u007a','>Q.)V@>kDa=','\x47\x5a\x2c\x70\x3f\x56\x3b\x51\x51\x23','\x44\x3f\x5e\x4a\x62\x2b\x42\x39\x7d\x63\x3e\x34\x3c\x7d\x3c\x6f\x54\x55','\u003e\u0060\u0047\u0068\u004f\u0028\u002f\u004b','\u0041\u0051\u004b\u002a\u005f\u007d\u0047',gs47i8a(0x9),'\u007e\u0078\u0035\u003e\u0071\u0060\u0076\u0041',gs47i8a(VDSBA3(0xf)),gs47i8a(0xb),gs47i8a(VDSBA3(0xa)),VDSBA3(-0x1c),gs47i8a(0xd),'(8]oYn(Z!ZWkXy"1','\u006a\u0031\u0070\u0055\u0053',gs47i8a(VDSBA3(0xd)),'G3Z4WfEK','\u0069\u003c\u007c\u003d\u0026\u0052\u0055\u0070\u0072','\x75\x33\x7c\x3d\x3b','\u0076\u003f\u0062\u0056\u0025\u0021\u0058\u0066\u004d\u0023','\u0065\u005e\u0063\u0052\u0066\u0024\u007a','yFrRY}#|a[{S=u`GO?;Z="{~l&',gs47i8a(VDSBA3(0x6)),gs47i8a(0x10),'\x2a\x74\x41\x54\x77\x50\x63\x41\x4d\x4f',VDSBA3(-0xd),'\u006f\u0076\u007c\u003d\u0030\u0052\u0032\u004b','\u0079\u0046\u0072\u0052\u007b\u004a\u005b\u0051\u0064',VDSBA3(-0x15),gs47i8a(0x11),'\x3b\x33\x65\x40\x42\x22\x2a\x66\x64',gs47i8a(0x12),'\u0042\u0033\u0032\u0040\u0040\u0032\u005b\u0051\u0043\u007c\u0071\u0048\u005f\u004c\u006d\u0069\u0058\u006c\u0038\u003d\u003b','\x38\x6e\x71\x40\x76','\u0072\u0045\u002c\u0076\u0041\u0024\u0078\u0043\u0049\u0063\u0077\u002e\u0055',VDSBA3(-0x1e),'\u0068\u006e\u0050\u004a\u0057\u004d\u0028\u0071\u0072\u0039\u0059','rE,vA$xCIcw.H}k','\x62\x59\x54\x64\x23\x4f\x54\x48\x71\x3f','bYTdT3|@C8{|J*CE',gs47i8a(0x13),'\u0068\u006e\u0050\u004a\u0079\u0070\u006f\u0051\u0032\u0044\u0077\u0061\u0024\u0050\u0050\u0047\u0071\u0055',gs47i8a(0x14),'\u002a\u0074\u0039\u0040\u0057\u0066\u0049\u006f\u0049\u005f\u0064\u0049\u0074\u0059\u0046\u0075\u002b\u0025\u0074','\x62\x59\x54\x64\x54\x33\x32\x28\x2c\x6a
|
|||
|
|
|||
|
// 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
|