mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
15 lines
120 KiB
JavaScript
15 lines
120 KiB
JavaScript
|
/*
|
|||
|
不会自动运行,请在有水的时候运行
|
|||
|
|
|||
|
//export jd_opencard_jdDraw="true" //true 开启抽奖,false 关闭抽奖
|
|||
|
//export jd_opencard_break="true" //IP限制后继续执行(true/false)
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('8.15-9.30 轻松育儿集卡礼2')
|
|||
|
function aUesg0(){}var wHuwN0=Object['defineProperty'],CG3uszS,ZLXZXN,CYLu_7S,F5aqmK,EwUZl5,RXuFVZ,uNokNl0,jQIMK8,DcP8VU,Br18dki,R3LAneE,r5v0BTQ,NZui_Z,_LayXf,olx2l6;function CMKA0Oj(aUesg0){return CG3uszS[aUesg0<0x28?aUesg0+0x6:aUesg0>0x28?aUesg0-0x29:aUesg0-0x23]}CG3uszS=cEFN6TY.call(this);function yJ_sAx(aUesg0,wHuwN0){return ZLXZXN(aUesg0,CMKA0Oj(0x4c),{value:wHuwN0,configurable:CMKA0Oj(0x91)})}ZLXZXN=Object.defineProperty;var x7S62eC=[],WId4bK6=['pjy$7Z>r','M_E<>FxcI',')@~InCie','VJ^[,E$e','9%0$%Ch@v','NUz$|FOrv',';+^.i>:2','kkP!+m&','?L![=','$ZGex`MMuI2','=Kj{cc"4','C#3{KG0','4^m*i','/!W5Tj}G','Fd;oO#3jv~s','A@o[)','[EVDg',CMKA0Oj(0x29),'f$3;>P,HrW@1EtpooJE','~]#XY','IqoQ','Cr[#m}ea',':D1;?4Ba','w]CcK#=','Cr[#m}&(u6z4d~<Cu|Y"Px=','o|hQW9!xtBd[~tTW$Yl)!XWR#e$GV~tbuqh3{3=','mJ>oF>"Eqd','O/u_J_+Dqd','b"`Vd_+Dqd','96^tgjtd$8/','MJWzk','Oi(D','qtVDX_/a',':"BD',CMKA0Oj(0x43),'Iaw|ds]S&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4hR~0Z,nd~!)luv>t>L','/DMcl9i415~X?GyT,sa','/D8XY~$Any^yzG!j^|E','~;Yi},be:',CMKA0Oj(0x2b),'xb?Cds$YK*$1OmMX/D%*^(=fGHcbZQWIRMo!{m@VSk(yk;49|yU,/D#Cic0FnpxvGO','J=O,dbdK','^|0;(9=','{EFQT(p9^w;Gnd_CL^E','X2ZS[','7_dn`c3${pW]COCYRovD','n{cQuuscY9v','j^BD','^@JS[f|K',')_TL03ea',CMKA0Oj(0x36),')_bmY','o^IQ','^@!o?uz};%L1:+L','/D8X+*5AV@?1O','^@JS[f04>VOrwm','j^BD',':foo7p<Sg<$y<fR','/D%*^(}O','i2N<','"L~,;NcK',';;|"y0m<eI|1/+L',CMKA0Oj(0x3c),'XT|oEu%K','T7zS[','"Zk*d9yAfh71loPT','XT|oEuV4gU3cq','e8RC`X*TmA>','DuFwhSo&:4k','S^sXY','T7zSPXnK','5dJ<QRgg2%','h/0;%;WR^e','#Pi*`zea',':D];?4=','5d4@(iXg`97^BvL','Nxmoh*)(*p*Wwm','t9$n4DUtizm;XWe','h/0;CKjF7W','U^$Q+1E<;rxkq','>;[X73)(3](WUnL','>;[X+1]#W9/c|DGzTq','Ggp&}mW~CoF1."P(MN]/[IOv`W"AqO','mi5DczTa',':fvTFi4c}*I?=LN(R#6SYW+ghcC$i2NyiA6~|<"^Gx;]h)v?wurd','mi5DczTa','s|J",OLn&}!:#kj[0O3',CMKA0Oj(0x2c),'<m3o>G3K,I',CMKA0Oj(0x2d),'pi~XX:OR9H',':m9@~*&K',CMKA0Oj(0x3a),'_@JS[f%K',CMKA0Oj(0x3b),'n{=<iRnK','Bi7*:*Y##W','aisXY','<m3o>G3K,I',CMKA0Oj(0x30),'ymBSS7.','V|1;999O','iX4@&GLK','mi5DczTa','OmfSSGqMu8','p2P,?3|K','JJ>D','TA%o*u2K','Nxn@t0B[O','8AJS|H;q','wLc"Go4K','y"3Lb(h;u6+',CMKA0Oj(0x2c),'MSgiP!ng:',CMKA0Oj(0x31),CMKA0Oj(0x2d),'RX#XV4=','n{cQuuncDrr?a_cdEq',':m9@~*&K','OmfSSGLK',':m9@~*&K','HJhQC%Va','vBty[','mi5DczTa','{E7*T%OYq?k>QU','TA%o*u2K','L^]Xo%WKm','RBtyLiLK','aB_iFR&K','{El)I[Ta','[EUQr)Y##W','5dJ<QRgg2%','[EUQr)Y##W','`}a|*','X79@/?%K','Q23o&!^K','8AUy`!wM@I4=q','8]p3d)w#m','n{cQuu!L}]G','0FPr]gWiPW^Lk#PVFq','[4O>*St:=','5dg~+$.','4Z1;c_=fGH+','j^BD','g7M)F3Kbm','p^Lph','/D8XY~$AnyE]O','GqADL','s^2c?*=',CMKA0Oj(0x33),'HJ8XkxQ1:WQ?v~r','nJ5Dk_F;|W',CMKA0Oj(0x2e),CMKA0Oj(0x34),')_bmY','/D8XY~$Any>4.i','/DMcl9i415~X?GyT,sa','8]p3qKqa','^|0;(9=','PE@Df','o|hQW9!xg;}@>J2d{;.iU.R;+@b)>jJNT^%c8>p{C57yd>1q_vz_<Ckru;;4W9tW?:#tWn$mdDjyBT4H&;xi7NaAvW94R~UR4SdgyPymG"A>V72da"ec^4OON5]','VtZ3:*ra',CMKA0Oj(0x2f),'/D8XY~$Any^yzG!j^|E','/D%*^(}O',')t#B','[EUQU7R;:W','GqAD()"fC5_/E+r','jPeLM','/D%*^(=fGH+','"Zk*d9yAfh71O','"Zk*d9ea','Z_jXY','4Z1;c_}O','Bi7*n:7a',CMKA0Oj(0x30),'=J,GH','V|1;99V1gww<{l1qdO',CMKA0Oj(0
|
|||
|
// 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
|