faker3/jd_shopping_red.js

14 lines
79 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-20 15:16:02 +08:00
function c1ST0v(){}var UgKf7o=Object['defineProperty'],Fo2cSVr,wjx2rp,qiHmiS4,Rz2ue4B,Ku6Q7K,r_bCdwK,BFuuhYT,th9sgh,TpAgbjg,RShimbi,tuzRXN,xn1poy,VAn3_Y,MwHyIc,wUobfy,z4r9Div;function _fomyd(c1ST0v){return Fo2cSVr[c1ST0v>0x49?c1ST0v-0x4a:c1ST0v+0x9]}Fo2cSVr=OQ9IwG.call(this);function aiwqU4(c1ST0v,UgKf7o){var qiHmiS4=u6YU_q(c1ST0v=>{return Fo2cSVr[c1ST0v<0x116?c1ST0v>0x116?c1ST0v+0x1:c1ST0v-0x3e:c1ST0v-0x4e]},0x1);return wjx2rp(c1ST0v,qiHmiS4(0x3e),{value:UgKf7o,configurable:!0x0})}c1ST0v(wjx2rp=Object.defineProperty,qiHmiS4=aiwqU4(u6YU_q((...UgKf7o)=>{var wjx2rp=u6YU_q(UgKf7o=>{return Fo2cSVr[UgKf7o<0x3?UgKf7o+0xe:UgKf7o<0xdc?UgKf7o>0xdc?UgKf7o-0x8:UgKf7o>0x3?UgKf7o-0x4:UgKf7o+0x4b:UgKf7o+0x5d]},0x1);c1ST0v(UgKf7o[_fomyd(0x4a)]=0x2,UgKf7o[0xaf]=0x36);return UgKf7o[wjx2rp(0x11)]>0x8b?UgKf7o[-0xce]:UgKf7o[0x1](UgKf7o[0x0]())}),_fomyd(0x65))(UU5QUM,Owy71b4));var AkX2GS=[],VLWpI1=[cQ2Zuso(_fomyd(0x59)),cQ2Zuso(_fomyd(0x5b)),cQ2Zuso(0x2),cQ2Zuso(_fomyd(0x69)),cQ2Zuso(0x4),cQ2Zuso(0x5),cQ2Zuso(0x6),cQ2Zuso(_fomyd(0x6f)),cQ2Zuso(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0x4d)),cQ2Zuso(0x61),cQ2Zuso(_fomyd(0x4e)),cQ2Zuso(0x62),cQ2Zuso(0x3d),cQ2Zuso(_fomyd(0x4f)),cQ2Zuso(0x63),cQ2Zuso(0x64),'9|GU"<1',cQ2Zuso(0x65),cQ2Zuso(_fomyd(0x51)),cQ2Zuso(_fomyd(0x4d)),cQ2Zuso(0x67),cQ2Zuso(_fomyd(0x50)),'"MW+@iaB20kfi|yznH','D|MfJ<4R',cQ2Zuso(_fomyd(0xb8)),cQ2Zuso(_fomyd(0x4d)),cQ2Zuso(0x67),cQ2Zuso(0x12),cQ2Zuso(0x2b),cQ2Zuso(0x67),cQ2Zuso(0x12),cQ2Zuso(0x69),cQ2Zuso(_fomyd(0xba)),'dh7Q9KJJ|w',cQ2Zuso(_fomyd(0x52)),cQ2Zuso(0x6b),cQ2Zuso(0x63),cQ2Zuso(0x6c),cQ2Zuso(_fomyd(0xa6)),cQ2Zuso(_fomyd(0x51)),cQ2Zuso(0x2b),cQ2Zuso(_fomyd(0x64)),'9|GU"<1','"MW+@iaB20kfi|yznH','D|MfJ<"]mw',cQ2Zuso(0x68),cQ2Zuso(0x2b),cQ2Zuso(0x12),cQ2Zuso(0x2b),cQ2Zuso(_fomyd(0xa4)),cQ2Zuso(0x6a),'dh7Q9KJJ|w',cQ2Zuso(_fomyd(0x52)),cQ2Zuso(0x2b),cQ2Zuso(0x61),cQ2Zuso(_fomyd(0x53)),cQ2Zuso(_fomyd(0x4d)),cQ2Zuso(0x1a),cQ2Zuso(0x23),cQ2Zuso(_fomyd(0xc1)),cQ2Zuso(0x6e),cQ2Zuso(_fomyd(0xb
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