From 3b85ca49745be0b0e18e68525ed75e0b4849cd51 Mon Sep 17 00:00:00 2001 From: Frank Spierings Date: Thu, 21 Nov 2019 16:23:45 +0100 Subject: [PATCH] The application will now always screenshot the IP-adres from a Nmap XML scan, since the reverse DNS (PTR) name as retrieved from hostname.Name might not be resolvable. --- main.go | 2 +- parsers/nmap.go | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 649aaf0..e9320c2 100644 --- a/main.go +++ b/main.go @@ -10,10 +10,10 @@ import ( "strings" "time" + "github.com/FrankSpierings/aquatone/parsers" "github.com/google/uuid" "github.com/michenriksen/aquatone/agents" "github.com/michenriksen/aquatone/core" - "github.com/michenriksen/aquatone/parsers" ) var ( diff --git a/parsers/nmap.go b/parsers/nmap.go index c6d3c08..0d97c97 100644 --- a/parsers/nmap.go +++ b/parsers/nmap.go @@ -69,13 +69,12 @@ func (p *NmapParser) hostToURLs(host nmap.Host) []string { for _, hostname := range host.Hostnames { urls = append(urls, core.HostAndPortToURL(hostname.Name, port.PortId, protocol)) } - } else { - for _, address := range host.Addresses { - if address.AddrType == "mac" { - continue - } - urls = append(urls, core.HostAndPortToURL(address.Addr, port.PortId, protocol)) + } + for _, address := range host.Addresses { + if address.AddrType == "mac" { + continue } + urls = append(urls, core.HostAndPortToURL(address.Addr, port.PortId, protocol)) } }