Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the set owned filtering if a user is a local administrator, and the report generation. #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pycobalthound.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion report.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys
import time
# HTML templates

Expand Down Expand Up @@ -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") + '</h3>' + inner_html + bot
Expand Down