faker3/jd_opencard_0819.js

16 lines
114 KiB
JavaScript
Raw Normal View History

2024-08-19 18:04:10 +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_0819.js
*/
const $ = new Env('8.19-8.23 养生要趁热 苦夏也能健康过')
function JAofPh5(){}var KUCL6d=Object['defineProperty'],sLMWmj_,jQKUQ1b,AfjLGH,WHHWyA,C_XSJx,CH7asd,KQ0RGOd,fZaDIC,Cv_qXcj,Cy5zs1,VmC_W3B,bbaSdK,M3dHC4,pqpYjy,WFXxHc,fDZNiw0,yJz8YTr;function DGm2N_q(JAofPh5){return sLMWmj_[JAofPh5<0x147?JAofPh5>0x147?JAofPh5-0x5e:JAofPh5<0x3f?JAofPh5-0x2d:JAofPh5-0x40:JAofPh5+0x8]}sLMWmj_=WpHVFw.call(this);function kViM5h(JAofPh5,KUCL6d){jQKUQ1b(JAofPh5,DGm2N_q(0x63),{value:KUCL6d,configurable:!0x0});return JAofPh5}jQKUQ1b=Object.defineProperty;var nlKoH0b=[],gHsIxJJ=[')yyM8cSY?','@go"KG3W','8fX;#v=2','q4<JW90YZ','aq6vrc)2','/dRx}nC2','$3y]m<#K#5Y;sR','bj_s?',';*}E+F~~Wyp','?]V5qqQr','(Z95]}2','rm41@','v"[/*T0g','q2p<Z#3T?jh','>FeRX','lf%Tz','()k3uoMZ','snhr','_WltBd#2|gu~>NM/BAsr','_WltBdkZ','[T+^R~DZ','V*_E9t=','N*tYK','_WltBd#2|gu~>Na_|iK&wq=','p8I^<w;SW1!+fMChh)f','S),r?2e9FO&aMjze:c',DGm2N_q(0x40),DGm2N_q(0x40),'hi,r1o4qMD>lNM?18KU04Y15tk8j%NMe|n,I]I=','J)1uy','cA2T','nM%TY7PZ','[&DT',DGm2N_q(0x41),'sZVi>b*.#y(QN>7oiO!.#mc','qeR_>b1k+6D4c','i`:Tx','hi,rTeGqng0','))Djhh3*B0y','Z`g0/FI:~>^','jMk3Jujt^50','Jv/YR3aCrkQ','f&Jj48"}h5','X{,rYu/5*5&+c','()k3uoMZ','X{,rYuPZ','q.pEK',DGm2N_q(0x42),'/vDT',DGm2N_q(0x41),'bA:T?[ett1',')@+MI7d?KsACg','1P5jRE&u[TM3eEMl{u<Jh:BD1u"mt8mld^4.&a8g',')@+MI7=D','#P`3?Sh','mH3J.PhZLlr','8byzM/)D','q.pEK','NW^">d?D','"NyzZPh',DGm2N_q(0x42),'jnpE4"=','Z|];B/1D','sMND','n"<J|#~D','l|];B/ZfL!%.NLNFzg','si/DU8_Z','S)5Y}s=','/&"^)0Ktt1',':){3%`?pB','sCa.;OqD','%M(IX0Ktt1','o1GM/O*2"fHcFX','jbB#8S`FR',')@+MI7d?Ksx^iX','bA:Tx','RXf@./4D','S)LYJ7%Z','xX".I','x)nMc;lD','q.6TY7_Z','=b8zN','lf`3ha=','/v&EF2PZ','nM5YkIc^C','zv5YK',DGm2N_q(0x58),']f[YQ3SZ','L*CI!R}}@5','sntDC8%pB','bv}ER3=','SM6T',DGm2N_q(0x44),'/vDT','yoN_/wpE`u#H^S62SC~.)wc','?oFW!F4&l`k&iBtor9}.2Dc','/vDT','yoN_/wpE`u#H^S62SC~.)w7<L:/Lx5<9GS:Xia5Alq@1Z','PTLYKN8:FOCVhA','z{J0XI9eB','&(+^ZPQZ',DGm2N_q(0x43),'8sGVgp~0G~PW<}GOsc','l~c<3.M[=',DGm2N_q(0x46),DGm2N_q(0x43),'yoN_/wpE`u#H^S62SC~.)w7<L:/Lx5<9GS:Xia5Alq@1Z','bA:Tx','bA:T?[yZ','S)LYyqr+[1rRHNW','/vDT','qeR_>b!.>Mw&7"_2NA7.hFQz,E_8A}GOA:$lE8bI%nE`#;oQFmFW','bA:T?[ett1','PTJEUo%Z','fv0IC8QZ',']f=B','PTLYKNyZ','07na{3QZ','sn,r','EvJ0XI9eB','PT`3v2=pjSQ',DGm2N_q(0x43),'qeR_>b8K938+cBJYPT,r','u*cp)8EtZe6=c','5Jh4]B!%.y2Oy^~oiOm;PTt_AE"XFC','hvsr','/vDT','<R=G{CIEpYI0Z]_oP0~.,Jc','[tYd3.&K935&3STo$MwVnnc','r"mh2belC',']f{3k7aXrgzRH)7_xvf','&MbYK','{7>F$EI8]C1*_c_K5hHT','%i+^oo|+J6Q','/vDT','PTLYKN8:Y,3PB4W','l?v*o','9&[Y)oG5+6EVrm','XD)Wa?u','EcH~//TC','OhND','/vDT','[phh{Ca.za8Oap5',',P"^`^15vk','twA3$u#2uHu~hA',DGm2N_q(0x4e),'DA{3i*_Z',',P"^"@/X4ghg/_}n','#Q8`QUlM','g"L/?hu','Uj7yy','DA{3]iT5^5:*c','x)(Iv2C5+6EVrm','DA{36P3C_6i','DA{3{R+}bVQ','DA{3F[{ZI1','zv"xXoYZ','9&[Y)oQZ',DGm2N_q(0x4d),',P"^cPo@B',',P"^_9WZ','PW.*f<nZ',',P"^7{#2{g2~,%W',',P"^"@/X4ghg/_}n','()k3uoMZ',',P"^C{Z~B','vv9+:I=',',P"^U0Ktt1',DGm2N_q(0x41),'FvK&7{#2{g2~,%W','S)LYh2wZr1A9B4"n`*f','E)Xrx','~"65h+ZG','N0p=t7XG','I8{uuhd','Y2?[=KqqJZ','I8{uuhd','~"65b&PU(VNM*>tgv3','PTLYKN8:FOvOuj4/vif',DGm2N_q(0x49),'9M6T','d*K&F7=',DGm2N_q(0x56),'BAsr','{p)G[MnE#y$+`xDo6AB,]Dc','~X&X%v@.,z>&3STo[P;]UGc','?5ei]B!%.yfiEyDov/m',DGm2N_q(0x42),'FvK&z','8sGVgp~0G~PW<}GOsc','l~c<3.M[=',DGm2N_q(0x4f),DGm2N_q(0x45),'0MtD','~(+^E7=pjSQ','/vDT','z{J0XI9eB','CvxC,','PTLYKN8:FOf*c','jn:Tx',DGm2N_q(0x4b),'07eBK','bv}ER3=',DGm2N_q(0x44),'S)LYyqvc','hW+x[3:Z',DGm2N_q(0x45),'0MtD','F)6Ty7PZ','SM6T','&(+^ZPQZ',DGm2N_q(0x57),'eW_E1','hi,r1o4qz^d!<)}>]^@Am@5^Q!e0</)G?v`EL<C]_6{O><+n7Hu7a_yW|^^~1oM1R[tM1F8B>T/OD?~S#^qA{GZ:H1o~5Nm5~.>zOwOBj&:<%{}>Z&kEv~ccG6*','%M(I[3Ktt1','~(+^E7=pjSQ','GO+|g','wr?Bl#mgtRER<^q*E@p','DA{3i*>?^5','wrN{E+~3^F=','y)^8x','K.JBOh=i','6[>pJ','Ufb{]@r)`)gkW','Ufb{tJbiV6','IE%G(hBi','Kr_|)','%i+^oo`WXg[','*EUr',DGm2N_q(0x59),'gOouB<Fi',')OkU28*)j','xrX!f7=i','jw+r(mHi','pi7I{3fc','H&a&z','xrX!f7&:x0V^y^SvyAp','K8:T(E5(t1egMj4/P#8MU','UTJEAd!t?R,Va{:wS)f','{5w8@{~','$/a.38zg=&2aW',DGm2N_q(0x5a),'$/_rB8%g"je+Fq0','CP2TX8aCvVgOHN(.SVcu;ER}bVo![zW_sn(Ii~O:B','q.y3W8kZ','#kY!I','/&"^]EGc','FO_rG','jhOx`d6pMkg+4{[p_i>T','jh6B7oQZ','d*hE&lkZ','wk8V;mCi','hi,r1o4qMD>lNM?18KU04Y15tk8j%NMe|n,I
// 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