diff --git a/impacket/krb5/kerberosv5.py b/impacket/krb5/kerberosv5.py index 7c66a93d87..5308b4b28a 100644 --- a/impacket/krb5/kerberosv5.py +++ b/impacket/krb5/kerberosv5.py @@ -699,7 +699,7 @@ def getErrorPacket( self ): return self.packet def getErrorString( self ): - return constants.ERROR_MESSAGES[self.error] + return str(self) def __str__( self ): retString = 'Kerberos SessionError: %s(%s)' % (constants.ERROR_MESSAGES[self.error]) @@ -708,7 +708,13 @@ def __str__( self ): if self.error == constants.ErrorCodes.KRB_ERR_GENERIC.value: eData = decoder.decode(self.packet['e-data'], asn1Spec = KERB_ERROR_DATA())[0] nt_error = struct.unpack('