From 4b0523da3af4ec7ba1e9d0c4a9956c2616f11974 Mon Sep 17 00:00:00 2001 From: Mariusz B Date: Sat, 18 Jan 2020 00:02:02 +0100 Subject: [PATCH] Update generateMSBuildPowershellXML.py --- red-teaming/generateMSBuildPowershellXML.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red-teaming/generateMSBuildPowershellXML.py b/red-teaming/generateMSBuildPowershellXML.py index df85512..ae21a0d 100644 --- a/red-teaming/generateMSBuildPowershellXML.py +++ b/red-teaming/generateMSBuildPowershellXML.py @@ -76,7 +76,7 @@ def getInlineTask(payload, exeFile): ]]> ''').safe_substitute( templateName = templateName, - payload2 = base64.b64encode(payload) + payload2 = base64.b64encode(payload.encode()).decode() ) exeLaunchCode = string.Template(''' @@ -95,7 +95,7 @@ def getInlineTask(payload, exeFile): method.Invoke(instance, null); ]]> ''').safe_substitute( - payload2 = base64.b64encode(payload) + payload2 = base64.b64encode(payload.encode()).decode() ) launchCode = exeLaunchCode if exeFile else powershellLaunchCode