log results in debug mode

This commit is contained in:
Alan Hamlett 2017-11-26 10:50:20 -08:00
parent ea7226dc7c
commit 6e4e858499

View file

@ -144,6 +144,11 @@ def send_heartbeats(heartbeats, args, configs, use_ntlm_proxy=False):
_process_server_results(heartbeats, code, content, results, args, configs) _process_server_results(heartbeats, code, content, results, args, configs)
session_cache.save(session) session_cache.save(session)
return SUCCESS return SUCCESS
else:
log.debug({
'response_code': code,
'response_text': content,
})
if should_try_ntlm: if should_try_ntlm:
return send_heartbeats(heartbeats, args, configs, use_ntlm_proxy=True) return send_heartbeats(heartbeats, args, configs, use_ntlm_proxy=True)
@ -157,6 +162,7 @@ def send_heartbeats(heartbeats, args, configs, use_ntlm_proxy=False):
def _process_server_results(heartbeats, code, content, results, args, configs): def _process_server_results(heartbeats, code, content, results, args, configs):
log.debug({ log.debug({
'response_code': code, 'response_code': code,
'results': results,
}) })
for i in range(len(results)): for i in range(len(results)):