mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Made scanned results optional with verbose flag
This commit is contained in:
parent
8c19608966
commit
2289209604
1 changed files with 6 additions and 3 deletions
|
|
@ -58,9 +58,12 @@ var scanCmd = &cobra.Command{
|
||||||
threads = mathutil.Clamp(len(hostsToScan), 1, 255)
|
threads = mathutil.Clamp(len(hostsToScan), 1, 255)
|
||||||
}
|
}
|
||||||
probeStates := magellan.ScanForAssets(hostsToScan, portsToScan, threads, timeout, disableProbing)
|
probeStates := magellan.ScanForAssets(hostsToScan, portsToScan, threads, timeout, disableProbing)
|
||||||
|
if verbose {
|
||||||
|
|
||||||
for _, r := range probeStates {
|
for _, r := range probeStates {
|
||||||
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
|
fmt.Printf("%s:%d (%s)\n", r.Host, r.Port, r.Protocol)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// make the dbpath dir if needed
|
// make the dbpath dir if needed
|
||||||
err := os.MkdirAll(path.Dir(dbpath), 0766)
|
err := os.MkdirAll(path.Dir(dbpath), 0766)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue