jdpro/jx_niuniu_merge.js

9 lines
202 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
牛牛乐园 入口京喜特价-我的
7 7 7 7 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jx_niuniu_merge.js
跑会黑一周后解循环
updatetime:2023/09/3 fix
*/
const $ = new Env('牛牛乐园合成');
const _0x37b184=_0x1ea9,_0x499918=_0x1ea9,_0x50eb99=_0x1ea9,_0x31a8a2=_0x1ea9,_0xed5acc=_0x1ea9,_0x47c6a6=$[_0x37b184('0x3fa','7kva')]()?require(_0x499918('0x652','22nf')):'',_0x2ad11d=require(_0x37b184('0x60e','D5pk')),_0x252fd1=$[_0x499918('0x213','X&9h')]()?require(_0x50eb99('0x55d','vd@o')):'',_0x2e82b3=require(_0x499918('0x1f6','#U2v'));let _0x140018=[],_0x34e588='',_0x2f9035=![];if($[_0x31a8a2('0x39a','GJGb')]()){Object[_0xed5acc('0x1dd','8DD7')](_0x47c6a6)[_0xed5acc('0x15c','aNU9')](_0xabaf0b=>{const _0x35eb26={_0x2f37c7:'0x642',_0x282e7b:'o6Vw'},_0x590af7=_0x1ea9;_0x140018[_0x590af7(_0x35eb26._0x2f37c7,_0x35eb26._0x282e7b)](_0x47c6a6[_0xabaf0b]);});if(process[_0x37b184('0x5e3','5$lU')][_0xed5acc('0x423','NFx8')]&&process[_0x50eb99('0x215','B(AP')][_0x37b184('0x157','r(NP')]===_0x37b184('0x514','87vp'))console[_0x499918('0x362','Vci2')]=()=>{};}else _0x140018=[$[_0x31a8a2('0x3bd','(^(9')](_0x31a8a2('0x1f5','kvSH')),$[_0xed5acc('0x47e','87vp')](_0x50eb99('0x1c5','2OV7')),..._0x1af223($[_0x50eb99('0x3ba','NFx8')](_0x37b184('0x1aa','22nf'))||'[]')[_0x50eb99('0x26a','CTJw')](_0x52eb71=>_0x52eb71[_0x31a8a2('0x3bc','Th7O')])][_0x50eb99('0x2d5','NFx8')](_0x126d17=>!!_0x126d17);$[_0x31a8a2('0x5cb','z4TK')]=0x137c+0x1e6+0xd*-0x1a5,message='',!(async()=>{const _0x3a05b5={_0x4db47b:'0x234',_0x544f81:'Th7O',_0x434dd8:'0x240',_0x125b0a:'z4TK',_0x13821b:'0x168',_0x4a52a1:'ay*A',_0x162175:'0x485',_0x18f0e4:'lZ0R',_0x512ec9:'0x1a2',_0x38158c:'J9$r',_0x1ea46e:'0x185',_0x3f8e69:'ft#e',_0x258d66:'0x5d0',_0x9e1c87:'#O&[',_0x345a37:'0x56a',_0x53cec2:'K(V*',_0x475373:'0x2e4',_0x59faea:'t(kj',_0x1ab7d9:'0x359',_0x4b2c60:'8DD7',_0x2e3dbf:'0x440',_0x3ae6d0:'t(kj',_0x44cac7:'0x44a',_0x41baf1:'v*oi',_0x3d2ff6:'0x5ff',_0x238408:'bkWU',_0x2d2cdd:'0x445',_0x244027:'Vci2',_0x39e882:'0x3c4',_0x244384:'ft#e',_0x45fc0f:'0x659',_0x1e7d48:'@22e',_0x12a568:'0x2fb',_0x268404:'NFx8',_0x44fa25:'0x633',_0x4ba4a2:'2OV7',_0x39086a:'0x536',_0x315339:'aNU9',_0x4270ac:'0x331',_0x3fb79b:'0x60f',_0x8eb0ac:'9BF2',_0x50123b:'0x3dc',_0x1bea11:'7kva',_0x2f26d5:'0x481',_0x3898db:'0x226',_0x1afa5f:'Vci2',_0x1ef4e6:'0x24c',_0x2c6441:'#U2v',_0x379dbe:'0x132',_0x444706:'v*oi',_0x107032:'0x217',_0x5ba787:'6wdA',_0x490d0b:'0x47d',_0x5d9aa8:'(^(9',_0x3a4f8e:'0x13f',_0x319454:'0x5a5',_0x1880eb:'D5pk',_0x39791e:'0x59b',_0x2a3b47:'N#@2',_0x3dc59d:'0x373',_0x2cc75f:'7kva',_0x341bdc:'0x62d',_0xeb2d5b:'B(AP',_0x1f1652:'0x56b',_0x1e1945:'2OV7',_0xd63883:'0x3ec',_0xad8318:'D5pk',_0x427cc7:'0x5c6',_0x908fe2:'0x174',_0x100b4c:'CTJw',_0x1bb476:'0x2fe',_0x3837c4:'87vp',_0x3bc964:'0x2f4',_0xb1ff84:'lZ0R',_0x1b81d7:'0x52d',_0x4ebe9f:'0x50e',_0x3cdb41:'0x283',_0x682431:'X&9h',_0x2c4169:'0x3eb',_0x58415d:'aNU9',_0x2343f9:'0x421',_0x554bb5:']eZG',_0x579602:'0x5c7',_0x4d6bdb:'JI4z',_0x1b1275:'0x1fe',_0x4d7b48:'oUXA',_0x4e9eb1:'0x473',_0x69a314:'r(NP',_0x24086e:'0x277',_0x3a96b4:'5$lU',_0xf4ff5d:'0x196',_0x387767:'kx9T',_0x6d59a1:'0x1f1',_0x11644e:'87vp',_0x113ef0:'0x33b',_0x55c620:'0x596',_0x17030b:'0x26e',_0x2226a6:'m)Wi',_0x4fafc3:'0x318',_0x5f110f:'KX&M',_0x2db094:'0x657',_0x218346:'F%tz',_0x2edddd:'0x1a7',_0x18c57a:'0x46f',_0x5757d3:'0x5f4',_0x2ffee7:'F%tz',_0x438869:'0x417',_0xa5695b:'rGpd',_0x3b2640:'0x62e',_0x1e8c5f:'0x3d1',_0x10b89f:'JI4z',_0x439f8c:'0x2d8',_0x489625:'aNU9',_0x411ee7:'0x54b',_0x457375:'GJGb',_0x3ff90b:'0x338',_0x191ff0:'87vp',_0x3a94a1:'0x3ad',_0x14fb0f:'0x53b',_0x57326d:'kx9T',_0x443709:'0x3ea',_0x3e91cc:'JI4z',_0x20fb7a:'0x2ed',_0x18e4c0:'0x3e0',_0x3b6e01:'0x15f',_0xfecfe8:'pzI&',_0x504326:'0x4c0',_0x130abb:'CTJw',_0x2e6bc8:'0x58a',_0x282e69:'0x164',_0x42c94f:'0x238',_0x27843d:'X&9h',_0x51249d:'0x45a',_0x12af7b:'X&9h',_0x4d4d3e:'0x230',_0xe0da1a:'tM3i',_0x440f24:'0x2b3',_0x40f09b:'0x14d',_0x5e4957:'N#@2',_0x4385ef:'0x364',_0xd03817:'87vp',_0x15fcf4:'0x3a7',_0x21922c:'GJGb',_0x458532:'0x454',_0x2c5a8f:'ft#e',_0x50bb80:'0x593',_0x2f412c:'7kva',_0x2fff36:'0x17f',_0x376bcc:'0x4ea'},_0x1a4696=_0x1ea9,_0x385d21=_0x1ea9,_0x1466c9=_0x1ea9,_0x319855=_0x1ea9,_0x29939c=_0x1ea9,_0xba77a9={'yEvvE':_0x1a4696(_0x3a05b5._0x4db47b,_0x3a05b5._0x544f81),'HfHHw':_0x1a4696(_0x3a05b5.
function Env(t, e) { 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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) :