Skip to content

Commit

Permalink
Attempting to fix issue #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
Macmod committed Jul 30, 2024
1 parent bab43b8 commit dd6f1b8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $ KRB5CCNAME=ticket.ccache godap <hostname or IP> -k -d <domain> -t ldap/<DC hos
**Anonymous Bind**

```bash
$ godap <hostname or IP> -p anything
$ godap <hostname or IP>
```

**LDAPS/StartTLS**
Expand Down
8 changes: 7 additions & 1 deletion pkg/ldaputils/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ func NewLDAPConn(ldapServer string, ldapPort int, ldaps bool, tlsConfig *tls.Con
}

func (lc *LDAPConn) LDAPBind(ldapUsername string, ldapPassword string) error {
err := lc.Conn.Bind(ldapUsername, ldapPassword)
var err error

if ldapPassword == "" {
err = lc.Conn.UnauthenticatedBind(ldapUsername)
} else {
err = lc.Conn.Bind(ldapUsername, ldapPassword)
}
return err
}

Expand Down
2 changes: 1 addition & 1 deletion tui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"h12.io/socks"
)

var GodapVer = "Godap v2.7.2"
var GodapVer = "Godap v2.7.3"

var (
LdapServer string
Expand Down

0 comments on commit dd6f1b8

Please sign in to comment.