Skip to content

This IP2Location Nmap script provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category from IP address by using the IP2Location Lua Package.

Notifications You must be signed in to change notification settings

ip2location/ip2location-nmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

IP2Location Nmap script

This IP2Location Nmap script provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type, IAB category, district, autonomous system number (ASN) and autonomous system (AS) from IP address by using the IP2Location Lua Package.

The database will be updated on a monthly basis for greater accuracy. Free LITE databases are available at https://lite.ip2location.com/ upon registration.

The paid databases are available at https://www.ip2location.com under Premium subscription package.

Both IPv4 and IPv6 are supported.

Installation

If the Luarocks have installed with the latest dependency (5.3), you can install with the following steps:

  1. Download and unzip the package.

  2. Copy the ip-geolocation-ip2location.nse to your Nmap program directory/scripts.

    Note: The default Nmap program directory for Linux user should be under /usr/share/, for example /usr/share/nmap. For Windows user, the Nmap directory should be C:\Program Files (x86)\Nmap.

  3. Install the IP2Location Lua Library by using this command: luarocks install ip2location

  4. Download the database from https://lite.ip2location.com/ for free version or https://www.ip2location.com for paid version.

However, if the Luarocks is not installed, or you do not prefer to install the Luarocks, you can also install the script manually with the following steps:

  1. Download and unzip the package.

  2. Copy the ip-geolocation-ip2location.nse to your Nmap program directory/scripts.

    Note: The default Nmap program directory for Linux user should be under /usr/share/, for example /usr/share/nmap. For Windows user, the Nmap directory should be C:\Program Files (x86)\Nmap.

  3. Get the ip2location.lua & BigNum library and copy it to your Nmap program directory/nselib.

  4. Download the database from https://lite.ip2location.com/ for free version or https://www.ip2location.com for paid version.

Usage

nmap --script ip-geolocation-ip2location <target> --script-args ip-geolocation-ip2location.ip2location_db=<database_path>

Replace the <target> with the IP Address that you wish to search and the <database_path> with the IP2Location database file path in your computer. Remember to put double backslashes (\\) instead of single backslash(\) in the path.

Parameters

ip2location_db

Indicates the path of the database file to use.

Copyright

Copyright (C) 2023 - 2024 by IP2Location.com, [email protected]

About

This IP2Location Nmap script provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category from IP address by using the IP2Location Lua Package.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages