Skip to content

Commit 0d84189

Browse files
committed
Show exception only in debug mode
1 parent d9ce7a4 commit 0d84189

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nxc/protocols/ldap/kerberos.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import random
22
from binascii import hexlify, unhexlify
33
from datetime import datetime, timedelta
4+
import traceback
45
try:
56
# This is only available in python >= 3.11
67
# if we are in a lower version, we will use the deprecated utcnow() method
@@ -237,7 +238,8 @@ def get_tgt_asroast(self, userName, requestPAC=True):
237238
elif e.getErrorCode() == constants.ErrorCodes.KDC_ERR_KEY_EXPIRED.value:
238239
return f"Password of user {userName} expired but user doesn't require pre-auth"
239240
else:
240-
nxc_logger.exception(e)
241+
nxc_logger.fail(e)
242+
nxc_logger.debug(traceback.format_exc())
241243
return None
242244

243245
# This should be the PREAUTH_FAILED packet or the actual TGT if the target principal has the

0 commit comments

Comments
 (0)