faker3/jd_opencard_1209.js

15 lines
95 KiB
JavaScript
Raw Normal View History

2024-12-10 11:12:39 +08:00
/*
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_1209.js
*/
const $ = new Env('12.9-12.16 潮冬特惠 尽显实惠')
function cWFksI(){}var drJiAff=Object['defineProperty'],tKUDYNU,ksG5His,l3iHCP,tA9K11l,WAeiyy,PsEa1xS,lO69VSM,AfcHya,ID9UhG,KsWt74T,Ycx8Vh,SQ8peG_,Ltz2ba,WA9gap,YXZg6TC,avwG0de,oeylUbk,QI63umR,RXgaGL8;function T1er0K5(cWFksI){return tKUDYNU[cWFksI<0x36?cWFksI-0x18:cWFksI-0x37]}cWFksI(tKUDYNU=lWHQJ_(),ksG5His=ekf1ws((cWFksI,drJiAff)=>{return drJiAff(cWFksI())},0x2)(D7_WHex,vYrKXz5));var wNDDHnv=[],CHjmkSj=[OEI_nMm(0x0),OEI_nMm(0x1),'tHn>v,FI',OEI_nMm(T1er0K5(0x6f)),'Fj|(N#y}Z|a2I&Z','$$;XDGn50f)K6y4RjV','FR[0','Q:!v`*^ugB{a>@yZ`|F0',OEI_nMm(0x3),'@cvHC','\x51\x3a\x21\x76\x60\x2a\x5e\x75\x67\x42\x7b\x61\x3e\x40\x4a\x51\x67\x2c\x43\x77\x45\x5d\x55','j"e7&E8A:rPp.yl[[$.','A$t0=usMI<wJy_bs}V',T1er0K5(0x37),T1er0K5(0x37),'[,t0rdT]yY>!@y=r"CzNTHr2vn"_W@ysgRte6eU','m$r{3','V|u9','RyW9HL;5','DwY9',T1er0K5(0x47),OEI_nMm(0x4),',K}9x','[,t09si]RBmc8L+ryfWbmR5;HtL<T__II#CwQM7vmh3f6!WiFRmXRujjU98hQQri2V','kSt0H{Z2c2wpV','o$nG{dy5','{cKx{"/7`','\x35\x7a\x29\x56\x76\x29\x7e\x4a','kSt0H{Z2c2wpV',OEI_nMm(T1er0K5(0x66)),'{cKx{"/7`','Z#Y9','YVH_s','HV.Cw%e88A','*C(_s4#.;"oLz',',zu_A?6Zc9OaY=HA.w_Yl?8E.9L~,?hAQW@y0Q/V',T1er0K5(0x46),'\x61\x6f\x70\x37\x58\x4c\x55\x6a\x5f\x41\x31','MvOT_,`dLd3?z','y#fw)"}5','3>OTIyG','o$nG{dy5','\x42\x66\x49\x50\x61\x37\x47','j$KGm{jh_P1','Zwq7$NCvvr','A$KGm{jh_PFXy_ys0V','F,ZYz"Q5',OEI_nMm(0x6),'}$SGWK=j`','<cQXGdn5','n>K2MSs88A',OEI_nMm(T1er0K5(0x57)),T1er0K5(0x3a),T1er0K5(0x4c),')|}9x','ZV[CP,wY','A$~HmL[2kBNpV','\x6c\x3b\x5a\x48\x2b\x47\x6c\x32\x63\x32\x4b\x4a\x38\x4c\x5d\x52','1vMT>','!.KG[JU','Z#wXIu;5','Ry2HneV7l',OEI_nMm(T1er0K5(0x61)),OEI_nMm(0x9),T1er0K5(0x40),T1er0K5(0x4a),OEI_nMm(0xa),OEI_nMm(0xb),'Ayh9','I$h93Lk7,r','C^Bt','oiyWC_JU!>pFSxg?xe$7Q_}N#"C#`qN%:x"GRbqh<]zwa',OEI_nMm(0xc),T1er0K5(0x38),';9~HC@"}I<lf[|',OEI_nMm(T1er0K5(0x5f)),'\u005a\u0023\u0059\u0039','"FifBjaNia;:&4i<?,_&A{LwGV','_R}9x','Z#Y9',T1er0K5(0x38),')|}9x',T1er0K5(0x37),'\u0041\u0024\u007e\u0048\u0033\u005d\u0030\u0070\u0044\u0072\u0030\u002b\u004f\u0040\u003a','Z#Y9',']s+Q>)P(>yEwLqQu@|L([I1btXQ"|4i<|}%!X")eWRXK^8d1I/I:',';9mXzd|aph@H+_<=8)5','\x3b\x39\x7e\x48\x43\x40\x22\x7d\x49\x3c\x23\x3c\x7b\x5f\x54\x5a\x23\x2c\x2e',T1er0K5(0x4e),';9KG#uUj_A1','Z#Y9',']s+Q>)"CMG"pV`mH;9KG#uUj_AXso0rF2m[T6`PW(3u<37ad,</8;9vQ|XqkIl]O_V','ma)g',OEI_nMm(T1er0K5(0x60)),OEI_nMm(0xf),'cj2Lk?9og5C~zA?sqaj',',DQrK','SL>I%Xe"6lrcQVQC2[O9',T1er0K5(0x3d),'EaYH',';9~HC@"}HtG;`T:','\x7c\x48\x33\x72\x4b\x22\x3a\x49\x4f\x2f\x6a\x36\x21',OEI_nMm(0x10),T1er0K5(0x39),T1er0K5(0x3e),'Dj[[SlJ(bJ"<Jj2','i|@]1]fBak','}MnLd+`.+z+8mn','Yn2L_6pV]B','i|@]@^Eo&5m5Es%l','j$t0$"Js!:/wd|',OEI_nMm(0x11),'qAW4a.FB;yS{gG','Y|SGh;GlQh,','Yn2L2~;%Q{#','Yn2LO$2X4f','Ca@qo*rX',T1er0K5(0x42),'i|@]svEo&5H{I"o','t;q7V;d?`','i|@]?2`.25.8i=Z','i|@]@^Eo&5m5Es%l',OEI_nMm(0x5),'t;q7lS5a`','##Mp}eU','i|@]R0K}}f','\x58\x6e\x51\x72\x4b','I#CwLS^uSBuatW:',OEI_nMm(T1er0K5(0x55)),OEI_nMm(0x13),'0|.HHLU',OEI_nMm(T1er0K5(0x49)),'0|.HHLU','OaK,&~5%8y[;bC$EW!',T1er0K5(0x39),'4L86','w6K,O?U','=_;]**1Zo5$','Sj$iDyRX^3%pKxYdh|`t6Y1brb/6M](wjAh[>&y.q]x{NG?_Gb<zGo9WIobw!ct','o$nG{dy5','I#Cwb','"FifBjaNia;:&4i<?,_&A{LwGV','<leS&@U',T1er0K5(0x3b),'Z#Y9',T1er0K5(0x3a),OEI_nMm(T1er0K5(0x68)),';9~HC@"}I<.cV',OEI_nMm(0x16),OEI_nMm(0x17),OEI_nMm(0x18),'S?!l{.w5K8','A$~H3]0pDr0+O@:',T1er0K5(0x3b),'fa!l','1l"IJvP_;!FEz`|M4k,','mKAO8v&#35Dp)?>^256Pg6}5WpT*)G?XMYnIy)C20!o|^);x.~j.c0{Lt55_8va8z:Ua8S/H^lG|iM_f(5#PoX,d~8v_}Fg}_r^3|q|H`Vd)9o>^,VRIY_eeX!%',OEI_nMm(0x19),'1lyE[F/dS|Y|j`&GYKB','Y|SG,c>=72',OEI_nMm(T1er0K5(0x6b)),'\u0051\u0056\u003a\u0045\u003f\u0076\u0057\u002c',T1er0K5(0x43),'Y|SGIDS5er','b#qxkdH5',OEI_nMm(0x1b),'Z#Y9',']%9l','}$t0H{A5','}?%i{.G}C',OEI_nMm(0x1c),'l;u9k"Jl#fB<O@j[(#h9','Jl"IPDpUJLs`7`gm7RB','[/dl$I}$U8Tha`&G1(/aJ','Jl"IPDpUMzAbcodqf?B','Go;L,GU',OEI_nMm(0x1d),'"?Fi2I:69fp;e','#r!lE.]d(Cz@f&L','C1@lw/cCYbh|~F$rfbej4Iz>kbvp:3L0Nx$sK_|dH','](3G:"n5','@caXb',T1er0K5(0x4f),'_[<xK*hjynBpTSDjQ,>9','`m!H.vW,1:Y60&;x[e','1%.sk/0,',OEI_nMm(T1er0K5(0x5b)),OEI_nMm(T1er0K5(0x6a)),T1er0K5(0x3c),'VakEIjC[C','+JmC','\x5b\x59\x3d\x49\x3d',')|}9x',T1er0K5(0x50),'XSoebL[2l','KcpG#uU','W,cYN!W5',OEI_nM
// 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