Tony Minor fix
1 parent 5e71e8f commit b0010b50cbd8c50971b2a9a65bfd5642f7c719b1
root authored on 22 Feb 2022
Showing 5 changed files
View
LdapUsrEnum-linux-386
Not supported
View
LdapUsrEnum-linux-amd64
Not supported
View
LdapUsrEnum-windows-386.exe
Not supported
View
LdapUsrEnum-windows-amd64.exe
Not supported
View
2
■■■
LdapUsrEnum.go
var mainUser string = ""
filter := fmt.Sprintf("(CN=%s)", ldap.EscapeFilter(*username))
searchReq := ldap.NewSearchRequest(DCQueryName, ldap.ScopeWholeSubtree, 0, 0, 0, false, filter, []string{"sAMAccountName","distinguishedName", "primaryGroupID"}, []ldap.Control{})
result, err := l.Search(searchReq)
if err != nil {
if err != nil || len(result.Entries) == 0{
fmt.Print("[+] query full domain to get account username... ")
DCQueryName = *domain
filter = fmt.Sprintf("(CN=%s)", ldap.EscapeFilter(*username))
Buy Me A Coffee