Skip to content

Commit

Permalink
cleanup missed save
Browse files Browse the repository at this point in the history
  • Loading branch information
5amu committed Mar 3, 2024
1 parent 4be1659 commit ce989b6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions internal/goad/optldap/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"fmt"
"time"

"github.com/5amu/goad/pkg/proxy"
"github.com/5amu/goad/pkg/proxyconn"
"github.com/go-ldap/ldap/v3"
)

func connect(host string, port int, useSsl bool) (*ldap.Conn, error) {
startConn := func(ssl bool) *ldap.Conn {
conn, err := proxy.GetConnection(host, port)
conn, err := proxyconn.GetConnection(host, port)
if err != nil {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions internal/goad/optldap/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/5amu/goad/pkg/proxy"
"github.com/5amu/goad/pkg/proxyconn"
ldapfingerprint "github.com/praetorian-inc/fingerprintx/pkg/plugins/services/ldap"
)

Expand Down Expand Up @@ -109,7 +109,7 @@ func UACFilter(prop UserAccountControl) string {
}

func IsLDAP(host string, port int) bool {
conn, err := proxy.GetConnection(host, port)
conn, err := proxyconn.GetConnection(host, port)
if err != nil {
return false
}
Expand Down
6 changes: 3 additions & 3 deletions internal/goad/optssh/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"strings"
"time"

"github.com/5amu/goad/pkg/proxy"
"github.com/5amu/goad/pkg/proxyconn"
"golang.org/x/crypto/ssh"
)

func connect(user string, signer ssh.AuthMethod, host string, port int) (*ssh.Client, error) {
conn, err := proxy.GetConnection(host, port)
conn, err := proxyconn.GetConnection(host, port)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -112,7 +112,7 @@ func ParseBanner(s string) string {
}

func GrabBanner(host string, port int) (string, error) {
conn, err := proxy.GetConnection(host, port)
conn, err := proxyconn.GetConnection(host, port)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/goad/optwinrm/winrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/5amu/goad/internal/printer"
"github.com/5amu/goad/internal/utils"
putils "github.com/5amu/goad/pkg/proxy"
putils "github.com/5amu/goad/pkg/proxyconn"
"github.com/5amu/goad/pkg/smb"
"github.com/masterzen/winrm"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/kerberos/kclient/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/5amu/goad/pkg/proxy"
"github.com/5amu/goad/pkg/proxyconn"
"github.com/jcmturner/gokrb5/v8/iana/errorcode"
"github.com/jcmturner/gokrb5/v8/messages"
)
Expand Down Expand Up @@ -103,7 +103,7 @@ func dialSendUDP(kdcs map[int]string, b []byte) ([]byte, error) {
return nil, err
}

conn, err := proxy.GetConnectionUDP(host, port)
conn, err := proxyconn.GetConnectionUDP(host, port)
if err != nil {
errs = append(errs, fmt.Sprintf("error setting dial timeout on connection to %s: %v", kdcs[i], err))
continue
Expand Down Expand Up @@ -177,7 +177,7 @@ func dialSendTCP(kdcs map[int]string, b []byte) ([]byte, error) {
return nil, err
}

conn, err := proxy.GetConnection(host, port)
conn, err := proxyconn.GetConnection(host, port)
if err != nil {
errs = append(errs, fmt.Sprintf("error setting dial timeout on connection to %s: %v", kdcs[i], err))
continue
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/proxy.go → pkg/proxyconn/proxy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package utils
package proxyconn

import (
"fmt"
Expand Down
8 changes: 4 additions & 4 deletions pkg/smb/smb.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/5amu/goad/pkg/proxy"
"github.com/5amu/goad/pkg/proxyconn"
"github.com/hirochachacha/go-smb2"
"github.com/praetorian-inc/fingerprintx/pkg/plugins"
smbfingerprint "github.com/praetorian-inc/fingerprintx/pkg/plugins/services/smb"
Expand Down Expand Up @@ -36,7 +36,7 @@ func (i *SMBInfo) String() string {
}

func getMetadata(host string) (*plugins.ServiceSMB, error) {
conn, err := proxy.GetConnection(host, 445)
conn, err := proxyconn.GetConnection(host, 445)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -87,7 +87,7 @@ func GatherSMBInfo(host string) (*SMBInfo, error) {
}

func getSMBInfo(host string, setupSession, v1 bool) (*zgrabsmb.SMBLog, error) {
conn, err := proxy.GetConnection(host, 445)
conn, err := proxyconn.GetConnection(host, 445)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -118,7 +118,7 @@ func NewClient(host string, port int, domain string) *Client {
}

func (c *Client) authenticate(username, password, hash string) error {
conn, err := proxy.GetConnection(c.Host, c.Port)
conn, err := proxyconn.GetConnection(c.Host, c.Port)
if err != nil {
return err
}
Expand Down

0 comments on commit ce989b6

Please sign in to comment.