nmap: Idiomatic nmap bindings for go developers
nmap
This library aims at providing idiomatic nmap bindings for go developers, to make it easier to write security audit tools using golang.
What is nmap
Nmap (Network Mapper) is a free and open-source network scanner created by Gordon Lyon. Nmap is used to discover hosts and services on a computer network by sending packets and analyzing the responses.
Nmap provides many features for probing computer networks, including host discovery and service and operating system detection. These features are extensible by scripts that provide more advanced service detection, vulnerability detection, and other features. Nmap can adapt to network conditions including latency and congestion during a scan.
Why use go for penetration testing
Most pen test tools are currently written using Python and not Go because it is easy to quickly write scripts, lots of libraries are available, and it’s a simple language to use. However, for writing robust and reliable applications, Go is the better tool. It is statically compiled, has a static type system, much better performance, it is also a very simple language to use and goroutines are awesome… But I might be slightly biased, so feel free to disagree.
Supported features
- All of
nmap
‘s native options. - Additional idiomatic go filters for filtering hosts and ports.
- Helpful enums for nmap commands. (time templates, os families, port states, etc.)
- Complete documentation of each option, mostly insipred from nmap’s documentation.
- Run a nmap scan asynchronously.
- Scan progress can be piped through a channel.
- Write the nmap output to a given file while also parsing it to the struct.
- Stream the nmap output to an
io.Writer
interface while also parsing it to the struct. - Functionality to show local interfaces and routes.
Example
Download
Copyright (c) 2019 Ullaakut