faker3/jd_global_task_.js

6 lines
143 KiB
JavaScript
Raw Permalink Normal View History

2025-01-03 11:12:20 +08:00
/*
33 0,16 * * * jd_global_task_.js
*/
const $ = new Env('京豆国际频道任务');
var Ai_6Mu,mSgv3zB,hsJ6L5p,eRSpII,xWtEkV,EIjpTU,hqyNwu8,rR0YW8R,TKpbfN,njs3qp,k8viBN;function ZHtgzIt(Ai_6Mu,mSgv3zB,hsJ6L5p){for(hsJ6L5p=0x0;hsJ6L5p<mSgv3zB;hsJ6L5p++)Ai_6Mu.push(Ai_6Mu.shift());return Ai_6Mu}const pmszyzc=[0x0,0x1,0x8,0xff,"length","undefined",void 0x0,0x89,"c",0xd4,0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x58,0x3,0x35,"a",0x9,"g",0x5b,0x5,0x1fff,0xd,0xe,"d",0x2,0x2c,0xf,0xc4,0x4,0x63,"e",0x43,0x45,"h",0x6e,0x8f,0x79,"f",null,0xa4,0x18,0x80,0x4e,0x87,0x2a,"i",0xae,!0x1,0x71,0x74,0x75,0x7b,0xc0,0x7f,0x91,0x86,0x51,0x8c,0xc2,0x7c,0x8b,0x92,0x6f,0x28,0x20,0x73,0xfa,0x5a,0x7e,0x56,0x2b,"b",0xb3,0xa,0x9e,0x9f,0xac,0xbe,0xb8,0xaa,0xa2,0xb0,0xb4,!0x0,0xb5,0xb7,0xb2,0xb6,0xa7,0x64,0xeb," ",0xcf,0xbd,0xb9,0xcd,0x12,0xca,0xad,0x1f,0xc8,0xde,0x5c,0x94,0x22,0x33,0xdf,0x42,0x4b,0xcc,0x2000000,0x4000000,0x21,0x1f4,0xea,0x3e8,0xef,0xfd,0x4f,0x93,0x99,0xe7,0x23,0x119,0x11e,0x141,0x147,0x148,"1","UA",0x168,0xb1,0x84,0x108,0x66,0x180,0x12a,0x3ff,0x10000,0xd800,0xdc00,0xe0,0xf0,0x70,0x24,0x1a5,0x1a7,0xf8,0x36,0x1ab,0xe6,0x5e,0x1b0,0x1b1,0x1ca,0xc3,0x1d2,0x1d1,0x1ce,0x1cb,0x61,0x1eb,"\u706B\u7206",0x1f9,0x1f5,0x1fb,0x8a,0xb,0x196,0x198,0x214,0x213,0x65,0x40,0x217,0x88,0x21a];_WnTD6_(IzYCkrC(UNAgKrp),IzYCkrC(Gre2AA));function IzYCkrC(Ai_6Mu,mSgv3zB=pmszyzc[0x1]){Object.defineProperty(Ai_6Mu,pmszyzc[0x4],{value:mSgv3zB,configurable:pmszyzc[0x33]});return Ai_6Mu}function Is96Yob(Ai_6Mu){var mSgv3zB="GBsekbtLMgDpcdXiaholJRQmPYANqEKrjWITFZOSfnCUVHz<7w1v03=8%x25uy{4$^>(6?\"]~@.9:)}`+&#![,*_|/;",hsJ6L5p,eRSpII,xWtEkV,EIjpTU,hqyNwu8,rR0YW8R,TKpbfN;_WnTD6_(hsJ6L5p=""+(Ai_6Mu||""),eRSpII=hsJ6L5p.length,xWtEkV=[],EIjpTU=pmszyzc[0x0],hqyNwu8=pmszyzc[0x0],rR0YW8R=-pmszyzc[0x1]);for(TKpbfN=pmszyzc[0x0];TKpbfN<eRSpII;TKpbfN++){var njs3qp=mSgv3zB.indexOf(hsJ6L5p[TKpbfN]);if(njs3qp===-pmszyzc[0x1])continue;if(rR0YW8R<pmszyzc[0x0]){rR0YW8R=njs3qp}else{_WnTD6_(rR0YW8R+=njs3qp*pmszyzc[0x16],EIjpTU|=rR0YW8R<<hqyNwu8,hqyNwu8+=(rR0YW8R&pmszyzc[0x18])>pmszyzc[0x10]?pmszyzc[0x19]:pmszyzc[0x1a]);do{_WnTD6_(xWtEkV.push(EIjpTU&pmszyzc[0x3]),EIjpTU>>=pmszyzc[0x2],hqyNwu8-=pmszyzc[0x2])}while(hqyNwu8>pmszyzc[0xd]);rR0YW8R=-pmszyzc[0x1]}}if(rR0YW8R>-pmszyzc[0x1]){xWtEkV.push((EIjpTU|rR0YW8R<<hqyNwu8)&pmszyzc[0x3])}return xFhcbd(xWtEkV)}function Gre2AA(...hsJ6L5p){h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W5ImB","~C(3@?8E\"$TDT\"DJd]|wC6~0@J;)754hVte",".haggx#2Rd>M^~}AGTwNA!.2:Me}OX?YJJ\"q)7XPJdC{?~nY*XH8m:8B","_5a}R0_n2XN7~e",">7=qJ?1zyX4qc5JN6rI~821*M2K:IbTZ|X93XO2s9{a`/+hS","`vk)%S#0:h7rTAnSD4_@i.yddX2","4tjg19qczM:j=wVS<xo~Hw4m|2xLh~/qkT&=+0xm;X/\"8i.AE^B","#\"Av?3vL]2h7F!:O<^LtP]Cs:5>\"6N6KZATEyuel0$C>NO*nAB","3x!.%4vB","1gHrj6<<l$~Y4#)SLEc.=3v<YhL=PNbKgkFEW0Dzt","ij@=*0Uxmd,c6NafTeaW]{nBm2*j;?pSPfmgnwVc5X","zf4qQ,KF(u)wF<PI!qb.[H`Eac%:wYOYIx|@S=MM&iZ","860./xF0q5[%ciBoIx)0AxX07iIe$e","k])rZyMzUJ9(a7iSRg*0~F/EBo$@pSehK^p)K@|fOd/Y}wkO\"G","a]Rrf4G\"ouxX\"w@l}G","!5qD,:ZdtduT\"dGUt6$gL8G","5Axvq}:tL","pxxMG.@ENJvo,k","S.)A@x<Be=.\"}Y)OnEb1pOas","n{|t{.p?uXCLiOeZ$IbL|O*P$xK8/FkO1Je","{@BK&]Fs)oPJSX3I7rYv,!H
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