Made scanned results optional with verbose flag

This commit is contained in:
David J. Allen 2024-05-08 12:58:55 -06:00
parent 8c19608966
commit 2289209604
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -58,8 +58,11 @@ var scanCmd = &cobra.Command{
threads = mathutil.Clamp(len(hostsToScan), 1, 255)
}
probeStates := magellan.ScanForAssets(hostsToScan, portsToScan, threads, timeout, disableProbing)
for _, r := range probeStates {
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
if verbose {
for _, r := range probeStates {
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
}
}
// make the dbpath dir if needed