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

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:
Lucas RayanandClaude Opus 5.5 committed 2026-11-15 00:21:43 -03:00
1 parent f27d8441a9
commit 432f521ed1
40 files changed
+927 -136

No files matched your search

+12 -4
View File
@@ -4,6 +4,7 @@
(function () {
'use strict';
var NS = 'http://www.w3.org/2000/svg';
var PER = 12;
var STAGES = ['recon', 'probe', 'exploit', 'access', 'banned'];
var ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="5" r="2.5"/><circle cx="5" cy="18" r="2.5"/><circle cx="19" cy="18" r="2.5"/><path d="M11 7.5L6 15.5M13 7.5l5 8M7.5 18h9"/></svg>';
var ID_OK = /^[A-Za-z0-9_-]{1,64}$/;
@@ -56,6 +57,8 @@
'cp.stage.exploit': 'Exploit',
'cp.stage.access': 'Access',
'cp.stage.banned': 'Banned',
'cp.n.one': '{n} campaign',
'cp.n.other': '{n} campaigns',
'cp.more': '+{n} more'
},
'pt-BR': {
@@ -100,6 +103,8 @@
'cp.stage.exploit': 'Exploração',
'cp.stage.access': 'Acesso',
'cp.stage.banned': 'Banido',
'cp.n.one': '{n} campanha',
'cp.n.other': '{n} campanhas',
'cp.more': '+{n} mais'
}
});
@@ -169,8 +174,10 @@
function load() {
var my = ++seq, cid = id(), path = cid ? '/api/v1/campaigns/' + encodeURIComponent(cid) : '/api/v1/campaigns';
if (cid && !ID_OK.test(cid)) { data = { missing: true }; paint(); return; }
U.api(path, Object.assign({ host: self.ctx.host }, U.rangeParams())).then(function (d) {
if (!alive || my !== seq) return; data = d; key = cid; paint();
U.api(path, Object.assign({ host: self.ctx.host }, cid ? {} : { page: U.pageParam(), per_page: PER }, U.rangeParams())).then(function (d) {
if (!alive || my !== seq) return;
if (!cid && d.page > 1 && !(d.campaigns || []).length && d.total) { U.setParam('p', d.pages); load(); return; }
data = d; key = cid; paint();
}).catch(function (e) {
if (!alive || my !== seq) return;
if (e && e.status === 404 && cid) { data = { missing: true }; key = cid; paint(); return; }
@@ -191,7 +198,7 @@
if (data.truncated) wrap.appendChild(h('p', { class: 'note', text: t('cp.truncated') }));
if (!cs.length) return;
var grid = h('div', 'cp-cards');
cs.slice(0, 60).forEach(function (c) {
cs.forEach(function (c) {
var sg = c.signature || {};
grid.appendChild(h('article', 'cp-card',
h('header', null, h('a', { class: 'cp-id mono', href: '#/campaigns/' + encodeURIComponent(c.id), text: short(c.id) }),
@@ -204,7 +211,8 @@
h('footer', null, h('a', { class: 'btn', href: '#/campaigns/' + encodeURIComponent(c.id), text: t('cp.open') }),
h('a', { class: 'btn', href: replayHref(c), text: t('cp.replay') }))));
});
wrap.appendChild(U.ui.panel({ title: t('cp.cards'), help: 'term.campaign' }, grid));
wrap.appendChild(U.ui.panel({ title: t('cp.cards'), help: 'term.campaign' }, grid,
U.ui.pager({ page: data.page, pages: data.pages, total: data.total, totalText: U.pl('cp.n', data.total, { n: nf(data.total) }), onPage: function (n) { U.setParam('p', n); load(); } })));
var top = cs.slice(0, 15), mn = Infinity, mx = 0;
top.forEach(function (c) { mn = Math.min(mn, sec(c.first)); mx = Math.max(mx, sec(c.last)); });
wrap.appendChild(U.ui.panel({ title: t('cp.gantt'), hint: t('cp.gantt.hint') },