diff --git a/impacket/krb5/kerberosv5.py b/impacket/krb5/kerberosv5.py index f7efb8d2ee..d81af85904 100644 --- a/impacket/krb5/kerberosv5.py +++ b/impacket/krb5/kerberosv5.py @@ -712,7 +712,7 @@ def getErrorPacket( self ): return self.packet def getErrorString( self ): - return constants.ERROR_MESSAGES + return str(self) def __str__( self ): retString = 'Kerberos SessionError: %s(%s)' % (constants.ERROR_MESSAGES[self.error]) diff --git a/impacket/smbconnection.py b/impacket/smbconnection.py index 4d27643b7a..8f30e028e4 100644 --- a/impacket/smbconnection.py +++ b/impacket/smbconnection.py @@ -986,7 +986,7 @@ def getErrorPacket( self ): return self.packet def getErrorString( self ): - return nt_errors.ERROR_MESSAGES[self.error] + return str(self) def __str__( self ): key = self.error