Nmap ip-geolocation-maxmind NSE Script


This page contains detailed information about how to use the ip-geolocation-maxmind NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/ip-geolocation-maxmind.nse
Script categories: discovery, external, safe
Target service / protocol: -
Target network port(s): -
List of CVEs: -

Script Description


The ip-geolocation-maxmind.nse script tries to identify the physical location of an IP address using a Geolocation Maxmind database file (available from

Ip-geolocation-maxmind NSE Script Arguments


This is a full list of arguments supported by the ip-geolocation-maxmind.nse script:

maxmind_db

String indicates which file to use as a Maxmind database

- - -
To use this script argument, add it to Nmap command line like in this example:

nmap --script=ip-geolocation-maxmind --script-args maxmind_db=value <target>

Ip-geolocation-maxmind NSE Script Example Usage


Here's an example of how to use the ip-geolocation-maxmind.nse script:

nmap --script ip-geolocation-maxmind <target> [--script-args ip-geolocation.maxmind_db=<filename>]

Ip-geolocation-maxmind NSE Script Example Output


Here's a sample output from the ip-geolocation-maxmind.nse script:

| ip-geolocation-maxmind:
| coordinates: 39.4899, -74.4773
|_location: Absecon, Philadelphia, PA, United States

Ip-geolocation-maxmind NSE Script Example XML Output


Here's a sample XML output from the ip-geolocation-maxmind.nse script produced by providing the -oX <file> Nmap option:

 <elem key="latitude">39.4899</elem>
 <elem key="longitude">-74.4773</elem>
 <elem key="city">Absecon</elem>
 <elem key="region">Philadelphia, PA</elem>
 <elem key="country">United States</elem>

Author


  • Gorjan Petrovski

References


See Also


Related NSE scripts to the ip-geolocation-maxmind.nse script:

Visit Nmap NSE Library for more scripts.

The ip-geolocation-maxmind.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Error traversing database - perhaps it is corrupt?


Here is a relevant code snippet related to the "Error traversing database - perhaps it is corrupt?" error message:

609:	          return x[0]
610:	        end
611:	        offset = x[0]
612:	      end
613:	    end
614:	    stdnse.debug1('Error traversing database - perhaps it is corrupt?')
615:	    return nil
616:	  end,
617:	}
618:	
619:	action = function(host,port)

Version


This page has been created based on Nmap version 7.92.

Go back to menu.