From 8e3bf96589c43748357bf1a5b227420c3b778405 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 6 Oct 2022 12:40:50 -0400 Subject: [PATCH] Agent: Convert plaintext to str() get_plaintext() can return bytes. Convert the output to a str in PowershellClient to avoid potential issues. --- .../exploit/powershell_utils/powershell_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/powershell_utils/powershell_client.py b/monkey/infection_monkey/exploit/powershell_utils/powershell_client.py index cb8eec010..7e0c05dde 100644 --- a/monkey/infection_monkey/exploit/powershell_utils/powershell_client.py +++ b/monkey/infection_monkey/exploit/powershell_utils/powershell_client.py @@ -43,7 +43,7 @@ def format_password(credentials: Credentials) -> Optional[str]: if credentials.secret_type == SecretType.CACHED: return None - plaintext_secret = get_plaintext(credentials.secret) + plaintext_secret = str(get_plaintext(credentials.secret)) if credentials.secret_type == SecretType.PASSWORD: return plaintext_secret