mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
chore: cleanup unused code
This commit is contained in:
parent
1b173a8339
commit
1d9dbe7b7f
1 changed files with 0 additions and 12 deletions
12
cmd/scan.go
12
cmd/scan.go
|
|
@ -79,18 +79,8 @@ var ScanCmd = &cobra.Command{
|
||||||
|
|
||||||
// format and combine flag and positional args
|
// format and combine flag and positional args
|
||||||
targetHosts = append(targetHosts, urlx.FormatHosts(args, ports, scheme, verbose)...)
|
targetHosts = append(targetHosts, urlx.FormatHosts(args, ports, scheme, verbose)...)
|
||||||
targetHosts = append(targetHosts, urlx.FormatHosts(hosts, ports, scheme, verbose)...)
|
|
||||||
|
|
||||||
// add more hosts specified with `--subnet` flag
|
|
||||||
if debug {
|
|
||||||
log.Debug().Msg("adding hosts from subnets")
|
|
||||||
}
|
|
||||||
for _, subnet := range subnets {
|
for _, subnet := range subnets {
|
||||||
// subnet string is empty so nothing to do here
|
|
||||||
if subnet == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// generate a slice of all hosts to scan from subnets
|
// generate a slice of all hosts to scan from subnets
|
||||||
subnetHosts := magellan.GenerateHostsWithSubnet(subnet, &subnetMask, ports, scheme)
|
subnetHosts := magellan.GenerateHostsWithSubnet(subnet, &subnetMask, ports, scheme)
|
||||||
targetHosts = append(targetHosts, subnetHosts...)
|
targetHosts = append(targetHosts, subnetHosts...)
|
||||||
|
|
@ -180,8 +170,6 @@ var ScanCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// scanCmd.Flags().StringSliceVar(&hosts, "host", []string{}, "set additional hosts to scan")
|
|
||||||
ScanCmd.Flags().StringSliceVar(&hosts, "host", nil, "Add individual hosts to scan. (example: https://my.bmc.com:5000; same as using positional args)")
|
|
||||||
ScanCmd.Flags().IntSliceVar(&ports, "port", nil, "Adds additional ports to scan for each host with unspecified ports.")
|
ScanCmd.Flags().IntSliceVar(&ports, "port", nil, "Adds additional ports to scan for each host with unspecified ports.")
|
||||||
ScanCmd.Flags().StringVar(&scheme, "scheme", "https", "Set the default scheme to use if not specified in host URI. (default is 'https')")
|
ScanCmd.Flags().StringVar(&scheme, "scheme", "https", "Set the default scheme to use if not specified in host URI. (default is 'https')")
|
||||||
ScanCmd.Flags().StringVar(&protocol, "protocol", "tcp", "Set the default protocol to use in scan. (default is 'tcp')")
|
ScanCmd.Flags().StringVar(&protocol, "protocol", "tcp", "Set the default protocol to use in scan. (default is 'tcp')")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue