From 2b291f811af347c8238f0d146fe6d9da75b8e4b9 Mon Sep 17 00:00:00 2001 From: David Allen Date: Tue, 13 Aug 2024 17:01:21 -0600 Subject: [PATCH] Fixed scan not probing the host correctly --- internal/scan.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/scan.go b/internal/scan.go index 06ad174..455749d 100644 --- a/internal/scan.go +++ b/internal/scan.go @@ -75,7 +75,7 @@ func ScanForAssets(params *ScanParams) []RemoteAsset { // if we failed to connect, exit from the function if err != nil { if params.Verbose { - log.Debug().Err(err).Msgf("failed to connect to host (%s)", host) + log.Debug().Err(err).Msgf("failed to connect to host") } wg.Done() return @@ -193,7 +193,7 @@ func rawConnect(address string, protocol string, timeoutSeconds int, keepOpenOnl timeoutDuration = time.Second * time.Duration(timeoutSeconds) assets []RemoteAsset asset = RemoteAsset{ - Host: uri.Hostname(), + Host: fmt.Sprintf("%s://%s", uri.Scheme, uri.Hostname()), Port: port, Protocol: protocol, State: false,