Mark small countries on the map, fit latest catches table, show missing host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-15 12:44:23 +01:00
1 parent 6e2ff3f7ee
commit 31cef44bf3
15 files changed
+475 -27

No files matched your search

@@ -25,6 +25,24 @@ public sealed class MigrationTests : IDisposable
(await db.Settings.Select(s => s.Key).ToListAsync()).ShouldBe(["Flypaper:MaxConnections"]);
}
[Fact]
public async Task Rewrites_placeholder_host_of_existing_trap_events()
{
await using var db = new FlypaperDbContext(new DbContextOptionsBuilder<FlypaperDbContext>().UseSqlite($"Data Source={_dbPath}").Options);
await db.GetService<IMigrator>().MigrateAsync("RemoveDripIntervalSetting");
await db.Database.ExecuteSqlRawAsync(
"""
INSERT INTO "TrapEvents" ("SessionId", "Protocol", "RemoteIp", "Strategy", "StartedAt", "EndedAt", "DurationMs", "BytesSent", "Outcome", "Target")
VALUES ('A', 'Http', '203.0.113.9', 'html-drip', '2026-11-14 10:00:00', '2026-11-14 10:00:05', 5000, 50, 'ClientAborted', 'GET _/boaform/admin/formLogin'),
('B', 'Http', '203.0.113.9', 'html-drip', '2026-11-14 10:00:00', '2026-11-14 10:00:05', 5000, 50, 'ClientAborted', 'GET example.com/.env')
""");
await db.Database.MigrateAsync();
(await db.TrapEvents.OrderBy(e => e.SessionId).Select(e => e.Target).ToListAsync())
.ShouldBe(["GET /boaform/admin/formLogin", "GET example.com/.env"]);
}
public void Dispose()
{
SqliteConnection.ClearAllPools();