mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 08:19:11 +08:00
15 lines
65 KiB
JavaScript
15 lines
65 KiB
JavaScript
|
/*
|
|||
|
小程序签到
|
|||
|
|
|||
|
入口:微信小程序-京东购物
|
|||
|
|
|||
|
定时随机
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('小程序版签到')
|
|||
|
function HPqiKkk(){}var NjHcQ6a=Object['defineProperty'],LZA9OL,fqemWt,niqpm39,Mva3t_S,sbpMMZP,QEoU1I7,eOMJSe,yl3jE_,YISvRs,ipfxzTi,evNAdH,adEL9mI,MFD_OI,e1EJygm,EwGsEB,R6bwzf;function RxEVAr(HPqiKkk){return LZA9OL[HPqiKkk<0x4a?HPqiKkk<0x4a?HPqiKkk>0x4a?HPqiKkk-0x48:HPqiKkk+0x4f:HPqiKkk+0x54:HPqiKkk+0x25]}LZA9OL=yFyijm();function mIuboIp(HPqiKkk,NjHcQ6a){var niqpm39=NeoFtPC(HPqiKkk=>{return LZA9OL[HPqiKkk<0x7d?HPqiKkk>-0x1d?HPqiKkk+0x1c:HPqiKkk-0xf:HPqiKkk-0x10]},0x1);return fqemWt(HPqiKkk,niqpm39(-0x18),{value:NjHcQ6a,configurable:niqpm39(0x3f)})}HPqiKkk(fqemWt=Object.defineProperty,niqpm39=NeoFtPC((HPqiKkk,NjHcQ6a)=>{return NjHcQ6a(HPqiKkk())},0x2)(BN5ThT,mEDrCPc));var BMwitm=[],rBVR_k=[zqRALka(RxEVAr(-0x42)),zqRALka(RxEVAr(-0x45)),zqRALka(0x2),zqRALka(0x3),zqRALka(RxEVAr(-0x48)),zqRALka(RxEVAr(-0x4a)),zqRALka(RxEVAr(-0x3e)),zqRALka(0x7),zqRALka(RxEVAr(-0x2a)),zqRALka(0x9),zqRALka(0xa),zqRALka(RxEVAr(-0x10)),zqRALka(0xc),zqRALka(0xd),zqRALka(0xe),zqRALka(RxEVAr(-0x40)),zqRALka(0x10),zqRALka(0x11),zqRALka(0x12),zqRALka(0x13),zqRALka(0x14),zqRALka(0x15),zqRALka(RxEVAr(-0x6)),zqRALka(RxEVAr(-0x1e)),zqRALka(0x17),zqRALka(RxEVAr(-0x4f)),'\u007c\u0041\u004f\u002b\u0066\u005a\u003d\u0073\u002e\u002f\u0070\u0052\u003f\u0066\u0059\u0035\u002b\u007e\u0071\u0073\u002e\u0053\u0046',zqRALka(RxEVAr(-0x41)),zqRALka(RxEVAr(-0x3)),zqRALka(RxEVAr(-0x4e)),zqRALka(RxEVAr(0x0)),zqRALka(RxEVAr(0x7)),zqRALka(RxEVAr(-0x4f)),zqRALka(RxEVAr(-0x3c)),zqRALka(0x1e),zqRALka(0x1f),zqRALka(0x20),']^DG4k@vXq|2iXiQNF','\x7c\x2b\x49\x60\x3b\x38\x24\x41',']^HT#|m',zqRALka(0x21),zqRALka(0x22),zqRALka(RxEVAr(0x1)),zqRALka(RxEVAr(0x2)),zqRALka(0x25),zqRALka(0x26),zqRALka(0x27),zqRALka(RxEVAr(0x6)),zqRALka(0x29),zqRALka(0x2a),zqRALka(0x2b),zqRALka(RxEVAr(-0x5)),zqRALka(RxEVAr(-0x28)),zqRALka(0x2e),zqRALka(RxEVAr(-0x25)),zqRALka(0x30),zqRALka(RxEVAr(-0x27)),zqRALka(0x32),zqRALka(0x1b),zqRALka(0x33),zqRALka(0x26),zqRALka(0x34),zqRALka(0x1b),zqRALka(0x35),zqRALka(RxEVAr(0xb)),zqRALka(RxEVAr(-0x35)),zqRALka(RxEVAr(0xd)),zqRALka(0x39),zqRALka(0x3a),zqRALka(0x3b),zqRALka(RxEVAr(-0x4e)),zqRALka(0x3c),zqRALka(0x3d),zqRALka(RxEVAr(0xe)),zqRALka(0x3f),zqRALka(0x40),zqRALka(0x41),zqRALka(RxEVAr(-0x4d)),zqRALka(RxEVAr(-0x4e)),zqRALka(0x1b),zqRALka(0x42),zqRALka(RxEVAr(-0x4c)),zqRALka(RxEVAr(-0x4e)),zqRALka(RxEVAr(-0x4d)),zqRALka(RxEVAr(0x3)),zqRALka(RxEVAr(0xf)),zqRALka(RxEVAr(-0x13)),zqRALka(0x45),zqRALka(RxEVAr(0x10)),zqRALka(0x47),zqRALka(0x48),zqRALka(RxEVAr(0x32)),zqRALka(0x4a),zqRALka(0x4b),zqRALka(0x4c),zqRALka(0x4d),zqRALka(0x4e),zqRALka(0x4f),zqRALka(0x50),'awfrT)(Qq&4_s]|9#o[&_/&82&7P)Xz9XB+[R)M^a=',zqRALka(0x51),zqRALka(0x52),zqRALka(RxEVAr(-0x4c)),zqRALka(0x1b),zqRALka(RxEVAr(-0x1a)),zqRALka(0x54),zqRALka(RxEVAr(0x13)),zqRALka(0x56),zqRALka(0x57),zqRALka(0x58),zqRALka(RxEVAr(0x15)),zqRALka(0x5a),zqRALka(0x5b),zqRALka(0x5c),zqRALka(RxEVAr(0x16)),zqRALka(0x5e),zqRALka(RxEVAr(0x17)),zqRALka(0x60),zqRALka(0x61),zqRALka(RxEVAr(-0x37)),zqRALka(RxEVAr(-0x32)),zqRALka(RxEVAr(0x9)),zqRALka(0x65),zqRALka(0x66),zqRALka(RxEVAr(-0x31)),zqRALka(0x68),zqRALka(0x69),'\x62\x25\x69\x3a\x6a\x28\x6b\x75\x4f\x2b\x3a\x67\x76\x5a\x6d\x58\x6d\x4c\x40\x46\x51\x42\x61\x50\x70\x41\x55\x3c\x52\x67\x6e\x26\x71\x55\x68\x7c\x39\x6c\x55\x61\x4d\x60\x77\x3b\x30\x26\x29\x64\x40\x55\x75',zqRALka(RxEVAr(-0xc)),zqRALka(RxEVAr(0x1a)),zqRALka(RxEVAr(0x1b)),zqRALka(0x6d),zqRALka(0x6e),zqRALka(RxEVAr(0x1d)),zqRALka(0x29),zqRALka(0x70),zqRALka(RxEVAr(-0x18)),zqRALka(0x72),zqRALka(RxEVAr(0x1e)),zqRALka(0x74),zqRALka(0x75),zqRALka(RxEVAr(-0x4d)),zqRALka(0x76),zqRALka(0x77),zqRALka(0x78),zqRALka(RxEVAr(0x46)),zqRALka(0x7a),zqRALka(RxEVAr(0x20)),zqRALka(0x7c),zqRALka(0x7d),zqRALka(0x7e),zqRALka(0x7f),zqRALka(RxEVAr(0x21)),'p0|24y.{zr_>F',zqRALka(0x81),zqRALka(0x82),zqRALka(0x83),zqRALka(0x84),zqRALka(RxEVAr(0x23)),zqRALka(0x86),zqRALka(RxEVAr(0x24)),'tp>WuM#"yr|UF',zqRALka(0x88),zqRALka(RxEVAr(0x26)),zqRALka(0x8a),zqRALka(0x8b),zqRALka(0x8c),zqRALka(0x8d),zqRALka(0x8e),zqRALka(0x8f),zqRALka(0x90),zqRALka(0x91),zqRALka(0x92),zqRALka(RxEVAr(-0x1)),zqRALka(RxEVAr(0x28)),zqRALka(0x95),zqRALka(RxEVAr(0x30))
|
|||
|
|
|||
|
// 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
|