From 15e0414d6692d43fb107bb8f55602249061a56ba Mon Sep 17 00:00:00 2001 From: Henri Nurmi Date: Thu, 25 May 2023 13:18:03 +0300 Subject: [PATCH 1/2] Fix the system variable set if a user is a local administrator --- pycobalthound.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycobalthound.py b/pycobalthound.py index 40ea406..311176e 100644 --- a/pycobalthound.py +++ b/pycobalthound.py @@ -929,7 +929,7 @@ def beacon_investigate(dialog, button_name, values): system = True # This will exclude the "Administrator" DA in AD too, but I guess you don't need to investigate if you've got a high integrity beacon as that :) elif user == "Administrator *": - system == True + system = True else: system = False @@ -1000,7 +1000,7 @@ def mark_owned_action(dialog, button_name, values): if user == "SYSTEM *": system = True elif user == "Administrator *": - system == True + system = True else: system = False # Format user/computer names From d3d40dba5557ecc9ff80fbaa490e67fea3d81b85 Mon Sep 17 00:00:00 2001 From: Henri Nurmi Date: Thu, 25 May 2023 13:20:39 +0300 Subject: [PATCH 2/2] Return an empty report if no results --- report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.py b/report.py index 2bb7fbc..3a931e6 100644 --- a/report.py +++ b/report.py @@ -1,5 +1,4 @@ import os -import sys import time # HTML templates @@ -95,6 +94,7 @@ def parse_results(user_results, computer_results): return html def generate_html_report(user_results, computer_results): + report = '' if all(len(result['result']) == 0 for result in user_results) == False or all(len(result['result']) == 0 for result in computer_results) == False: inner_html = parse_results(user_results, computer_results) report = top + title + time.strftime("%Y-%m-%d %H:%M:%S") + '' + inner_html + bot