Skip to content

Commit 4604d49

Browse files
committed
Fixing output types
1 parent 7371dea commit 4604d49

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

nxc/modules/change-password.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def options(self, context, module_options):
3838
self.reset = module_options.get("RESET", True)
3939

4040
if not self.newpass and not self.newhash:
41-
context.log.error("Either NEWPASS or NEWHASH is required!")
41+
context.log.fail("Either NEWPASS or NEWHASH is required!")
4242
sys.exit(1)
4343

4444
def authenticate(self, context, connection, protocol, anonymous=False):
@@ -69,11 +69,11 @@ def authenticate(self, context, connection, protocol, anonymous=False):
6969
dce.connect()
7070
context.log.info("[+] Successfully connected to DCE/RPC")
7171
dce.bind(samr.MSRPC_UUID_SAMR)
72-
context.log.debug("[+] Successfully bound to SAMR")
72+
context.log.info("[+] Successfully bound to SAMR")
7373
return dce
7474

7575
except DCERPCException as e:
76-
context.log.error(f"DCE/RPC Exception: {e!s}")
76+
context.log.fail(f"DCE/RPC Exception: {e!s}")
7777
raise
7878

7979
def on_login(self, context, connection):
@@ -108,7 +108,7 @@ def on_login(self, context, connection):
108108
# Perform the SMB SAMR password change
109109
self._smb_samr_change(context, connection, target_username, target_domain, self.oldhash, self.newpass, new_nthash)
110110
except Exception as e:
111-
context.log.error(f"Password change failed: {e}")
111+
context.log.fail(f"Password change failed: {e}")
112112

113113
def _smb_samr_change(self, context, connection, target_username, target_domain, oldHash, newPassword, newHash):
114114
try:

0 commit comments

Comments
 (0)