From 796e49e86b3f68dd00a92322c8cef370c925d5f9 Mon Sep 17 00:00:00 2001 From: Alexander Neff Date: Mon, 4 Dec 2023 16:15:27 +0100 Subject: [PATCH] Add exception handling --- nxc/protocols/smb/firefox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nxc/protocols/smb/firefox.py b/nxc/protocols/smb/firefox.py index d3e41b08..38e00726 100644 --- a/nxc/protocols/smb/firefox.py +++ b/nxc/protocols/smb/firefox.py @@ -155,7 +155,10 @@ class FirefoxTriage: return b"" db.close() fh.close() - os.remove(fh.name) + try: + os.remove(fh.name) + except Exception as e: + self.logger.error(f"Error removing temporary file: {e}") def is_master_password_correct(self, key_data, master_password=b""): try: