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

Don't run tor-consensus-checker on private/reserved IPs

This commit is contained in:
dmiller
2016-06-26 04:15:15 +00:00
parent dc4c9927d9
commit 822b2d593a

View File

@@ -1,4 +1,5 @@
local http = require "http"
local ipOps = require "ipOps"
local stdnse = require "stdnse"
local string = require "string"
local nmap = require "nmap"
@@ -43,7 +44,7 @@ hostrule = function(host)
if nmap.registry.tornode and not(nmap.registry.tornode.connect) then
return false
end
return true
return not ipOps.isPrivate(host.ip)
end
function get_consensus(server)