1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-05 22:19:03 +00:00

Fix geoip.get_all_by_gps limiting by moving to the Bing script. Fixes #616

This commit is contained in:
dmiller
2016-12-18 20:11:14 +00:00
parent c1dac8a37f
commit 0f67084fb3
3 changed files with 19 additions and 9 deletions

View File

@@ -55,17 +55,13 @@ end
--- Retrieve a table of IPs by coordinate
--@return A table of IPs keyed by coordinate in <code>lat,lon</code> format
get_all_by_gps = function(limit)
get_all_by_gps = function()
if empty() then
return nil
end
local t = {}
for ip, coords in pairs(get_all_by_ip()) do
if limit and limit < #t then
break
end
local key = coords["latitude"] .. "," .. coords["longitude"]
if not t[key] then
t[key] = {}