From 66c46c35c012dd6fecf15d8bf3238d363c85b719 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Thu, 15 Nov 2018 10:47:43 +0200 Subject: [PATCH] Bump the version and add -V --- main.go | 6 ++++++ pkg/ffuf/const.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 25fa88d..4c2fef0 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ type cliOptions struct { matcherRegexp string matcherWords string headers headerFlags + showVersion bool } type headerFlags []string @@ -59,7 +60,12 @@ func main() { flag.StringVar(&conf.Method, "X", "GET", "HTTP method to use.") flag.BoolVar(&conf.Quiet, "s", false, "Do not print additional information (silent mode)") flag.IntVar(&conf.Threads, "t", 40, "Number of concurrent threads.") + flag.BoolVar(&opts.showVersion, "V", false, "Show version information.") flag.Parse() + if opts.showVersion { + fmt.Printf("ffuf version: %s\n", ffuf.VERSION) + os.Exit(0) + } if err := prepareConfig(&opts, &conf); err != nil { fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err) flag.Usage() diff --git a/pkg/ffuf/const.go b/pkg/ffuf/const.go index 1d0dea4..d3cfb3c 100644 --- a/pkg/ffuf/const.go +++ b/pkg/ffuf/const.go @@ -2,5 +2,5 @@ package ffuf const ( //VERSION holds the current version number - VERSION = "0.5" + VERSION = "0.6" )