Skip to content

Commit d0f9b2d

Browse files
committed
Display proper info when there is no adcs in the domain
1 parent 81e4977 commit d0f9b2d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

nxc/modules/adcs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def on_login(self, context, connection):
7070
searchBase="CN=Configuration," + base_dn_root,
7171
)
7272
except LDAPSearchError as e:
73-
context.log.fail(f"Obtained unexpected exception: {e}")
73+
if "noSuchObject" in str(e):
74+
context.log.fail("No ADCS infrastructure found.")
75+
else:
76+
context.log.fail(f"Obtained unexpected exception: {e}")
7477

7578
def process_servers(self, item):
7679
"""Function that is called to process the items obtain by the LDAP search when listing PKI Enrollment Servers."""

0 commit comments

Comments
 (0)