faker3/jd_shopping_red.js

14 lines
82 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
逛商品赢红包
可能会403 请使用代理
cron:1 1 1 1 *
*/
const $ = new Env('逛商品赢红包')
2024-08-29 23:50:55 +08:00
function wz6RSN(){}var eAvUDDP=Object['defineProperty'],nQexcF,CJOMG9,H2Sfb7,KesYZD,HwApb5,lYUF8n2,VDcIkKa,pj8R07,S3FJC1,YEQZ7D,iB85we,Upkeyon,JXOLq2,YRkXcUe,wfSgnC,fkMbMO,LqsX8M,nYdf3w;function wcP_BH(wz6RSN){return nQexcF[wz6RSN<-0x33?wz6RSN+0x52:wz6RSN+0x32]}nQexcF=vD0zQYk();function C2hcRxY(wz6RSN,eAvUDDP){var H2Sfb7=D9QGbg(wz6RSN=>{return nQexcF[wz6RSN<0xe8?wz6RSN>0xe8?wz6RSN-0x2d:wz6RSN>0x1c?wz6RSN-0x1d:wz6RSN+0x53:wz6RSN-0x12]},0x1);CJOMG9(wz6RSN,H2Sfb7(0x33),{value:eAvUDDP,configurable:wcP_BH(0x76)});return wz6RSN}wz6RSN(CJOMG9=Object.defineProperty,H2Sfb7=D9QGbg((wz6RSN,eAvUDDP)=>{return eAvUDDP(wz6RSN())},0x2)(yiEiwhe,e4KYaw8));var HFuibv5=[],hMjKXJi=[uJ_jaS(0x0),uJ_jaS(wcP_BH(-0x17)),uJ_jaS(0x2),uJ_jaS(wcP_BH(-0x24)),uJ_jaS(0x4),uJ_jaS(wcP_BH(-0x25)),uJ_jaS(wcP_BH(-0x1f)),uJ_jaS(0x7),uJ_jaS(0x8),'U|oyZotV`)',uJ_jaS(wcP_BH(0x1)),uJ_jaS(wcP_BH(0x2)),uJ_jaS(0xb),uJ_jaS(wcP_BH(-0x16)),uJ_jaS(0xd),uJ_jaS(wcP_BH(-0x15)),uJ_jaS(wcP_BH(0x27)),uJ_jaS(0x10),uJ_jaS(wcP_BH(0x33)),uJ_jaS(wcP_BH(-0x1e)),uJ_jaS(0xe),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J_jaS(wcP_BH(-0x31)),uJ_jaS(wcP_BH(-0x2c)),'@Z|IPeqOXYp[{!Hj|nVe%_c?0q',uJ_jaS(0x2a),uJ_jaS(0x69),uJ_jaS(0x6a),uJ_jaS(0x3e),uJ_jaS(wcP_BH(0x41)),uJ_jaS(wcP_BH(0x42)),uJ_jaS(wcP_BH(0x40)),uJ_jaS(0x6e),uJ_jaS(0x6f),uJ_jaS(wcP_BH(0x31)),uJ_jaS(0x71),uJ_jaS(wcP_BH(0x1f)),uJ_jaS(0x1c),uJ_jaS(0x73),uJ_jaS(wcP_BH(-0x2b)),uJ_jaS(0x3c),uJ_jaS(wcP_BH(-0x2d)),uJ_jaS(0x74),uJ_jaS(wcP_BH(-0x2c)),uJ_jaS(0x75),uJ_jaS(0x76),'~^Q,`:Yf?X2l:@b|9x',uJ_jaS(0x77),uJ_jaS(wcP_BH(0x49)),'D2R)"C{|WF_',uJ_jaS(wcP_BH(0x48)),uJ_jaS(0x1c),uJ_jaS(0x7a),uJ_jaS(0x7b),uJ_jaS(0xd),uJ_jaS(0x7c),uJ_jaS(0x7d),uJ_jaS(0x7e),uJ_jaS(0x7f),uJ_jaS(0xd),uJ_jaS(wcP_BH(-0x12)),'|=ET','&abBY_7``WuKM|;9TG',uJ_jaS(wcP_BH(0x44)),uJ_jaS(0x82),uJ_jaS(0x83),uJ_jaS(0x1c),'&abBY_7``WuKM|;9TG',uJ_jaS(0xd),uJ_jaS(wcP_BH(0x55)),uJ_jaS(wcP_BH(-0x2a)),uJ_jaS(wcP_BH(0x54)),uJ_jaS(0x2c),uJ_jaS(0x37),uJ_jaS(0x75),uJ_jaS(0x76),uJ_jaS(0x87),uJ_jaS(wcP_BH(-0x3
2024-06-28 15:38:28 +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