Skip to main content

A port scanner built to be correct

magi does connect scanning over TCP and UDP. No root, no raw sockets, and it never reports a port state it didn't actually establish.

or cargo install --path . from source

magitcp · udp
$ magi scanme.nmap.org -p 22,80,443 --banner
scanning scanme.nmap.org (45.33.32.156) — 3 ports, 512 at a time

2 open port(s):

45.33.32.156
     22/tcp  ssh    SSH-2.0-OpenSSH_6.6.1p1
     80/tcp  http
$ 

Fast, focused, and honest

magi keeps a small, sharp scope: a connect scanner that does a few things, does them quickly, and never reports a port state it didn't actually establish.

01

Fast and async

Hundreds of probes in flight at once over tokio, bounded so even a /16 stays memory-flat.

02

TCP and UDP

Connect scanning over both, with honest open, closed, and open|filtered verdicts.

03

CIDR and JSON

Scan a host, an IP, or a whole subnet. Pipe --json straight into jq.

04

It won't lie

Out of file descriptors, or the host unreachable? Those ports are reported untestable, never silently closed.

Frequently asked questions

Everything about what magi does, what it won't do, and how to run it. Still stuck? Open an issue on GitHub.

Open an issue

magi is a fast, asynchronous TCP and UDP port scanner. It does connect scanning — a normal handshake on each port — so within its scope it only ever reports a port state it actually established. No raw packets, no guessing.