mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01: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:
@@ -256,8 +256,10 @@ action = function(host, port)
|
|||||||
end
|
end
|
||||||
end --for
|
end --for
|
||||||
end --if
|
end --if
|
||||||
|
local links = {}
|
||||||
local links = httpspider.LinkExtractor:new(r.url, r.response.body, crawler.options):getLinks()
|
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
|
for _,u in ipairs(links) do
|
||||||
if url.parse(u).query then
|
if url.parse(u).query then
|
||||||
table.insert(injectable, u)
|
table.insert(injectable, u)
|
||||||
|
|||||||
Reference in New Issue
Block a user