Add goroutine to info collect

Signed-off-by: David J. Allen <allend@lanl.gov>
This commit is contained in:
David J. Allen 2023-09-13 11:21:49 -06:00
parent 2edb9fdbb0
commit c5a6d2a2be
10 changed files with 326 additions and 100 deletions

View file

@ -42,7 +42,9 @@ var scanCmd = &cobra.Command{
threads = mathutil.Clamp(len(hostsToScan), 1, 255)
}
probeStates := magellan.ScanForAssets(hostsToScan, portsToScan, threads, timeout)
fmt.Printf("probe states: %v\n", probeStates)
for _, r := range probeStates {
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
}
sqlite.InsertProbeResults(dbpath, &probeStates)
},
}