mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Update ip-geolocation-geoplugin.nse for a new data format.
The response seems to be plain JSON now, with nothing extraneous. Reported by Robin Wood. http://seclists.org/nmap-dev/2013/q1/232
This commit is contained in:
@@ -38,7 +38,7 @@ end
|
||||
-- No limit on requests
|
||||
local geoplugin = function(ip)
|
||||
local response = http.get("www.geoplugin.net", 80, "/json.gp?ip="..ip, nil)
|
||||
local stat, loc = json.parse(response.body:match("geoPlugin%((.+)%)"))
|
||||
local stat, loc = json.parse(response.body)
|
||||
if not stat then return nil end
|
||||
|
||||
local output = {}
|
||||
|
||||
Reference in New Issue
Block a user