Library geoip
Consolidation of GeoIP functions.
Author:
Copyright © Same as Nmap--See https://nmap.org/book/man-legal.html
Source: https://svn.nmap.org/nmap/nselib/geoip.lua
Functions
- add (ip, lat, lon)
Add a geolocation to the registry
- empty ()
Check if any coordinates have been stored in the registry
- get_all_by_gps ()
Retrieve a table of IPs by coordinate
- get_all_by_ip ()
Retrieve the table of coordinates by IP
Functions
- add (ip, lat, lon)
-
Add a geolocation to the registry
Parameters
- ip
- The IP that was geolocated
- lat
- The latitude in degrees
- lon
- The longitude in degrees
- empty ()
-
Check if any coordinates have been stored in the registry
Return value:
True if any coordinates have been returned, false otherwise - get_all_by_gps ()
-
Retrieve a table of IPs by coordinate
Return value:
A table of IPs keyed by coordinate inlat,lon
format - get_all_by_ip ()
-
Retrieve the table of coordinates by IP
Return value:
A table of coordinates keyed by IP.