ldap better error message
parent
49d68e0269
commit
83180a6b68
|
@ -140,7 +140,7 @@ class ldap(connection):
|
||||||
logging.debug("Exception:", exc_info=True)
|
logging.debug("Exception:", exc_info=True)
|
||||||
logging.debug('Skipping item, cannot process due to error %s' % str(e))
|
logging.debug('Skipping item, cannot process due to error %s' % str(e))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.logger.error(u'Error connecting to the host.')
|
return [None, None, None]
|
||||||
|
|
||||||
return [target, targetDomain, baseDN]
|
return [target, targetDomain, baseDN]
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ class ldap(connection):
|
||||||
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
|
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
|
||||||
self.username,
|
self.username,
|
||||||
self.password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8,
|
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
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ class ldap(connection):
|
||||||
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
|
self.logger.error(u'{}\\{}:{} {}'.format(self.domain,
|
||||||
self.username,
|
self.username,
|
||||||
nthash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8,
|
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
|
return False
|
||||||
|
|
||||||
def create_smbv1_conn(self):
|
def create_smbv1_conn(self):
|
||||||
|
|
Loading…
Reference in New Issue