GANS is a tool to automate nmap scan.
Install go from the package downloader of your distribution or use official download from https://golang.org/dl
Create a workspace to load your code :
mkdir ~/.go
export GOPATH=$HOME/.go
export PATH=$PATH:$HOME/.go/bin
(edit your .profile file if you want to execute this at every login)
go get github.com/restanrm/gans
It will download all the dependencies needed.
Gans is used from a daemon process and some control processes. The command gans run
need root permission due to the nmap
permissions that are required to do the scan. Here is a simple example to use gans.
You will need 2 terminals :
Here is the first one : (it needs root because it interacts with nmap)
sudo ./gans run -d data.json
This deamon is now waiting for commands. It will read/write the infos it gathers/needs in the data.json file. (you can change this of course)
Open a second terminal and run the command
./gans scan <IP address(es)|IP address range(s)>
ex :
./gans scan 192.168.0.0/24 192.168.2.254 172.16.0.0/12
You can then parse the data generated by GANS :
./gans parse data.json