Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: maxmind geo nse script
From: Roy Woods <woodrobuda () gmail com>
Date: Wed, 7 Aug 2013 13:35:17 -0500

thank David, I patched in the code and renamed the NSE file (as I'm gonna
do other experiments) and it worked great, thanks, RW

On Wed, Jul 31, 2013 at 8:58 PM, David Fifield <david () bamsoftware com>wrote:

On Tue, Jul 09, 2013 at 01:50:41PM -0500, Roy Woods wrote:
NSE: Starting ip-geolocation-maxmind against
Initiating NSE at 13:33
NSE: ip-geolocation-maxmind against threw an error!
C:\Program Files\Nmap/scripts\ip-geolocation-maxmind.nse:405: Cannot
open Maxmind database file
stack traceback:
        [C]: in function 'assert'
        C:\Program Files\Nmap/scripts\ip-geolocation-maxmind.nse:405: in
function 'new'
        C:\Program Files\Nmap/scripts\ip-geolocation-maxmind.nse:597: in
function <C:\Program Files\Nmap/scripts\ip-geolocation-maxmind.nse:586>
        (...tail calls...)

I'm using the "GeoLiteCity.dat" file (downloaded today - to be sure).
Obviously running windows and have put the "GeoLiteCity.dat" file in the
/data and /nmap directory (cause now I'm getting paranoid - and do stupid
things when I'm paranoid).

Thanks for this report. It looks like it was a bug in the script; it was
searching relative to the current directory rather than relative to the
installation directory. I think it is fixed in r31612.

You can try applying the fix yourself by changing this line:
  local gi = assert( GeoIP:new("nselib/data/GeoLiteCity.dat"), "Cannot
read Maxmind database file in 'nselib/data/'.")
to this:
  local gi = assert(
GeoIP:new(nmap.fetchfile("nselib/data/GeoLiteCity.dat")), "Cannot read
Maxmind database file in 'nselib/data/'.")

David Fifield

Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]