From 85b631259006653aa80c0df26b5e103f27d49a11 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 1 Aug 2013 02:01:09 +0000 Subject: [PATCH] Use fetchfile to look for GeoLiteCity.dat. Apparently it only worked before when you were running from an Nmap source directory, where nselib was in the current directory. Roy Woods reported the problem. http://seclists.org/nmap-dev/2013/q3/48 --- scripts/ip-geolocation-maxmind.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ip-geolocation-maxmind.nse b/scripts/ip-geolocation-maxmind.nse index 4ad9a95c0..3f71b3ea9 100644 --- a/scripts/ip-geolocation-maxmind.nse +++ b/scripts/ip-geolocation-maxmind.nse @@ -594,7 +594,7 @@ action = function(host,port) local out = gi:output_record_by_addr(host.ip) output = out else - local gi = assert( GeoIP:new("nselib/data/GeoLiteCity.dat"), "Cannot read Maxmind database file in 'nselib/data/'.") + local gi = assert( GeoIP:new(nmap.fetchfile("nselib/data/GeoLiteCity.dat")), "Cannot read Maxmind database file in 'nselib/data/'.") local out = gi:output_record_by_addr(host.ip) output = out end