Skip to content

Commit 39b877a

Browse files
AdamkadabanMarshall-Hallenbeck
authored andcommitted
use context.log.fail instead of print and add debugging
1 parent da61939 commit 39b877a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

nxc/modules/security-questions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from impacket.nt_errors import STATUS_MORE_ENTRIES
33
from impacket.dcerpc.v5.rpcrt import DCERPCException
44
from json import loads
5+
from traceback import format_exc as traceback_format_exc
56

67

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

116117
except Exception as e:
117-
print(str(e))
118+
context.log.fail(f"Error: {e}")
119+
context.log.debug(traceback_format_exc())
120+
118121

119122
finally:
120123
if domainHandle is not None:

0 commit comments

Comments
 (0)