Network scanner for host discovery, port scanning, service fingerprinting, OS detection, traceroute, and NSE script scans.
$brew install nmap
AI Analysis
nmap is a network reconnaissance and security auditing CLI for discovering hosts and interrogating them with many scan types. Beyond basic port scans, it can fingerprint services and operating systems, trace routes, and run the Nmap Scripting Engine against targets.
What It Enables
- Discover live hosts, open ports, and exposed protocols across IPs, ranges, and larger network slices.
- Fingerprint services, guess operating systems, trace hop paths, and compare network exposure before or after infrastructure changes.
- Run NSE scripts for discovery, deeper service interrogation, and vulnerability-oriented checks against reachable targets.
Agent Fit
- Flag-driven, non-interactive commands work well in shell loops for inventory, verification, and recurring scans.
- Structured output exists, but it is XML rather than JSON; the man page explicitly positions XML as the preferred format for software integrations.
- Best for inspect workflows and controlled audits where an agent can parse findings and decide follow-up probes, not for unattended remediation.
Caveats
- Many advanced scan types need raw-socket privileges or admin access, and behavior changes when run unprivileged.
- NSE includes intrusive and dangerous scripts, and the docs warn against scanning networks or running certain checks without permission.