ldap better error message

main
mpgn 2022-11-03 15:56:38 -04:00
parent 49d68e0269
commit 83180a6b68
1 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class ldap(connection):
logging.debug("Exception:", exc_info=True)
logging.debug('Skipping item, cannot process due to error %s' % str(e))
except OSError as e:
self.logger.error(u'Error connecting to the host.')
return [None, None, None]
return [target, targetDomain, baseDN]
@ -475,7 +475,7 @@ class ldap(connection):
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
self.username,
self.password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8,
"Error connecting to the domain, please add option --kdcHost with the FQDN of the domain controller or add the IP/HOST to your /etc/host file"))
"Error connecting to the domain, are you sure LDAP service is running on the target ?"))
return False
@ -566,7 +566,7 @@ class ldap(connection):
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
self.username,
nthash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8,
"Error connecting to the domain, please add option --kdcHost with the FQDN of the domain controller or add the IP/HOST to your /etc/host file"))
"Error connecting to the domain, are you sure LDAP service is running on the target ?"))
return False
def create_smbv1_conn(self):