Fixed scan not probing the host correctly

This commit is contained in:
David Allen 2024-08-13 17:01:21 -06:00
parent bb49129d31
commit 2b291f811a
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -75,7 +75,7 @@ func ScanForAssets(params *ScanParams) []RemoteAsset {
// if we failed to connect, exit from the function // if we failed to connect, exit from the function
if err != nil { if err != nil {
if params.Verbose { 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() wg.Done()
return return
@ -193,7 +193,7 @@ func rawConnect(address string, protocol string, timeoutSeconds int, keepOpenOnl
timeoutDuration = time.Second * time.Duration(timeoutSeconds) timeoutDuration = time.Second * time.Duration(timeoutSeconds)
assets []RemoteAsset assets []RemoteAsset
asset = RemoteAsset{ asset = RemoteAsset{
Host: uri.Hostname(), Host: fmt.Sprintf("%s://%s", uri.Scheme, uri.Hostname()),
Port: port, Port: port,
Protocol: protocol, Protocol: protocol,
State: false, State: false,