Skip to content

Commit

Permalink
Fix list params
Browse files Browse the repository at this point in the history
  • Loading branch information
liamg committed Dec 17, 2019
1 parent 5df25d6 commit b49b554
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions cmd/scout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ var rootCmd = &cobra.Command{
}
options.Inherit()

var codeStrings []string
for _, code := range options.PositiveStatusCodes {
codeStrings = append(codeStrings, fmt.Sprintf("%d", code))
}

tml.Printf(
`
<blue>[</blue><yellow>+</yellow><blue>] Target URL</blue><yellow> %s
Expand All @@ -92,7 +87,7 @@ var rootCmd = &cobra.Command{
options.TargetURL.String(),
options.Parallelism,
strings.Join(options.Extensions, ","),
strings.Join(codeStrings, ","),
strings.Join(statusCodes, ","),
)

scanner := scan.NewScanner(options)
Expand Down Expand Up @@ -183,13 +178,13 @@ func main() {
}

rootCmd.Flags().IntVarP(&parallelism, "parallelism", "p", parallelism, "Parallel routines to use for sending requests.")
rootCmd.Flags().StringArrayVarP(&extensions, "extensions", "x", extensions, "File extensions to detect.")
rootCmd.Flags().StringSliceVarP(&extensions, "extensions", "x", extensions, "File extensions to detect.")
rootCmd.Flags().BoolVarP(&noColours, "no-colours", "n", noColours, "Disable coloured output.")
rootCmd.Flags().StringVarP(&wordlistPath, "wordlist", "w", wordlistPath, "Path to wordlist file. If this is not specified an internal wordlist will be used.")
rootCmd.Flags().BoolVarP(&debug, "debug", "d", debug, "Enable debug logging.")
rootCmd.Flags().StringVarP(&filename, "filename", "f", filename, "Filename to seek in the directory being searched. Useful when all directories report 404 status.")
rootCmd.Flags().BoolVarP(&skipSSLVerification, "skip-ssl-verify", "k", skipSSLVerification, "Skip SSL certificate verification.")
rootCmd.Flags().StringArrayVarP(&statusCodes, "status-codes", "s", statusCodes, "HTTP status codes which indicate a positive find.")
rootCmd.Flags().StringSliceVarP(&statusCodes, "status-codes", "s", statusCodes, "HTTP status codes which indicate a positive find.")

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down

0 comments on commit b49b554

Please sign in to comment.