nmap v2.0 releases: Idiomatic nmap bindings for go developers
This library aims at providing idiomatic nmap bindings for go developers, in order 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 a number of 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.
- All of nmap‘s native options.
- Additional idiomatic go filters for filtering hosts and ports.
- Cancellable contexts support.
- Helpful enums for nmap commands. (time templates, os families, port states, etc.)
- Complete documentation of each option mostly inspired from nmap’s documentation.
The program above outputs:
- [enhancement] Fixing “Error handling difficult and not reliable #38” (#39 by noneymous)
- [enhancement] Unit tests for RunAsync (#35 by Ullaakut)
- [enhancement] RunAsync function with supporting struct changes (#26 by TheSecEng)
- [enhancement] Fix typos (#25 by Ullaakut)
- [enhancement] Nmap error handling (#21 by TheSecEng)
- [bug] Fix ScanRunner interface (#40 by Ullaakut)
- [bug] go install error (#19 by voidint)
- [bug] Fix #17 by making done chan buffered (#18 by Ullaakut)
- [bug] Update xml.go (#13 by blshkv)
- Added ToReader method for streaming out XML results (#37 by beckler)
- Adding nmap options for verbosity and debugging (#33 by TheSecEng)
- Added nmap –stats-every option (#28 by TheSecEng)
- Update gitignore (#24 by Ullaakut)
- Make ScriptArguments support flags (#12 by botastic)
- Fix nmap table result parsing (#11 by botastic)
- Fix OSClass parsing (#10 by botastic)
Copyright (c) 2019 Ullaakut