Skip to content

Commit

Permalink
adding error handling in main and README
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Nov 19, 2023
1 parent dae7deb commit 0b8aa4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion cmd/bruter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b8aa4d

Please sign in to comment.