Catch exception if domain controller not found --kdcHost
parent
af2dc05b7e
commit
908d074815
|
@ -218,6 +218,13 @@ class ldap(connection):
|
||||||
self.password))
|
self.password))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
self.logger.error(u'{}\{}:{} {}'.format(self.domain,
|
||||||
|
self.username,
|
||||||
|
self.password,
|
||||||
|
"Error connecting to the domain, please add option --kdcHost with the IP of the domain controller"))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def hash_login(self, domain, username, ntlm_hash):
|
def hash_login(self, domain, username, ntlm_hash):
|
||||||
lmhash = ''
|
lmhash = ''
|
||||||
|
@ -283,6 +290,12 @@ class ldap(connection):
|
||||||
self.username,
|
self.username,
|
||||||
self.nthash))
|
self.nthash))
|
||||||
return False
|
return False
|
||||||
|
except OSError as e:
|
||||||
|
self.logger.error(u'{}\{}:{} {}'.format(self.domain,
|
||||||
|
self.username,
|
||||||
|
self.nthash,
|
||||||
|
"Error connecting to the domain, please add option --kdcHost with the IP of the domain controller"))
|
||||||
|
return False
|
||||||
|
|
||||||
def create_smbv1_conn(self):
|
def create_smbv1_conn(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue