diff --git a/README.md b/README.md index e94844d..eed54c8 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Required Arguments: Options: -h --help Show this message. -v --version Show version. - -p Ex: -p 22; -p 1-65535, -p 80,443. [default: 1-1024] + -p Ports to scan. Ex: -p 22; -p 1-65535, -p 80,443. [default: 1-1024] + -e Ports to exclude from scan. Ex: -e 22; -p 21,23. [default: 0] -g Amount of goroutines to spread connection attempts across. [default: 1000] -c Minimum confidence level to flag port as open. [default: 1] -i Network interface to listen on. -t Timeout in Milliseconds to wait for a connection. [default: 400] -j Output JSON to file. - ``` diff --git a/cmd/parse.go b/cmd/parse.go index 0f811b1..a4747ef 100644 --- a/cmd/parse.go +++ b/cmd/parse.go @@ -48,7 +48,7 @@ type O struct { } func parse() *O { - args, err := docopt.Parse(usage, nil, true, "cookiescan 2.0.0", false) + args, err := docopt.Parse(usage, nil, true, "cookiescan 2.1.0", false) if err != nil { log.Fatalf("Error parsing usage. Error: %s\n", err.Error()) } @@ -79,7 +79,7 @@ func parse() *O { log.Fatalf("Error parsing port string. Error %s\n", err.Error()) } servicesToExclude, err := explode(args["-e"].(string)) - if err != nil { + if err != nil && args["-e"].(string) != "0" { log.Fatalf("Error parsing exclude port string. Error %s\n", err.Error()) } for _, e := range servicesToExclude {