Skip to content

Commit

Permalink
get rid of uneeded error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
x90skysn3k committed Feb 23, 2024
1 parent 7ceb1b8 commit d0dbb29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions brute/ftp.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package brute

import (
"fmt"
"strconv"
"time"

Expand All @@ -15,7 +14,8 @@ func BruteFTP(host string, port int, user, password string, timeout time.Duratio
}
defer func() {
if err := conn.Quit(); err != nil {
fmt.Printf("Failed to send QUIT command: %v\n", err)
_ = err
//fmt.Printf("Failed to send QUIT command: %v\n", err)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion brute/pop3.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func BrutePOP3(host string, port int, user, password string, timeout time.Durati

defer func() {
if err := c.Quit(); err != nil {
fmt.Printf("Failed to send QUIT command: %v\n", err)
_ = err
}
}()

Expand Down
6 changes: 4 additions & 2 deletions brute/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func BruteSMTP(host string, port int, user, password string, timeout time.Durati

defer func() {
if err := smtpClient.Quit(); err != nil {
fmt.Printf("Failed to send QUIT command: %v\n", err)
_ = err
//fmt.Printf("Failed to send QUIT command: %v\n", err)
}
}()

Expand All @@ -46,7 +47,8 @@ func BruteSMTP(host string, port int, user, password string, timeout time.Durati
}
defer func() {
if err := smtpClient.Quit(); err != nil {
fmt.Printf("Failed to send QUIT command: %v\n", err)
_ = err
//fmt.Printf("Failed to send QUIT command: %v\n", err)
}
}()
if err := smtpClient.Auth(auth); err == nil {
Expand Down
2 changes: 1 addition & 1 deletion brutespray/brutespray.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Execute() {
file := flag.String("f", "", "File to parse; Supported: Nmap, Nessus, Nexpose, Lists, etc")
host := flag.String("H", "", "Target in the format service://host:port, CIDR ranges supported,\n default port will be used if not specified")
quiet := flag.Bool("q", false, "Suppress the banner")
timeout := flag.Duration("T", 5*time.Second, "Set timeout of bruteforce attempts")
timeout := flag.Duration("w", 5*time.Second, "Set timeout of bruteforce attempts")
retry := flag.Int("r", 3, "Amount of times to retry after receiving connection failed")

flag.Parse()
Expand Down

0 comments on commit d0dbb29

Please sign in to comment.