From bcacac179e0262ed8ee8931422a0383f71766c64 Mon Sep 17 00:00:00 2001 From: Marshall Hallenbeck Date: Sat, 16 Mar 2024 18:13:08 -0400 Subject: [PATCH] fix(nterrors): undo erroneous #1311 change that breaks getErrorString() --- impacket/krb5/kerberosv5.py | 2 +- impacket/smbconnection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/impacket/krb5/kerberosv5.py b/impacket/krb5/kerberosv5.py index d81af85904..f7efb8d2ee 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 str(self) + return constants.ERROR_MESSAGES def __str__( self ): retString = 'Kerberos SessionError: %s(%s)' % (constants.ERROR_MESSAGES[self.error]) diff --git a/impacket/smbconnection.py b/impacket/smbconnection.py index 8f30e028e4..4d27643b7a 100644 --- a/impacket/smbconnection.py +++ b/impacket/smbconnection.py @@ -986,7 +986,7 @@ def getErrorPacket( self ): return self.packet def getErrorString( self ): - return str(self) + return nt_errors.ERROR_MESSAGES[self.error] def __str__( self ): key = self.error