Skip to content

Commit

Permalink
(chore) fix flag name typo
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Jul 30, 2022
1 parent 2041445 commit 86134ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/nessus.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func init() {
nessusCmd.Flags().StringSliceVar(&options.NessusPluginOutput, "nessus-plugin-output", []string{"web server"}, "nessus plugin output contains filter. supports multiple --pluginoutput flags")
nessusCmd.Flags().StringSliceVar(&options.NessusPluginContains, "nessus-plugin-contains", []string{"Service Detection"}, "nessus plugin name contains filer. supports multiple --plugin-contains flags")
nessusCmd.Flags().IntSliceVar(&options.NessusPorts, "port", []int{}, "ports filter. supports multiple --port flags")
nessusCmd.Flags().BoolVarP(&options.NmapScanHostanmes, "scan-hostnames", "N", false, "scan hostnames (useful for virtual hosting)")
nessusCmd.Flags().BoolVarP(&options.NmapScanHostnames, "scan-hostnames", "N", false, "scan hostnames (useful for virtual hosting)")
nessusCmd.Flags().BoolVarP(&options.NoHTTP, "no-http", "s", false, "do not try using http://")
nessusCmd.Flags().BoolVarP(&options.NoHTTPS, "no-https", "S", false, "do not try using https://")
nessusCmd.Flags().IntVarP(&options.Threads, "threads", "t", 4, "threads used to run")
Expand Down Expand Up @@ -230,7 +230,7 @@ func getNessusURLs() (urls []string, err error) {
// identify that the service is a web server
if lib.SliceContainsString(options.NessusServiceNames, item.ServiceName) || lib.SliceContainsString(options.NessusPluginOutput, item.PluginOutput) {
// add the hostnames if the option has been set
if options.NmapScanHostanmes {
if options.NmapScanHostnames {
if fqdn != "" {
nessusHostsMap[fqdn] = item.Port
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/nmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func init() {
nmapCmd.Flags().StringSliceVarP(&options.NmapService, "service", "n", []string{}, "map service name filter. supports multiple --service flags")
nmapCmd.Flags().StringVarP(&options.NmapServiceContains, "service-contains", "w", "", "partial service name filter (aka: contains)")
nmapCmd.Flags().IntSliceVar(&options.NmapPorts, "port", []int{}, "ports filter. supports multiple --port flags")
nmapCmd.Flags().BoolVarP(&options.NmapScanHostanmes, "scan-hostnames", "N", false, "scan hostnames (useful for virtual hosting)")
nmapCmd.Flags().BoolVarP(&options.NmapScanHostnames, "scan-hostnames", "N", false, "scan hostnames (useful for virtual hosting)")
nmapCmd.Flags().BoolVarP(&options.NoHTTP, "no-http", "s", false, "do not try using http://")
nmapCmd.Flags().BoolVarP(&options.NoHTTPS, "no-https", "S", false, "do not try using https://")
nmapCmd.Flags().BoolVarP(&options.NmapOpenPortsOnly, "open", "", false, "only select open ports")
Expand Down Expand Up @@ -171,7 +171,7 @@ func getNmapURLs() (urls []string, err error) {
}

// add the hostnames if the option has been set
if options.NmapScanHostanmes {
if options.NmapScanHostnames {
for _, hn := range host.Hostnames {
urls = append(urls, buildURI(hn.Name, port.PortId)...)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Options struct {
NmapService []string
NmapServiceContains string
NmapPorts []int
NmapScanHostanmes bool
NmapScanHostnames bool
NmapOpenPortsOnly bool

// Report List
Expand Down

0 comments on commit 86134ed

Please sign in to comment.