Skip to content

Commit 4e6b978

Browse files
committed
Ruff changes
1 parent 74f80e6 commit 4e6b978

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/modules/change-password.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def options(self, context, module_options):
3333
self.newpass = module_options.get("NEWPASS")
3434
self.newhash = module_options.get("NEWNTHASH")
3535
self.oldpass = module_options.get("OLDPASS")
36-
self.oldhash = module_options.get("OLDNTHASH" )
36+
self.oldhash = module_options.get("OLDNTHASH")
3737
self.target_user = module_options.get("USER")
3838
self.reset = module_options.get("RESET", True)
3939

@@ -141,7 +141,7 @@ def _smb_samr_change(self, context, connection, target_username, target_domain,
141141
else:
142142
# Handle anonymous/null session password change
143143
self.mustchangePassword(target_username, target_domain, self.oldpass, newPassword, "", oldHash, "", newHash)
144-
except AttributeError as e:
144+
except AttributeError:
145145
context.log.fail("SMB-SAMR password change failed: Ensure that either the OLDPASS or OLDNTHASH option is provided and attempt again.")
146146
except Exception as e:
147147
context.log.fail(f"SMB-SAMR password change failed: {e}")

0 commit comments

Comments
 (0)