Scan a whole country with nmap
git clone https://github.com/mmpx12/nse-country-scan.git
cd nse-country-scan
sudo make
If no argument is pass the script while choose a random country and scan all the ips Argument are:
- country: "Code of the country in uppercase">
- max_ip: "Number of ip range to scan"
- newtargets "Without nmap can't add target to queue"
nmap --script country_scan --script-args 'country=LU, max_ip=2'
# This whill scan 2 range of ip and not 2 ip only
# You can see which one with `HEAD -2 /usr/share/nmap/nselib/country/list/LU`
Other ip, script or nmap argument can be pass like:
nmap -sn --script country_scan --script-args 'country=LU, max_ip=2, newtargets' 1.1.1.1
For deleting this script run:
cd nse-country-scan
sudo make clean