Skip to content

Commit

Permalink
feature updates
Browse files Browse the repository at this point in the history
  • Loading branch information
x90skysn3k committed Dec 4, 2024
1 parent 829683c commit 0f71c07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions brute/ftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func BruteFTP(host string, port int, user, password string, timeout time.Duratio
}

go func() {
client, err := ftp.Dial(conn.RemoteAddr().String(), ftp.DialWithNetConn(conn))
client, err := ftp.Dial(conn.RemoteAddr().String(), ftp.DialWithDialFunc(func(network, addr string) (net.Conn, error) { return conn, nil }))
if err != nil {
done <- result{nil, err}
return
Expand All @@ -58,7 +58,9 @@ func BruteFTP(host string, port int, user, password string, timeout time.Duratio
return false, false
case result := <-done:
if result.client != nil {
result.client.Quit()
err := result.client.Quit()
if err != nil {

Check failure on line 62 in brute/ftp.go

View workflow job for this annotation

GitHub Actions / lint

SA9003: empty branch (staticcheck)
}
}
if result.err != nil {
return false, true
Expand Down

0 comments on commit 0f71c07

Please sign in to comment.