From 1784d55baef313e430c4c6f52aaf1b2dbe54ec32 Mon Sep 17 00:00:00 2001 From: Marshall Hallenbeck Date: Mon, 13 Nov 2023 12:34:45 -0500 Subject: [PATCH] fix(smb errors): getErrorString only returns one item, not a tuple; fixes #117 --- nxc/protocols/smb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nxc/protocols/smb.py b/nxc/protocols/smb.py index bc3d681fd..156074fed 100755 --- a/nxc/protocols/smb.py +++ b/nxc/protocols/smb.py @@ -439,7 +439,7 @@ def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="", used_ccache = f" through S4U with {username}" self.logger.fail(f"{domain}\\{self.username}{used_ccache} {e}") except (SessionError, Exception) as e: - error, desc = e.getErrorString() + error = e.getErrorString() used_ccache = " from ccache" if useCache else f":{process_secret(kerb_pass)}" if self.args.delegate: used_ccache = f" through S4U with {username}" @@ -500,7 +500,7 @@ def plaintext_login(self, domain, username, password): self.create_conn_obj() return True except SessionError as e: - error, desc = e.getErrorString() + error = e.getErrorString() self.logger.fail( f'{domain}\\{self.username}:{process_secret(self.password)} {error} {f"({desc})" if self.args.verbose else ""}', color="magenta" if error in smb_error_status else "red", @@ -563,7 +563,7 @@ def hash_login(self, domain, username, ntlm_hash): self.create_conn_obj() return True except SessionError as e: - error, desc = e.getErrorString() + error = e.getErrorString() self.logger.fail( f"{domain}\\{self.username}:{process_secret(self.hash)} {error} {f'({desc})' if self.args.verbose else ''}", color="magenta" if error in smb_error_status else "red", @@ -920,7 +920,7 @@ def disks(self): for disk in disks: self.logger.highlight(disk.disk) except Exception as e: - error, desc = e.getErrorString() + error = e.getErrorString() self.logger.fail( f"Error enumerating disks: {error}", color="magenta" if error in smb_error_status else "red",