mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Refactored flags and added xnames to add endpoint to hms-smd
This commit is contained in:
parent
de07b119b5
commit
2edb9fdbb0
18 changed files with 270 additions and 175 deletions
|
|
@ -2,6 +2,7 @@ package cmd
|
|||
|
||||
import (
|
||||
magellan "davidallendj/magellan/internal"
|
||||
"davidallendj/magellan/internal/db/sqlite"
|
||||
"fmt"
|
||||
|
||||
"github.com/cznic/mathutil"
|
||||
|
|
@ -42,11 +43,13 @@ var scanCmd = &cobra.Command{
|
|||
}
|
||||
probeStates := magellan.ScanForAssets(hostsToScan, portsToScan, threads, timeout)
|
||||
fmt.Printf("probe states: %v\n", probeStates)
|
||||
magellan.StoreStates(dbpath, &probeStates)
|
||||
sqlite.InsertProbeResults(dbpath, &probeStates)
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
scanCmd.PersistentFlags().StringSliceVar(&hosts, "host", []string{}, "set additional hosts to scan")
|
||||
scanCmd.PersistentFlags().IntSliceVar(&ports, "port", []int{}, "set the ports to scan")
|
||||
scanCmd.Flags().Uint8Var(&begin, "begin", 0, "set the starting point for range of IP addresses")
|
||||
scanCmd.Flags().Uint8Var(&end, "end", 255, "set the ending point for range of IP addresses")
|
||||
scanCmd.Flags().StringSliceVar(&subnets, "subnet", []string{}, "set additional subnets")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue