mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
if ldaps then ldaps my friend
This commit is contained in:
@@ -185,7 +185,8 @@ class ldap(connection):
|
||||
|
||||
def get_ldap_info(self, host):
|
||||
try:
|
||||
ldapConnection = ldap_impacket.LDAPConnection('ldap://%s' % host)
|
||||
proto = "ldaps" if (self.args.gmsa or self.args.port == 636) else "ldap"
|
||||
ldapConnection = ldap_impacket.LDAPConnection(proto + '://%s' % host)
|
||||
|
||||
resp = ldapConnection.search(scope=ldapasn1_impacket.Scope('baseObject'), attributes=['defaultNamingContext', 'dnsHostName'], sizeLimit=0)
|
||||
for item in resp:
|
||||
|
||||
Reference in New Issue
Block a user