Skip to content

Commit f17cc9c

Browse files
committed
Add debug log messages
1 parent bfd014f commit f17cc9c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

nxc/modules/ntlm_reflection.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ def trigger_winreg(self, connection, context):
9696
)
9797
except SessionError as e:
9898
# STATUS_PIPE_NOT_AVAILABLE error is expected
99-
context.log.debug(str(e))
99+
if "STATUS_PIPE_NOT_AVAILABLE" not in str(e):
100+
raise
101+
else:
102+
context.log.debug(f"Received expected error while triggering winreg: {e}")
100103
# Give remote registry time to start
101104
time.sleep(1)
102105
return True
103-
except (SessionError, BrokenPipeError, ConnectionResetError, NetBIOSError, OSError):
106+
except (SessionError, BrokenPipeError, ConnectionResetError, NetBIOSError, OSError) as e:
107+
context.log.debug(f"Received unexpected error while triggering winreg: {e}")
104108
return False

0 commit comments

Comments
 (0)