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 authored and Marshall-Hallenbeck committed Jun 18, 2024
1 parent da61939 commit 39b877a
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 39b877a

Please sign in to comment.