From abfd76cf4f61bbf6a9d147d4e2895d5e7eb4f8fe Mon Sep 17 00:00:00 2001 From: wumb0 Date: Mon, 29 Apr 2024 09:10:39 -0400 Subject: [PATCH] remove uneeded logic from put_file and get_file --- nxc/protocols/smb.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/nxc/protocols/smb.py b/nxc/protocols/smb.py index ebc39941..e0890ace 100755 --- a/nxc/protocols/smb.py +++ b/nxc/protocols/smb.py @@ -1256,12 +1256,8 @@ class smb(connection): self.logger.fail(f"Error writing file to share {self.args.share}: {e}") def put_file(self): - files = self.args.put_file - if isinstance(files, list): - for src, dest in files: - self.put_file_single(src, dest) - else: - self.put_file_single(*files) + for src, dest in self.args.put_file: + self.put_file_single(src, dest) def get_file_single(self, remote_path, download_path): share_name = self.args.share @@ -1278,12 +1274,8 @@ class smb(connection): os.remove(download_path) def get_file(self): - files = self.args.get_file - if isinstance(files, list): - for src, dest in files: - self.get_file_single(src, dest) - else: - self.get_file_single(*files) + for src, dest in self.args.get_file: + self.get_file_single(src, dest) def enable_remoteops(self): try: