Skip to content

Commit ee466af

Browse files
committed
Still display failed TGT retreival for pre2k accounts
1 parent ddc66c1 commit ee466af

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

nxc/modules/pre2k.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ def get_tgt(self, context, username, domain, kdcHost, ccache_base_dir):
124124
context.log.success(f"Successfully obtained TGT for {username}@{domain}")
125125
return True
126126
except Exception as e:
127-
context.log.debug(f"Failed to get TGT for {username}@{domain}: {e}")
127+
if "KDC_ERR_PREAUTH_FAILED" in str(e):
128+
if self.all_option:
129+
context.log.debug(f"Failed to get TGT for {username}@{domain}: KDC_ERR_PREAUTH_FAILED")
130+
else:
131+
context.log.fail(f"Failed to get TGT for {username}@{domain}: KDC_ERR_PREAUTH_FAILED")
132+
else:
133+
context.log.fail(f"Error obtaining TGT for {username}@{domain}: {e}")
128134
return False
129135

130136
def save_ticket(self, context, username, ticket, sessionKey, ccache_base_dir):

0 commit comments

Comments
 (0)