feat: 2.1.0 incidents, filter bar and IP analysis redesign; probe egress files fix
CI / Format and vet (pull_request) Successful in 1m1s
CI / Dependency audit (pull_request) Successful in 32s
CI / Tests (Linux, race detector) (pull_request) Successful in 1m55s
Release / Plan (reuse the published image?) (push) Successful in 4s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (hub) (push) Skipped
Release / Publish tags (probe) (push) Skipped
Release / Gitea release (push) Skipped
CI / Format and vet (pull_request) Successful in 1m1s
CI / Dependency audit (pull_request) Successful in 32s
CI / Tests (Linux, race detector) (pull_request) Successful in 1m55s
Release / Plan (reuse the published image?) (push) Successful in 4s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (hub) (push) Skipped
Release / Publish tags (probe) (push) Skipped
Release / Gitea release (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7c92d4b359
commit
00c4ab6d4a
15 files changed
+1063
-238
No files matched your search
+216
-29
@@ -310,7 +310,32 @@
|
||||
'ip.rel.campaigns.empty': 'Not part of a detected campaign.',
|
||||
'ip.rel.campaign.ips.one': '{n} IP',
|
||||
'ip.rel.campaign.ips.other': '{n} IPs',
|
||||
'ip.rel.open': 'Open analysis of {ip}'
|
||||
'ip.rel.open': 'Open analysis of {ip}',
|
||||
'ip.sec.summary': 'Summary',
|
||||
'ip.sec.attack': 'Targets & techniques',
|
||||
'ip.sec.identity': 'Identity',
|
||||
'ip.sec.events': 'Events',
|
||||
'ip.q.what': 'What it did',
|
||||
'ip.q.when': 'When',
|
||||
'ip.q.against': 'Against',
|
||||
'ip.q.blocked': 'Blocked?',
|
||||
'ip.q.blocked.yes': 'Yes, on {hosts}',
|
||||
'ip.q.blocked.no': 'No active ban',
|
||||
'ip.q.blocked.list': 'on the exported blocklist',
|
||||
'ip.q.last': 'last seen {ago}',
|
||||
'ip.q.more': '+{n} more',
|
||||
'ip.q.nothing': 'Nothing recorded in this period',
|
||||
'ip.score.over': 'Raw score {n}; the scale is capped at 1000.',
|
||||
'ip.def.hosts': 'Status per host',
|
||||
'ip.def.host.on': 'banned by {jails}',
|
||||
'ip.def.host.off': 'no active ban',
|
||||
'ip.def.history': 'Ban history ({n})',
|
||||
'ip.id.title': 'Identity and clients',
|
||||
'ip.id.hint': 'Where it comes from and what it claims to be. Location is approximate; user agents are easy to forge.',
|
||||
'ip.ev.filter': 'Show',
|
||||
'ip.ev.filter.all': 'All categories',
|
||||
'ip.ev.filter.none': 'No event of this category on this page.',
|
||||
'ip.attack.hint': 'What it asked for, against which sites, and the MITRE ATT&CK techniques that implies.'
|
||||
},
|
||||
'pt-BR': {
|
||||
'ip.title': 'Análise de IP',
|
||||
@@ -610,7 +635,32 @@
|
||||
'ip.rel.campaigns.empty': 'Não faz parte de uma campanha detectada.',
|
||||
'ip.rel.campaign.ips.one': '{n} IP',
|
||||
'ip.rel.campaign.ips.other': '{n} IPs',
|
||||
'ip.rel.open': 'Abrir a análise de {ip}'
|
||||
'ip.rel.open': 'Abrir a análise de {ip}',
|
||||
'ip.sec.summary': 'Resumo',
|
||||
'ip.sec.attack': 'Alvos e técnicas',
|
||||
'ip.sec.identity': 'Identidade',
|
||||
'ip.sec.events': 'Eventos',
|
||||
'ip.q.what': 'O que fez',
|
||||
'ip.q.when': 'Quando',
|
||||
'ip.q.against': 'Contra o quê',
|
||||
'ip.q.blocked': 'Está bloqueado?',
|
||||
'ip.q.blocked.yes': 'Sim, em {hosts}',
|
||||
'ip.q.blocked.no': 'Sem ban ativo',
|
||||
'ip.q.blocked.list': 'na lista de bloqueio exportada',
|
||||
'ip.q.last': 'última vez {ago}',
|
||||
'ip.q.more': '+{n}',
|
||||
'ip.q.nothing': 'Nada registrado neste período',
|
||||
'ip.score.over': 'Pontuação bruta {n}; a escala vai até 1000.',
|
||||
'ip.def.hosts': 'Situação por host',
|
||||
'ip.def.host.on': 'banido por {jails}',
|
||||
'ip.def.host.off': 'sem ban ativo',
|
||||
'ip.def.history': 'Histórico de bans ({n})',
|
||||
'ip.id.title': 'Identidade e clientes',
|
||||
'ip.id.hint': 'De onde vem e o que diz ser. A localização é aproximada; user agents são fáceis de falsificar.',
|
||||
'ip.ev.filter': 'Mostrar',
|
||||
'ip.ev.filter.all': 'Todas as categorias',
|
||||
'ip.ev.filter.none': 'Nenhum evento desta categoria nesta página.',
|
||||
'ip.attack.hint': 'O que pediu, contra quais sites, e as técnicas MITRE ATT&CK que isso indica.'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -828,6 +878,7 @@
|
||||
return {
|
||||
level: levelOf(has(v.level) ? v.level : d.level),
|
||||
score: score1000(has(v.score) ? v.score : d.score),
|
||||
raw: num(has(v.score) ? v.score : d.score),
|
||||
strong: !!v.strong,
|
||||
admin: !!v.admin,
|
||||
reasons: arr(v.reasons).filter(isObj)
|
||||
@@ -852,7 +903,7 @@
|
||||
// one coherent view of the bans: the history plus any ban that is active now
|
||||
function banList(d) {
|
||||
var raw = arr(has(d.bans) ? d.bans : d.ban_history).filter(isObj);
|
||||
var list = raw.map(function (x) { return { jail: x.jail, t: ts(x.t), unban: ts(x.unban), active: x.active === true || (x.active === undefined && !ts(x.unban)) }; });
|
||||
var list = raw.map(function (x) { return { jail: x.jail, host: str(x.host), t: ts(x.t), unban: ts(x.unban), active: x.active === true || (x.active === undefined && !ts(x.unban)) }; });
|
||||
var anyActive = list.some(function (x) { return x.active; });
|
||||
if (d.banned && !anyActive) {
|
||||
var js = arr(d.jails).filter(function (j) { return typeof j === 'string'; });
|
||||
@@ -1102,6 +1153,106 @@
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------- hero: the 5-second answer
|
||||
function moved(card) { var b = card && card.querySelector('.ipx-cb'); return b ? Array.prototype.slice.call(b.childNodes) : []; }
|
||||
function hostBans(d) {
|
||||
var by = {}, order = [];
|
||||
banList(d).forEach(function (b) {
|
||||
var k = b.host || '';
|
||||
if (!by[k]) { by[k] = { host: k, jails: [], active: false, last: 0 }; order.push(k); }
|
||||
var g = by[k];
|
||||
if (b.active) { g.active = true; if (b.jail && g.jails.indexOf(b.jail) < 0) g.jails.push(b.jail); }
|
||||
if (b.t > g.last) g.last = b.t;
|
||||
});
|
||||
arr(d.hosts).forEach(function (x) { var k = keyOf(x); if (k && !by[k]) { by[k] = { host: k, jails: [], active: false, last: 0 }; order.push(k); } });
|
||||
return order.map(function (k) { return by[k]; });
|
||||
}
|
||||
function moreList(list, n) {
|
||||
var out = list.slice(0, n).join(', ');
|
||||
return list.length > n ? out + ' ' + t('ip.q.more', { n: N(list.length - n) }) : out;
|
||||
}
|
||||
function qCell(key, main, sub, tone) {
|
||||
return h('div', 'ipx-q' + (tone ? ' tone-' + tone : ''), h('dt', 'ipx-q-k', t(key)), h('dd', 'ipx-q-v', main, sub ? h('span', 'ipx-q-s', sub) : null));
|
||||
}
|
||||
function heroCard(d, ip, ctx) {
|
||||
var v = normalizeVerdict(d), tone = v.admin ? 'info' : LEVEL_TONE[v.level];
|
||||
var node = h('header', 'ipx-hero tone-' + tone);
|
||||
var id = isObj(d.identity) ? d.identity : {}, geo = isObj(d.geo) ? d.geo : {};
|
||||
var cc = str(geo.cc || d.cc).toUpperCase(), asn = has(id.asn) ? id.asn : d.asn, org = str(id.as_org || d.as_org), rdns = str(has(id.rdns) ? id.rdns : d.rdns);
|
||||
var place = [str(geo.city || d.city), str(geo.country || d.country) || (fmt.country && cc ? fmt.country(cc) : cc)].filter(Boolean).join(', ');
|
||||
var idl = h('p', 'ipx-hero-id');
|
||||
if (place) idl.appendChild(h('span', 'ipx-hero-i', cc && fmt.flag ? fmt.flag(cc) + ' ' : '', place));
|
||||
if (asn || org) idl.appendChild(h('span', 'ipx-hero-i', h('span', 'ipx-mono', asn ? 'AS' + num(asn) : ''), org ? ' ' + clip(org, 60) : ''));
|
||||
if (rdns) {
|
||||
var rd = h('span', 'ipx-hero-i ipx-hero-rdns', untrusted(clip(rdns, 120)));
|
||||
if (has(id.fcrdns_ok)) rd.appendChild(h('span', 'ipx-seal ' + (id.fcrdns_ok ? 'ok' : 'bad'), { title: t('ip.id.fcrdns.hint') }, (id.fcrdns_ok ? '✓ ' : '⚠ ') + t(id.fcrdns_ok ? 'ip.id.fcrdns.ok' : 'ip.id.fcrdns.bad')));
|
||||
idl.appendChild(rd);
|
||||
}
|
||||
var over = v.raw > 1000;
|
||||
var score = h('div', 'ipx-hero-score', { role: 'img', 'aria-label': t('ip.score.label', { n: v.score }) + (over ? '. ' + t('ip.score.over', { n: N(Math.round(v.raw)) }) : ''), title: over ? t('ip.score.over', { n: N(Math.round(v.raw)) }) : '' },
|
||||
h('span', 'ipx-num ipx-hero-sv', N(v.score) + (over ? '+' : '')), h('span', 'ipx-hero-so', t('ip.score.of')));
|
||||
node.appendChild(h('div', 'ipx-hero-top',
|
||||
h('div', 'ipx-hero-main',
|
||||
h('div', 'ipx-hero-line', h('h1', 'ipx-hero-ip ipv', ip), badge(v.admin ? t('ip.admin') : t('ip.level.' + v.level), tone, 'ipx-hero-lv')),
|
||||
h('p', 'ipx-hero-lead', leadText(d, v, ctx)),
|
||||
idl.firstChild ? idl : null),
|
||||
score));
|
||||
// the four questions
|
||||
var q = h('dl', 'ipx-qs');
|
||||
var cats = entries(d.counts).filter(function (e) { return e[0] !== 'ban' && e[1] > 0; });
|
||||
var fams = arr(d.families).filter(isObj).sort(function (a, b) { return num(b.n) - num(a.n); });
|
||||
q.appendChild(cats.length
|
||||
? qCell('ip.q.what', cats.slice(0, 2).map(function (e) { return catLabel(e[0]) + ' (' + N(e[1]) + ')'; }).join(', '), fams.length ? moreList(fams.map(function (f) { return famLabel(f.fam); }), 2) : '')
|
||||
: qCell('ip.q.what', h('span', 'ipx-faint', t('ip.q.nothing'))));
|
||||
var tm = isObj(d.time) ? d.time : {}, first = ts(has(tm.first) ? tm.first : d.first), last = ts(has(tm.last) ? tm.last : d.last);
|
||||
q.appendChild(qCell('ip.q.when', first ? dShort(first) + (last && last !== first ? ' → ' + dShort(last) : '') : '-', last ? t('ip.q.last', { ago: ago(last) }) : ''));
|
||||
var doms = [];
|
||||
arr(d.targets).forEach(function (x) { if (isObj(x) && x.domain && doms.indexOf(x.domain) < 0) doms.push(str(x.domain)); });
|
||||
if (!doms.length) arr(d.domains).forEach(function (x) { var k = keyOf(x); if (k) doms.push(k); });
|
||||
var hostsL = arr(d.hosts).map(keyOf).filter(Boolean);
|
||||
q.appendChild(qCell('ip.q.against', doms.length ? h('span', 'ipx-q-wrap', moreList(doms.map(function (x) { return clip(x, 60).replace(/\./g, '.\u200b'); }), 2)) : hostsL.length ? moreList(hostsL, 3) : '-', doms.length && hostsL.length ? 'host: ' + moreList(hostsL, 3) : ''));
|
||||
var hb = hostBans(d).filter(function (g) { return g.active; }), bl = isObj(d.blocklist) ? !!d.blocklist.listed : !!d.blocklisted;
|
||||
var bv = h('span', 'ipx-q-block', hb.length ? t('ip.q.blocked.yes', { hosts: hb.map(function (g) { return g.host || '?'; }).join(', ') }) : isBanned(d) ? t('ip.def.active') : t('ip.q.blocked.no'));
|
||||
var bcell = qCell('ip.q.blocked', bv, bl ? t('ip.q.blocked.list') : '', hb.length || isBanned(d) ? 'ok' : (v.level === 'hostile' ? 'danger' : ''));
|
||||
if (isBanned(d) && U.unbanDialog) bcell.lastChild.appendChild(h('button', 'ipx-btn sm ipx-q-act', { type: 'button', onclick: function () { U.unbanDialog(d.ip || ip, function () { if (S) load(S); }); } }, t('unban.btn')));
|
||||
q.appendChild(bcell);
|
||||
node.appendChild(q);
|
||||
var b1 = exposureBanner(d), b2 = incidentBanner(d);
|
||||
if (b1) node.appendChild(b1);
|
||||
if (b2) node.appendChild(b2);
|
||||
return node;
|
||||
}
|
||||
function summaryCard(d, ip, ctx) {
|
||||
var v = normalizeVerdict(d);
|
||||
var c = card('ip.sec.summary', null, 12, 'ipx-summary');
|
||||
var two = h('div', 'ipx-vtwo');
|
||||
two.appendChild(reasonsBlock(v));
|
||||
two.appendChild(actionsBlock(d));
|
||||
var conf = h('p', 'ipx-faint ipx-conf', t('ip.score.cuts', { a: 10, b: 50 }) + ' ' + t('ip.confidence') + ': ' + (v.admin ? t('ip.confidence.admin') : v.strong ? t('ip.confidence.high') : t('ip.confidence.medium')) + '.');
|
||||
c.body.appendChild(two);
|
||||
c.body.appendChild(conf);
|
||||
c.body.appendChild(toolbar(d, v, ip, ctx));
|
||||
return c.node;
|
||||
}
|
||||
function attackCard(d) {
|
||||
var tg = safe(function () { return targetsCard(d); }), te = safe(function () { return techniquesCard(d); });
|
||||
if (!tg && !te) return null;
|
||||
var c = card('ip.sec.attack', 'ip.attack.hint', 12);
|
||||
var g = h('div', 'ipx-attack');
|
||||
if (tg) g.appendChild(h('div', 'ipx-attack-t', moved(tg)));
|
||||
if (te) g.appendChild(h('div', 'ipx-attack-m', moved(te)));
|
||||
c.body.appendChild(g);
|
||||
return c.node;
|
||||
}
|
||||
function identityCard(d) {
|
||||
var c = card('ip.id.title', 'ip.id.hint', 12);
|
||||
c.body.appendChild(identityChips(d));
|
||||
var cl = safe(function () { return clientsCard(d); });
|
||||
if (cl) c.body.appendChild(h('div', 'ipx-idcl', moved(cl)));
|
||||
return c.node;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- B: activity
|
||||
function weekdayName(i) {
|
||||
try { return new Date(Date.UTC(2024, 0, 1 + i)).toLocaleDateString(lang(), { weekday: 'short', timeZone: 'UTC' }); } catch (e) { return String(i + 1); }
|
||||
@@ -1273,24 +1424,43 @@
|
||||
if (f0 && bt >= f0) ttb = bt - f0;
|
||||
}
|
||||
if (!list.length && !has(ttb) && !bl && !banned) return null;
|
||||
var c = card('ip.def.title', null, 4);
|
||||
var b = h('div', 'ipx-block');
|
||||
b.appendChild(h('h3', 'ipx-h3', t('ip.def.bans')));
|
||||
if (!list.length) b.appendChild(h('p', 'ipx-muted', t('ip.def.bans.empty')));
|
||||
var c = card('ip.def.title', null, 12);
|
||||
var b = h('div', 'ipx-defgrid');
|
||||
var hs = h('div', 'ipx-block');
|
||||
hs.appendChild(h('h3', 'ipx-h3', t('ip.def.hosts')));
|
||||
var groups = hostBans(d);
|
||||
if (!groups.length) hs.appendChild(h('p', 'ipx-muted', banned ? t('ip.def.active') : t('ip.def.bans.empty')));
|
||||
else {
|
||||
var ol = h('ol', 'ipx-bans');
|
||||
list.sort(function (x, y) { return (y.active ? 1 : 0) - (x.active ? 1 : 0) || y.t - x.t; }).forEach(function (x) {
|
||||
ol.appendChild(h('li', 'ipx-ban',
|
||||
h('span', 'ipx-jail ipx-mono', clip(x.jail, 40) || '-'),
|
||||
x.active ? badge(t('ip.def.active'), 'warn') : null,
|
||||
x.t ? h('span', 'ipx-ban-t ipx-num', t('ip.def.banAt', { when: dt(x.t) })) : (x.synthetic ? h('span', 'ipx-ban-t ipx-faint', t('ip.def.noinfo')) : null),
|
||||
x.unban && !x.active ? h('span', 'ipx-ban-u ipx-num ipx-faint', t('ip.def.lifted', { when: dt(x.unban) })) : null));
|
||||
var ul = h('ul', 'ipx-hostst');
|
||||
groups.forEach(function (g) {
|
||||
ul.appendChild(h('li', 'ipx-hst' + (g.active ? ' on' : ''),
|
||||
h('span', 'ipx-dot tone-' + (g.active ? 'ok' : 'neutral'), { 'aria-hidden': 'true' }),
|
||||
h('span', 'ipx-hst-h ipx-mono', clip(g.host, 40) || '-'),
|
||||
h('span', 'ipx-hst-s', g.active ? t('ip.def.host.on', { jails: g.jails.join(', ') || '-' }) : t('ip.def.host.off'))));
|
||||
});
|
||||
b.appendChild(ol);
|
||||
hs.appendChild(ul);
|
||||
}
|
||||
if (banned && window.Urutau && Urutau.unbanDialog) {
|
||||
b.appendChild(Urutau.el('button', { type: 'button', class: 'btn btn-sm ipx-unban', onclick: function () { Urutau.unbanDialog(d.ip, function () { location.reload(); }); } }, t('unban.btn')));
|
||||
if (banned && U.unbanDialog) hs.appendChild(h('button', 'ipx-btn ipx-unban', { type: 'button', onclick: function () { U.unbanDialog(d.ip, function () { if (S) load(S); }); } }, t('unban.btn')));
|
||||
b.appendChild(hs);
|
||||
var hist = list.filter(function (x) { return !x.synthetic; }).sort(function (x, y) { return y.t - x.t; });
|
||||
var hb = h('div', 'ipx-block');
|
||||
if (!hist.length) { hb.appendChild(h('h3', 'ipx-h3', t('ip.def.bans'))); hb.appendChild(h('p', 'ipx-muted', t('ip.def.bans.empty'))); }
|
||||
else {
|
||||
var det = h('details', 'ipx-hist');
|
||||
if (hist.length <= 4) det.setAttribute('open', '');
|
||||
det.appendChild(h('summary', 'ipx-h3 ipx-sum', t('ip.def.history', { n: N(hist.length) })));
|
||||
var tb = h('tbody');
|
||||
hist.forEach(function (x) {
|
||||
tb.appendChild(h('tr', null,
|
||||
h('td', 'nw', { 'data-label': t('ip.ev.time') }, h('time', 'ipx-num', x.t ? dt(x.t) : '-')),
|
||||
h('td', null, { 'data-label': 'host' }, h('span', 'ipx-mono', clip(x.host, 40) || '-')),
|
||||
h('td', null, { 'data-label': 'jail' }, h('span', 'ipx-mono', clip(x.jail, 40) || '-')),
|
||||
h('td', null, { 'data-label': '' }, x.active ? badge(t('ip.def.active'), 'warn') : x.unban ? h('span', 'ipx-faint', t('ip.def.lifted', { when: dt(x.unban) })) : h('span', 'ipx-faint', '-'))));
|
||||
});
|
||||
det.appendChild(h('div', 'ipx-tbl-w', h('table', 'ipx-tbl ipx-ctbl', h('thead', null, h('tr', null, h('th', null, t('ip.ev.time')), h('th', null, 'host'), h('th', null, 'jail'), h('th', null, h('span', 'sr-only', t('ip.def.title'))))), tb)));
|
||||
hb.appendChild(det);
|
||||
}
|
||||
b.appendChild(hb);
|
||||
c.body.appendChild(b);
|
||||
var f = h('dl', 'ipx-facts');
|
||||
if (has(ttb) || list.length) {
|
||||
@@ -1449,7 +1619,6 @@
|
||||
}
|
||||
function eventsBlock(s) {
|
||||
var box = h('div', 'ipx-block ipx-evs');
|
||||
box.appendChild(sub('ip.ev.title', 'ip.ev.hint'));
|
||||
var body = h('div', 'ipx-ev-b');
|
||||
box.appendChild(body);
|
||||
s.evBox = body;
|
||||
@@ -1464,9 +1633,21 @@
|
||||
if (ev.disabled) { box.appendChild(emptyState(t('ip.ev.disabled'))); return; }
|
||||
if (ev.failed && !ev.rows.length) { box.appendChild(emptyState(s.data && totalEvents(s.data) ? nologText(s.data) : t('ip.ev.unavailable'))); return; }
|
||||
if (!ev.rows.length) { box.appendChild(emptyState(s.data && totalEvents(s.data) ? nologText(s.data) : t('ip.ev.empty'))); return; }
|
||||
var present = [];
|
||||
ev.rows.forEach(function (e) { if (e.cat && present.indexOf(e.cat) < 0 && KNOWN_CATS.indexOf(e.cat) >= 0) present.push(e.cat); });
|
||||
if (ev.filter && present.indexOf(ev.filter) < 0) ev.filter = '';
|
||||
if (present.length > 1) {
|
||||
var sel = h('select', 'ipx-sel', { id: 'ipx-evf' });
|
||||
sel.appendChild(h('option', null, { value: '' }, t('ip.ev.filter.all')));
|
||||
present.forEach(function (c) { var o = h('option', null, { value: c }, catLabel(c)); if (c === ev.filter) o.selected = true; sel.appendChild(o); });
|
||||
sel.addEventListener('change', function () { ev.filter = sel.value; paintEvents(s); var n = document.getElementById('ipx-evf'); if (n) n.focus(); });
|
||||
box.appendChild(h('div', 'ipx-evbar', h('label', 'ipx-evl', { for: 'ipx-evf' }, t('ip.ev.filter')), sel));
|
||||
}
|
||||
var rows = ev.rows.filter(function (e) { return !ev.filter || e.cat === ev.filter; });
|
||||
if (!rows.length) { box.appendChild(emptyState(t('ip.ev.filter.none'))); return; }
|
||||
var tb = h('tbody');
|
||||
ev.rows.forEach(function (e) { tb.appendChild(eventRow(e)); });
|
||||
var table = h('table', 'ipx-tbl tbl-cards', h('thead', null, h('tr', null,
|
||||
rows.forEach(function (e) { tb.appendChild(eventRow(e)); });
|
||||
var table = h('table', 'ipx-tbl ipx-ctbl ipx-evt', h('thead', null, h('tr', null,
|
||||
h('th', null, t('ip.ev.time')), h('th', null, t('ip.ev.cat')), h('th', null, t('ip.ev.target')), h('th', null, t('ip.ev.request')),
|
||||
h('th', null, t('ip.ev.status')), h('th', null, t('ip.ev.bytes')))), tb);
|
||||
box.appendChild(h('div', 'ipx-tbl-w', table));
|
||||
@@ -1521,6 +1702,10 @@
|
||||
}
|
||||
c.body.appendChild(b);
|
||||
}
|
||||
return c.node;
|
||||
}
|
||||
function eventsCard(s) {
|
||||
var c = card('ip.ev.title', 'ip.ev.hint', 12);
|
||||
c.body.appendChild(eventsBlock(s));
|
||||
return c.node;
|
||||
}
|
||||
@@ -1741,6 +1926,7 @@
|
||||
if (!node) return;
|
||||
var smooth = !(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
||||
node.scrollIntoView({ behavior: smooth ? 'smooth' : 'auto', block: 'start' });
|
||||
try { node.focus({ preventScroll: true }); } catch (x) { /* old browser */ }
|
||||
});
|
||||
return b;
|
||||
}
|
||||
@@ -1815,7 +2001,8 @@
|
||||
var d = s.data, ip = s.ip;
|
||||
var wrap = shell(s);
|
||||
wrap.appendChild(headBar(s));
|
||||
var layout = h('div', 'ipx-layout');
|
||||
var hero = safe(function () { return heroCard(d, ip, s.ctx); });
|
||||
if (hero) wrap.appendChild(hero);
|
||||
var tocScroll = h('ul', 'ipx-toc-l');
|
||||
var toc = h('nav', 'ip-toc ipx-toc', { 'aria-label': t('ip.toc') }, tocScroll);
|
||||
var grid = h('div', 'ipx-grid');
|
||||
@@ -1823,21 +2010,21 @@
|
||||
function add(id, key, node) {
|
||||
if (!node) return;
|
||||
node.id = 'ipx-' + id;
|
||||
node.setAttribute('tabindex', '-1');
|
||||
grid.appendChild(node);
|
||||
items.push(id);
|
||||
tocScroll.appendChild(h('li', null, tocItem(s, id, key)));
|
||||
}
|
||||
add('verdict', 'ip.sec.verdict', safe(function () { return verdictCard(d, ip, s.ctx); }));
|
||||
add('summary', 'ip.sec.summary', safe(function () { return summaryCard(d, ip, s.ctx); }));
|
||||
add('activity', 'ip.sec.activity', safe(function () { return activityCard(d); }));
|
||||
add('defense', 'ip.sec.defense', safe(function () { return defenseCard(d); }));
|
||||
add('techniques', 'ip.sec.techniques', safe(function () { return techniquesCard(d); }));
|
||||
add('attack', 'ip.sec.attack', safe(function () { return attackCard(d); }));
|
||||
add('sessions', 'ip.sec.sessions', safe(function () { return sessionsCard(d, s, ip); }));
|
||||
add('targets', 'ip.sec.targets', safe(function () { return targetsCard(d); }));
|
||||
add('clients', 'ip.sec.clients', safe(function () { return clientsCard(d); }));
|
||||
add('defense', 'ip.sec.defense', safe(function () { return defenseCard(d); }));
|
||||
add('identity', 'ip.sec.identity', safe(function () { return identityCard(d); }));
|
||||
add('related', 'ip.sec.related', safe(function () { return relatedCard(d); }));
|
||||
layout.appendChild(toc);
|
||||
layout.appendChild(grid);
|
||||
wrap.appendChild(layout);
|
||||
add('events', 'ip.sec.events', safe(function () { return eventsCard(s); }));
|
||||
wrap.appendChild(toc);
|
||||
wrap.appendChild(grid);
|
||||
watchToc(s, toc, items);
|
||||
watchScrollFade(s, toc);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user