Bump the version and add -V
This commit is contained in:
parent
c9217e39f5
commit
66c46c35c0
6
main.go
6
main.go
@ -24,6 +24,7 @@ type cliOptions struct {
|
|||||||
matcherRegexp string
|
matcherRegexp string
|
||||||
matcherWords string
|
matcherWords string
|
||||||
headers headerFlags
|
headers headerFlags
|
||||||
|
showVersion bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type headerFlags []string
|
type headerFlags []string
|
||||||
@ -59,7 +60,12 @@ func main() {
|
|||||||
flag.StringVar(&conf.Method, "X", "GET", "HTTP method to use.")
|
flag.StringVar(&conf.Method, "X", "GET", "HTTP method to use.")
|
||||||
flag.BoolVar(&conf.Quiet, "s", false, "Do not print additional information (silent mode)")
|
flag.BoolVar(&conf.Quiet, "s", false, "Do not print additional information (silent mode)")
|
||||||
flag.IntVar(&conf.Threads, "t", 40, "Number of concurrent threads.")
|
flag.IntVar(&conf.Threads, "t", 40, "Number of concurrent threads.")
|
||||||
|
flag.BoolVar(&opts.showVersion, "V", false, "Show version information.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
if opts.showVersion {
|
||||||
|
fmt.Printf("ffuf version: %s\n", ffuf.VERSION)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
if err := prepareConfig(&opts, &conf); err != nil {
|
if err := prepareConfig(&opts, &conf); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
|
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
|
||||||
flag.Usage()
|
flag.Usage()
|
||||||
|
|||||||
@ -2,5 +2,5 @@ package ffuf
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
//VERSION holds the current version number
|
//VERSION holds the current version number
|
||||||
VERSION = "0.5"
|
VERSION = "0.6"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user