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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user