Skip to content

Commit c62b5fc

Browse files
committed
Fix logging bug in change-password
1 parent b2b5c68 commit c62b5fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nxc/modules/change-password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def options(self, context, module_options):
3434
netexec smb <DC_IP> -u username -p password -M change-password -o USER='target_user' NEWPASS='target_user_newpass'
3535
netexec smb <DC_IP> -u username -p password -M change-password -o USER='target_user' NEWNTHASH='target_user_newnthash'
3636
"""
37-
self.context = context
3837
self.newpass = module_options.get("NEWPASS")
3938
self.newhash = module_options.get("NEWNTHASH")
4039
self.target_user = module_options.get("USER")
@@ -78,6 +77,7 @@ def authenticate(self, context, connection, protocol, anonymous=False):
7877
raise
7978

8079
def on_login(self, context, connection):
80+
self.context = context
8181
target_username = self.target_user or connection.username
8282
target_domain = connection.domain
8383

0 commit comments

Comments
 (0)