1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 21:29:01 +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

@@ -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