1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 14:39:03 +00:00

Show found addresses in targets-ipv6-multicast-*.

This is similar to a patch submitted by Daniel Miller.
This commit is contained in:
david
2011-10-07 09:51:05 +00:00
parent bc6468b246
commit 9e7db09d40
3 changed files with 16 additions and 9 deletions

View File

@@ -116,7 +116,7 @@ action = function()
local start_time = nmap:clock()
local cur_time = nmap:clock()
local found_targets = 0
local addrs = {}
repeat
local status, length, layer2, layer3 = pcap:pcap_receive()
@@ -128,12 +128,12 @@ action = function()
if reply.mac_dst == src_mac then
reply = packet.Packet:new(layer3)
local target_addr = reply.ip6_src
found_targets = found_targets + 1
local identifier = get_identifier(reply.ip6_src)
if not id_set[identifier] then
id_set[identifier] = true
local target_str = packet.toipv6(target_addr)
target.add(target_str)
addrs[#addrs + 1] = target_str
end
end
end
@@ -142,5 +142,7 @@ action = function()
dnet:ethernet_close()
pcap:pcap_close()
return true
if #addrs > 0 then
return stdnse.format_output(true, addrs)
end
end