A weekend project to scratch an itch: I wanted a port sweeper with sharp jagged edges removed and readable output, written in Go.
Design goals
- Fully concurrent with bounded worker pools
- No external dependencies - standard library only
- Machine-readable output for piping into other tooling
How it works
Fan-out, fan-in: a stream of host and port pairs is distributed across a fixed pool of workers, and results are collected on a single channel.
results := make(chan ScanResult, 2048)
for i := 0; i < workers; i++ {
go func() {
for target := range targets {
results <- probe(target)
}
}()
}
What’s next
- Service banners on open ports
- IPv6 support
- A diff mode that compares scans across time