mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-03-14 14:44:44 +08:00
15 lines
132 KiB
JavaScript
15 lines
132 KiB
JavaScript
|
/*
|
|||
|
活动名称:2.14 抽钻戒抽奖
|
|||
|
活动链接:https://pro.m.jd.com/mall/active/dHh4DUQDWgLsTVLQysZ6sHwFRPJ/index.html
|
|||
|
活动变量:jd_zj_task //是否做任务获取次数,默认开启
|
|||
|
|
|||
|
cron:59 23 29 2 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('2.14 抽钻戒抽奖')
|
|||
|
function EzdNqn6(){}var VEqUuG=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],pn3dkO,Ia95gM,cR7Ood0,Lnxzzp,cT28Pw,PvcDLX,WvhgV5y,RbRHGNX,OHAp4u,Eqkr1Z,KGwpeh,_App_Dd,eHCzBqb,au9R4w,YTRIvx,MjeYkiu,hBMtWh,KCcjc3,odaa3p0,RxSRvL,fnSr7i,QNGrjf;function ipBQKBC(EzdNqn6){return pn3dkO[EzdNqn6>0x12d?EzdNqn6+0x1f:EzdNqn6<0x12d?EzdNqn6>0x54?EzdNqn6>0x54?EzdNqn6-0x55:EzdNqn6+0x29:EzdNqn6-0x3d:EzdNqn6+0x17]}EzdNqn6(pn3dkO=RxLKOWA(),Ia95gM=Uj885o((EzdNqn6,VEqUuG)=>{return VEqUuG(EzdNqn6())},0x2)(GODVCN8,uQ9FRD));var MtPVLO=[],O3mqMLf=['\u0062\u006a\u0051\u0040\u0028\u003d\u007b\u004c',Qag1oQU(ipBQKBC(0x75)),'\x53\x34\x70\x4e\x55\x3f\x33\x6d','\x42\x40\x47\x6b\x5f\x73\x7b\x47\x6b',Qag1oQU(0x1),'\x6d\x67\x54\x72\x6f',Qag1oQU(ipBQKBC(0xa8)),'\x35\x79\x32\x25\x76\x57\x50\x76\x4b\x3b\x77\x7e\x28\x42\x42',Qag1oQU(0x3),Qag1oQU(ipBQKBC(0x87)),'\u0035\u0079\u0032\u0025\u0076\u0057\u005a\u004f\u007e\u0037\u0028\u0065\u0072\u0066\u0042','\u0035\u0079\u0032\u0025\u0076\u0057\u002b\u002e\u006a\u0039\u003d\u0075\u0053\u004c','\x35\x79\x32\x25\x76\x57\x37\x3c\x6a\x65\x53\x51\x47\x5e\x7c\x32\x72\x43','5y2%vW+.TZliNjfxMC',Qag1oQU(0x5),Qag1oQU(ipBQKBC(0x7a)),Qag1oQU(0x7),'\x36\x49\x4c\x69\x3f\x5e\x33','o40L={vUY+d~lv3bWxj8Rgv.|qF','\u0046\u004a\u0026\u0069\u003d\u0057\u003b\u006c\u0055','\x79\x79\x41\x77\x40\x69\x7a\x44',Qag1oQU(ipBQKBC(0x7d)),'CLvp','\x46\x4a\x5d\x70\x2c\x5e\x41\x44','g+dp',Qag1oQU(0x9),'\x4e\x44\x5a\x71\x6a\x54\x4b\x22\x68\x77\x3a\x40\x6b\x6a\x5e\x6c\x71\x65\x30\x22\x68\x66\x76\x6b\x4d\x69\x2c\x73\x34\x46\x54\x2f\x42\x2c\x74\x3f\x4d','\u0071\u0028\u002e\u0070\u006f',ipBQKBC(0x55),Qag1oQU(0x9),Qag1oQU(ipBQKBC(0x8c)),'\x4a\x3e\x5a\x2b\x54\x57\x2e\x44','\x2b\x4a\x39\x72\x3c\x5e\x33',':B7iPlJD','\x76\x7a\x35\x5e\x62\x6d\x65','\x35\x4e\x3f\x66\x2f\x5d\x35\x5a\x76\x5b\x3a',Qag1oQU(0xb),'RN?f/]5Zv[&^`v`YF+',Qag1oQU(0xc),'Qk(},!W','\u002e\u0042\u0026\u0069\u005d\u0028\u0032\u003c\u0055',Qag1oQU(0xd),'\x5d\x4a\x3a\x23\x5f\x7b\x4d\x75\x75\x62',Qag1oQU(0xe),Qag1oQU(0xf),'\x4d\x4f\x4e\x3d\x69','\x7a\x42\x61\x2c\x73\x5e\x78\x3b\x5f\x56\x7b\x59\x43','\x4f\x41\x6e\x2c\x7e\x69\x4f\x3b\x4b\x3b\x28\x53\x7d\x5e\x36\x46',Qag1oQU(0x10),'\x52\x49\x28\x69\x78\x53\x33','n>+?|vAD','\u0046\u004a\u003b\u002c\u0037\u0023\u0043\u0025\u004f','\u0038\u003e\u003b\u002c\u004d',Qag1oQU(ipBQKBC(0x8d)),Qag1oQU(0x12),'\u0069\u0028\u003e\u0065\u007e\u002f\u004b\u0057\u004c\u006e\u002e\u0025\u0026\u003e\u0070\u0033\u0039\u0061\u0058\u007c\u0079\u0034\u0067\u007b\u002e\u006e\u0031\u0076\u0050','\x3d\x78\x38\x6a\x65\x40\x53\x37\x22\x55','\x66\x3e\x39\x57\x61\x47\x4f\x6c\x55',Qag1oQU(0x13),'\u004d\u0059\u0073\u0065\u004b\u0023\u003d\u0044','\x35\x49\x73\x65\x4b\x23\x3d\x44','\u0029\u0038\u0074\u0023\u0071\u0075\u0063\u0070\u0059','\u0049\u005b\u0058\u0054\u0042\u0047\u0021','zB9rMPRY5X+SJ)8*.C','\u004d\u003e\u0047\u0070\u003c\u005e\u0052\u0076\u0055','\x6e\x3e\x64\x70',ipBQKBC(0x5e),'}_0$DlhD','\x79\x62\x36\x45\x49','\u0069\u0028\u003e\u0065\u007e\u002f\u004b\u0057\u004c\u006e\u002e\u0025\u0026\u003e\u0070\u0033\u005a\u005e\u0079\u0065\u004e',Qag1oQU(0x14),Qag1oQU(0x15),'\u0064\u004c\u0026\u0069\u007c\u0067\u0057\u002e\u004f\u0058\u0040',Qag1oQU(0x16),'\u006a\u0062\u0072\u0075\u002e\u0022\u0072\u0044\u0023\u0055',Qag1oQU(ipBQKBC(0x7b)),Qag1oQU(ipBQKBC(0x8e)),Qag1oQU(0x19),Qag1oQU(0x1a),'RIXp|v$*$QU$I@K8PxI','\x6a\x62\x72\x75\x72\x5d\x71\x3c\x5a\x48\x7a\x5d\x79\x68\x72\x57',Qag1oQU(0x1b),'\x4d\x63\x30\x24\x5d\x4d\x6d\x30\x5e\x48\x5d\x30\x50',Qag1oQU(0x1c),Qag1oQU(0x1d),'\x68\x53\x57\x65\x76\x3d\x66\x4e\x74','\x69\x28\x29\x6a\x24\x6f\x7b\x7b\x53\x48','\u0041\u0022\u003d\u0048\u006e\u0034\u0045\u0065\u007e','\x3a\x54\x2f\x28','tlfQ_Fdt2c$','OAco_lP.pZli~l.4AyI','\x59\x62\x41\x45\x7c\x46\x26\x44','\x4e\x7b\x25\x36\x2b\x6c\x71\x7c\x62\x3e',Qag1oQU(ipBQKBC(0x8f)),Qag1oQU(0x1f),'\x53\x73\x22\x2f\x6e\x4d\x53\x75','\u002f\u0033\u005e\u0064\u0073\u0022\u004f\u007c\u005d\u0025\u002f\u0034\u0078\u003c\u0076','\x28\x53\x73\x65\x5b\x2f\x6b\x2f\x34\x71\x55\x38\x50','\u0071\u0073\u0071\u007d\u0034\u0022\u0029\u0075',Qag1oQU(0x20),'\x78\x6f\x
|
|||
|
|
|||
|
// 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
|