Update main.go

This commit is contained in:
Pedro Albanese
2021-04-30 18:35:37 -03:00
committed by GitHub
parent 85d0c4e200
commit 5e19f376fb

View File

@@ -22,15 +22,15 @@ import (
func main() {
flag.Parse()
if (len(os.Args) < 2) {
fmt.Println("SHA3 Keccak Hashsum Tool - ALBANESE Lab (c) 2020-2021\n")
if (len(os.Args) < 2) || (*bits != 224 && *bits != 256 && *bits != 384 && *bits != 512) {
fmt.Println("SHA3 Hashsum Tool - ALBANESE Lab (c) 2020-2021\n")
fmt.Println("Usage of",os.Args[0]+":")
fmt.Printf("%s [-v] [-b N] [-c <hash.ext>] [-r] -t <file.ext>\n\n", os.Args[0])
flag.PrintDefaults()
os.Exit(1)
}
if *target != "" && *recursive == false {
files, err := filepath.Glob(*target)
if err != nil {