We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6135e12 + dafc28a commit 23f4e63Copy full SHA for 23f4e63
nxc/protocols/ldap.py
@@ -3,6 +3,7 @@
3
import hashlib
4
import hmac
5
import os
6
+from errno import EHOSTUNREACH
7
from binascii import hexlify
8
from datetime import datetime
9
from re import sub, I
@@ -209,7 +210,11 @@ def create_conn_obj(self):
209
210
self.logger.debug(f"{e} on host {self.host}")
211
return False
212
except OSError as e:
- self.logger.error(f"Error getting ldap info {e}")
213
+ if e.errno == EHOSTUNREACH:
214
+ self.logger.info(f"Error connecting to {self.host} - {e}")
215
+ return False
216
+ else:
217
+ self.logger.error(f"Error getting ldap info {e}")
218
219
self.logger.debug(f"Target: {target}; target_domain: {target_domain}; base_dn: {base_dn}")
220
self.target = target
0 commit comments