1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Add a check to see if response from which we wish to extract links is not nil.

This commit is contained in:
perdo
2012-07-17 18:06:44 +00:00
parent 0288accd74
commit 6b101769d7

View File

@@ -256,8 +256,10 @@ action = function(host, port)
end
end --for
end --if
local links = httpspider.LinkExtractor:new(r.url, r.response.body, crawler.options):getLinks()
local links = {}
if r.response.status and r.response.body then
links = httpspider.LinkExtractor:new(r.url, r.response.body, crawler.options):getLinks()
end
for _,u in ipairs(links) do
if url.parse(u).query then
table.insert(injectable, u)