Skip to content

Commit

Permalink
use context.log.fail instead of print and add debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamkadaban committed Jun 1, 2024
1 parent 53c780c commit f8b7a02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nxc/modules/security-questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from impacket.nt_errors import STATUS_MORE_ENTRIES
from impacket.dcerpc.v5.rpcrt import DCERPCException
from json import loads
from traceback import format_exc as traceback_format_exc


class NXCModule:
Expand Down Expand Up @@ -114,7 +115,9 @@ def getSAMRResetInfo(self, context):
status = resp["ErrorCode"]

except Exception as e:
print(str(e))
context.log.fail(f"Error: {e}")
context.log.debug(traceback_format_exc())


finally:
if domainHandle is not None:
Expand Down

0 comments on commit f8b7a02

Please sign in to comment.