From 0b8aa4dc0444524e017603d4e273fc4d9750ae81 Mon Sep 17 00:00:00 2001 From: CyberRoute Date: Sun, 19 Nov 2023 16:17:24 +0100 Subject: [PATCH] adding error handling in main and README --- README.md | 3 +++ cmd/bruter/main.go | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f7cf63..a3feb00 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,6 @@ go build -o build/bruter cmd/bruter/*.go # License Bruter is developed by Alessandro Bresciani with some help from various projects and released with GPL license. + +# Acknowledgments +DB file https://github.com/CyberRoute/bruter/blob/main/db/dict.txt has been borrowed from https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt \ No newline at end of file diff --git a/cmd/bruter/main.go b/cmd/bruter/main.go index 6acc2e7..a139d49 100644 --- a/cmd/bruter/main.go +++ b/cmd/bruter/main.go @@ -52,7 +52,10 @@ func main() { logger := log.Output(zerolog.ConsoleWriter{Out: os.Stderr}) app.ZeroLog = &logger - IP, _ := network.ResolveByName(*Domain) + IP, err := network.ResolveByName(*Domain) + if err != nil { + logger.Fatal().Msg(fmt.Sprintf("Unable to resolve %s", *Domain)) + } logger.Info().Msg(fmt.Sprintf("Scanning IP %s %s", IP, "OK")) app.InProduction = false