mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
13 lines
102 KiB
JavaScript
13 lines
102 KiB
JavaScript
|
/*
|
|||
|
活动名称:种豆得豆收取好友营养液
|
|||
|
活动入口:APP-我的-种豆得豆
|
|||
|
|
|||
|
cron:1 8,14,20 * * * jd_plantBean_friend.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('种豆得豆收取好友营养液')
|
|||
|
function GhDlI3(){}var ZoUANHa=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],Y98JEoP,HFxYSB4,RgnSm8,OXCQI0,VlhjJL,a7muVH,Nf38_d6,z0EY_B,gNQrwk,s0IEgat,WFho7SO,hBKWDUp,k8etux,QmlVYKG,A0z5gN,QMwGpT,l_IgRV,rtlHqh,yag_B0w,olkIhR;function swD9Tub(GhDlI3){return Y98JEoP[GhDlI3>-0x34?GhDlI3<-0x34?GhDlI3+0x6:GhDlI3+0x33:GhDlI3+0x7]}Y98JEoP=dQ8Pk9();function IGmzKTk(GhDlI3,ZoUANHa){HFxYSB4(GhDlI3,swD9Tub(-0x33),{value:ZoUANHa,configurable:!0x0});return GhDlI3}GhDlI3(HFxYSB4=Object.defineProperty,RgnSm8=IGmzKTk(zT9uaP((...ZoUANHa)=>{var HFxYSB4=zT9uaP(ZoUANHa=>{return Y98JEoP[ZoUANHa<0x94?ZoUANHa>-0x46?ZoUANHa<-0x46?ZoUANHa-0x11:ZoUANHa<0x94?ZoUANHa+0x45:ZoUANHa-0x5a:ZoUANHa+0x3c:ZoUANHa+0x13]},0x1);GhDlI3(ZoUANHa[swD9Tub(-0x33)]=swD9Tub(-0x30),ZoUANHa[swD9Tub(-0x32)]=-0x88);if(ZoUANHa[HFxYSB4(-0x44)]>-swD9Tub(-0x2e)){return ZoUANHa[0x6e]}else{var RgnSm8=zT9uaP(ZoUANHa=>{return Y98JEoP[ZoUANHa>0x3c?ZoUANHa>0x3c?ZoUANHa-0x3d:ZoUANHa-0x18:ZoUANHa-0x62]},0x1);return ZoUANHa[RgnSm8(0x3f)](ZoUANHa[HFxYSB4(-0x35)]())}}),0x2)(yceLfF,eEUAOn));var xw9iqW=[],X1xcWMO=[mbVbqV(0x0),mbVbqV(swD9Tub(-0x31)),mbVbqV(swD9Tub(-0x30)),mbVbqV(0x3),mbVbqV(swD9Tub(-0x16)),'\u0041\u007c\u0042\u002e\u005e\u0021\u004a\u0023\u0048\u0039\u002f\u002c\u0056\u0059\u003c\u006e\u002f\u0064\u0065\u0058\u0051\u0056\u0029\u0051','A|B.^!J#H9/,VY<nqdeXQV)Q',mbVbqV(swD9Tub(-0x18)),mbVbqV(0x6),mbVbqV(swD9Tub(-0x10)),mbVbqV(0x8),mbVbqV(0x9),mbVbqV(swD9Tub(-0xe)),mbVbqV(0xb),mbVbqV(swD9Tub(-0x1d)),mbVbqV(swD9Tub(-0x2f)),mbVbqV(swD9Tub(-0x9)),mbVbqV(swD9Tub(-0x1e)),mbVbqV(0x10),mbVbqV(0x11),mbVbqV(0x12),mbVbqV(swD9Tub(-0x1)),mbVbqV(0x14),mbVbqV(swD9Tub(0x8)),mbVbqV(0x16),mbVbqV(0x17),mbVbqV(0x18),'Bf3TCt|Q',mbVbqV(swD9Tub(0xa)),mbVbqV(0x1a),mbVbqV(swD9Tub(0xd)),'{T^<`LQ}5)2A|q',mbVbqV(0x1c),mbVbqV(0x1d),mbVbqV(0x1e),mbVbqV(0x1f),mbVbqV(swD9Tub(-0x12)),mbVbqV(0x21),mbVbqV(0x22),mbVbqV(0x23),mbVbqV(0x24),mbVbqV(0x25),mbVbqV(0x26),mbVbqV(0x27),mbVbqV(0x28),mbVbqV(0x29),mbVbqV(swD9Tub(-0x2f)),mbVbqV(0x2a),mbVbqV(0x2b),mbVbqV(0x2c),mbVbqV(swD9Tub(-0x29)),mbVbqV(0x2e),mbVbqV(swD9Tub(0x7)),mbVbqV(0x30),mbVbqV(swD9Tub(0x28)),mbVbqV(swD9Tub(0x29)),mbVbqV(swD9Tub(-0x27)),mbVbqV(swD9Tub(-0x2b)),mbVbqV(0x35),mbVbqV(swD9Tub(0x44)),mbVbqV(0x37),'\u007e\u005d\u002c\u0054\u0023\u007a\u0056\u007c\u003c\u0079\u0075\u003d\u0041\u0070\u0051\u002f\u003a\u004b\u0031',mbVbqV(0x38),mbVbqV(0x39),mbVbqV(0x3a),mbVbqV(swD9Tub(-0x2f)),mbVbqV(0x3b),mbVbqV(0x3c),mbVbqV(0x3d),mbVbqV(swD9Tub(0x30)),mbVbqV(swD9Tub(-0x1b)),mbVbqV(swD9Tub(0x31)),mbVbqV(swD9Tub(-0x1c)),mbVbqV(0x42),mbVbqV(0x43),'\u0033\u007c\u003d\u0029\u0072\u0049\u004b\u0041','Pq6>!=|A',mbVbqV(0x44),mbVbqV(0x45),mbVbqV(swD9Tub(-0x2d)),swD9Tub(-0x2c),mbVbqV(swD9Tub(-0x21)),mbVbqV(swD9Tub(0x4)),mbVbqV(0x49),mbVbqV(swD9Tub(-0x2e)),mbVbqV(0x4b),mbVbqV(swD9Tub(-0x2d)),mbVbqV(0x47),mbVbqV(0x4c),swD9Tub(-0x2c),mbVbqV(0x4d),mbVbqV(swD9Tub(-0x2f)),mbVbqV(0x2a),mbVbqV(0xd),mbVbqV(swD9Tub(-0x2a)),mbVbqV(swD9Tub(0x36)),mbVbqV(0x4f),mbVbqV(swD9Tub(-0x2b)),mbVbqV(swD9Tub(-0xd)),mbVbqV(0x51),mbVbqV(0x52),mbVbqV(0x53),mbVbqV(swD9Tub(0x2f)),mbVbqV(0x54),'\u002c\u002b\u0043\u0021\u0035\u0036\u0058\u0023\u0064\u006d\u0073\u004e\u0068\u0044\u007c\u0052',mbVbqV(swD9Tub(-0x25)),mbVbqV(0x56),mbVbqV(0x57),mbVbqV(0xd),mbVbqV(swD9Tub(-0xa)),mbVbqV(0x59),mbVbqV(0x2d),mbVbqV(0x5a),mbVbqV(0x5b),mbVbqV(swD9Tub(-0x2f)),mbVbqV(swD9Tub(-0x2a)),mbVbqV(0x35),mbVbqV(swD9Tub(0x73)),mbVbqV(0x2c),mbVbqV(swD9Tub(-0x29)),mbVbqV(0x5d),mbVbqV(0x5e),mbVbqV(0x5f),mbVbqV(swD9Tub(0x46)),mbVbqV(0xd),mbVbqV(0x2a),mbVbqV(0x61),mbVbqV(swD9Tub(-0x28)),mbVbqV(0xd),mbVbqV(swD9Tub(-0x2a)),mbVbqV(0x61),mbVbqV(swD9Tub(-0x28)),mbVbqV(swD9Tub(0x19)),mbVbqV(swD9Tub(-0x2f)),mbVbqV(0x2a),mbVbqV(0x61),mbVbqV(swD9Tub(0x24)),mbVbqV(swD9Tub(-0x2f)),mbVbqV(0x2a),mbVbqV(0x61),mbVbqV(0x64),mbVbqV(swD9Tub(0x3b)),mbVbqV(swD9Tub(-0xb)),mbVbqV(0x65),mbVbqV(swD9Tub(0x48)),mbVbqV(0x67),mbVbqV(swD9Tub(0x3f)),mbVbqV(0x5c),mbVbqV(swD9Tub(0x49)),mbVbqV(0x5d),mbVbqV(swD9Tub(-0x26)),mbVbqV(0x4b),mbVbqV(0x6b),'~],T#zV|<yu=ApQ/:K1',mbVbqV(0x6c),mbVbqV(0xd),mbVbqV(0x6d),mbVb
|
|||
|
// 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
|