feat: 1.4.1 pagination, network probes, survival by blocker, report polish
Release / Publish tags (push) Successful in 18s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 1m47s
Release / Build image (amd64) (push) Successful in 21s
Release / Build image (arm64) (push) Successful in 28s
CI / Format and vet (push) Successful in 23s
CI / Tests (Linux, race detector) (push) Successful in 1m24s
CI / Dependency audit (push) Successful in 24s
CI / Docker image (build and smoke test) (push) Skipped
Release / Gitea release (push) Successful in 5s
Release / Publish tags (push) Successful in 18s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Successful in 1m47s
Release / Build image (amd64) (push) Successful in 21s
Release / Build image (arm64) (push) Successful in 28s
CI / Format and vet (push) Successful in 23s
CI / Tests (Linux, race detector) (push) Successful in 1m24s
CI / Dependency audit (push) Successful in 24s
CI / Docker image (build and smoke test) (push) Skipped
Release / Gitea release (push) Successful in 5s
Backend pagination with one pager for sessions, IPs, campaigns and events; network probe source (port-scan, T1046, second firewall reason port-scan); host kit logs inbound probes; urutau call on the report cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f27d8441a9
commit
432f521ed1
40 files changed
+927
-136
No files matched your search
+14
-17
@@ -225,6 +225,7 @@
|
||||
'ip.fam.iot-cgi': 'IoT and CGI',
|
||||
'ip.fam.admin-panel': 'Admin panels',
|
||||
'ip.fam.generic-404': 'Generic probing',
|
||||
'ip.fam.port-scan': 'Network port scan',
|
||||
'ip.ses.title': 'Sessions',
|
||||
'ip.ses.hint': 'Bursts of activity separated by quiet gaps.',
|
||||
'ip.ses.empty': 'No session found in this period.',
|
||||
@@ -256,7 +257,6 @@
|
||||
'ip.ev.request': 'Request',
|
||||
'ip.ev.status': 'Status',
|
||||
'ip.ev.bytes': 'Bytes',
|
||||
'ip.ev.more': 'Load more',
|
||||
'ip.ev.loading': 'Loading events.',
|
||||
'ip.ev.empty': 'No raw events returned for this period.',
|
||||
'ip.ev.unavailable': 'Raw events are not available right now.',
|
||||
@@ -525,6 +525,7 @@
|
||||
'ip.fam.iot-cgi': 'IoT e CGI',
|
||||
'ip.fam.admin-panel': 'Painéis de administração',
|
||||
'ip.fam.generic-404': 'Sondagem genérica',
|
||||
'ip.fam.port-scan': 'Varredura de portas de rede',
|
||||
'ip.ses.title': 'Sessões',
|
||||
'ip.ses.hint': 'Rajadas de atividade separadas por intervalos quietos.',
|
||||
'ip.ses.empty': 'Nenhuma sessão encontrada neste período.',
|
||||
@@ -556,7 +557,6 @@
|
||||
'ip.ev.request': 'Requisição',
|
||||
'ip.ev.status': 'Status',
|
||||
'ip.ev.bytes': 'Bytes',
|
||||
'ip.ev.more': 'Carregar mais',
|
||||
'ip.ev.loading': 'Carregando eventos.',
|
||||
'ip.ev.empty': 'Nenhum evento bruto retornado para este período.',
|
||||
'ip.ev.unavailable': 'Os eventos brutos não estão disponíveis agora.',
|
||||
@@ -721,7 +721,7 @@
|
||||
var LEVELS = ['hostile', 'suspicious', 'low'];
|
||||
var LEVEL_TONE = { hostile: 'danger', suspicious: 'warn', low: 'info' };
|
||||
var STAGES = ['recon', 'probe', 'exploit', 'access', 'banned'];
|
||||
var FAMS = ['traversal', 'log4shell', 'sqli', 'xss', 'rce-injection', 'webshell', 'env-credentials', 'vcs', 'backup', 'wordpress', 'phpmyadmin-db', 'actuator-debug', 'iot-cgi', 'admin-panel', 'generic-404'];
|
||||
var FAMS = ['traversal', 'log4shell', 'sqli', 'xss', 'rce-injection', 'webshell', 'env-credentials', 'vcs', 'backup', 'wordpress', 'phpmyadmin-db', 'actuator-debug', 'iot-cgi', 'admin-panel', 'generic-404', 'port-scan'];
|
||||
var SENSITIVE = ['traversal', 'webshell', 'env-credentials', 'vcs', 'backup', 'phpmyadmin-db', 'actuator-debug'];
|
||||
var NETTYPES = ['tor', 'vpn', 'research-scanner', 'isp-cn', 'hosting', 'mobile', 'isp/mobile', 'residential', 'unknown'];
|
||||
var NT_TONE = { tor: 'danger', vpn: 'warn', 'research-scanner': 'info', 'isp-cn': 'warn', hosting: 'warn', mobile: 'info', 'isp/mobile': 'info', residential: 'info', unknown: 'neutral' };
|
||||
@@ -1466,29 +1466,25 @@
|
||||
h('th', null, t('ip.ev.status')), h('th', null, t('ip.ev.bytes')))), tb);
|
||||
box.appendChild(h('div', 'ipx-tbl-w', table));
|
||||
var foot = h('div', 'ipx-ev-f', h('span', 'ipx-faint ipx-num', t('ip.ev.shown', { n: N(ev.rows.length) })));
|
||||
if (ev.cursor) {
|
||||
var more = h('button', 'ipx-btn sm', { type: 'button' }, t(ev.loading ? 'ip.ev.loading' : 'ip.ev.more'));
|
||||
if (ev.loading) more.disabled = true;
|
||||
more.addEventListener('click', function () { loadEvents(s, true); });
|
||||
foot.appendChild(more);
|
||||
}
|
||||
box.appendChild(foot);
|
||||
var pg = U.ui.pager({ page: ev.page, pages: ev.pages, total: ev.total, onPage: function (n) { U.setParam('p', n); ev.page = n; loadEvents(s); } });
|
||||
if (pg) box.appendChild(pg);
|
||||
}
|
||||
function loadEvents(s, more) {
|
||||
function loadEvents(s) {
|
||||
var ev = s.ev;
|
||||
if (ev.loading) return;
|
||||
ev.loading = true; ev.failed = false;
|
||||
var my = ++ev.seq;
|
||||
var p = rParams(s.ctx);
|
||||
var q = { ip: s.ip, limit: 25, order: 'desc' };
|
||||
var q = { ip: s.ip, per_page: 25, page: ev.page || 1, order: 'desc' };
|
||||
Object.keys(p).forEach(function (k) { q[k] = p[k]; });
|
||||
if (more && ev.cursor) q.cursor = ev.cursor;
|
||||
paintEvents(s);
|
||||
U.api('/api/v1/events', q).then(function (r) {
|
||||
if (!s.alive || my !== ev.seq) return;
|
||||
var rows = Array.isArray(r) ? r : arr(r && (r.events || r.items || r.rows)), cur = isObj(r) ? (r.next || r.next_cursor || r.cursor || '') : '';
|
||||
ev.rows = more ? ev.rows.concat(rows.filter(isObj)) : rows.filter(isObj);
|
||||
ev.cursor = rows.length ? str(cur) : '';
|
||||
var rows = Array.isArray(r) ? r : arr(r && (r.events || r.items || r.rows));
|
||||
if (isObj(r) && r.page > 1 && !rows.length && r.total) { ev.loading = false; ev.page = r.pages || 1; U.setParam('p', ev.page); loadEvents(s); return; } // stale link past the last page
|
||||
ev.rows = rows.filter(isObj);
|
||||
ev.total = isObj(r) ? num(r.total) : 0; ev.pages = isObj(r) && r.pages ? num(r.pages) : 1;
|
||||
if (isObj(r) && r.enabled === false) ev.disabled = true;
|
||||
if (s.statusPaint) s.statusPaint();
|
||||
ev.loaded = true; ev.loading = false;
|
||||
@@ -1845,7 +1841,7 @@
|
||||
var my = ++s.seq;
|
||||
s.ip = ipFromCtx(s.ctx);
|
||||
s.key = ctxKey(s.ctx);
|
||||
s.ev = { rows: [], cursor: '', loading: false, failed: false, loaded: false, disabled: !!(isObj(s.data && s.data.log) && s.data.log.available === false), seq: s.ev.seq + 1 };
|
||||
s.ev = { rows: [], page: U.pageParam(), pages: 1, total: 0, loading: false, failed: false, loaded: false, disabled: !!(isObj(s.data && s.data.log) && s.data.log.available === false), seq: s.ev.seq + 1 };
|
||||
if (!validIP(s.ip)) { showState(s, errorNode(s, 'ip.invalid', false)); return; }
|
||||
document.title = s.ip + ' · ' + t('ip.title') + ' · Urutau';
|
||||
if (!s.data) showState(s, loadingNode());
|
||||
@@ -1855,7 +1851,7 @@
|
||||
s.data = d;
|
||||
s.ev.disabled = !!(isObj(d.log) && d.log.available === false);
|
||||
render(s);
|
||||
if (!s.ev.disabled) loadEvents(s, false);
|
||||
if (!s.ev.disabled) loadEvents(s);
|
||||
}).catch(function (e) {
|
||||
if (!s.alive || my !== s.seq) return;
|
||||
if (e && e.message === 'unauthorized') return;
|
||||
@@ -1881,6 +1877,7 @@
|
||||
S.ctx = ctx; S.lang = ctx.lang;
|
||||
if (ctxKey(ctx) !== S.key) { S.data = S.data && ipFromCtx(ctx) === S.ip ? S.data : null; load(S); return; }
|
||||
if (ctx.lang !== prevLang && S.data) { render(S); paintEvents(S); }
|
||||
else if (S.data && !S.ev.disabled && S.ev.page !== U.pageParam()) { S.ev.page = U.pageParam(); loadEvents(S); } // back/forward
|
||||
},
|
||||
unmount: function () {
|
||||
if (!S) return;
|
||||
|
||||
Reference in new issue
Block a user