1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-12 00:16:35 +00:00

Added checks to prevent scripts from indexing a nill value when

scanning localhost.
This commit is contained in:
devin
2014-05-28 02:29:31 +00:00
parent c950dcb154
commit 53ca0c01dd
2 changed files with 7 additions and 5 deletions

View File

@@ -197,7 +197,7 @@ local LIKELY_SSL_SERVICES = {
-- @usage
-- portrule = shortport.ssl
function ssl(host, port)
return port.version.service_tunnel == "ssl" or
return (port.version and port.version.service_tunnel == "ssl") or
port_or_service(LIKELY_SSL_PORTS, LIKELY_SSL_SERVICES, {"tcp", "sctp"})(host, port)
end

View File

@@ -51,10 +51,12 @@ function parse_robtex_response(data)
data = data:match("<span id=\"sharednss\">.-<ul.->(.-)</ul>")
-- process each html list item
for li in data:gmatch("<li>(.-)</li>") do
local domain = li:match("<a.->(.*)</a>")
if ( domain ) then
table.insert(result, domain)
if data then
for li in data:gmatch("<li>(.-)</li>") do
local domain = li:match("<a.->(.*)</a>")
if ( domain ) then
table.insert(result, domain)
end
end
end