From 96243ab530820c4e49783743326cc23bc3788923 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Mon, 8 Apr 2024 13:28:08 +0200 Subject: [PATCH] Debugging --- .../windows/pandora_security_win/src/pandora_security_win.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index d8ddc5aaa7..661fd77429 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -345,9 +345,9 @@ def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_con cleaned_line = re.sub(' +', ' ', last_line) # Interpret the result - if auditpol_logon_success_conf in result.stdout: + if auditpol_logon_success_conf.encode(sys.getdefaultencoding()).decode('utf-8') in result.stdout: result = 1 - elif auditpol_logon_noaudit_conf in result.stdout: + elif auditpol_logon_noaudit_conf.encode(sys.getdefaultencoding()).decode('utf-8') in result.stdout: result = 0 else: print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr)