From 47f78d1a2d9c934c424b3ac08560854a28de806a Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 21 Jul 2022 10:52:35 +0200 Subject: [PATCH] Agent: Use response.text in ControlChannel --- monkey/infection_monkey/master/control_channel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/master/control_channel.py b/monkey/infection_monkey/master/control_channel.py index cdf660842..b88cd196a 100644 --- a/monkey/infection_monkey/master/control_channel.py +++ b/monkey/infection_monkey/master/control_channel.py @@ -84,7 +84,9 @@ class ControlChannel(IControlChannel): ) response.raise_for_status() - return [Credentials.from_mapping(credentials) for credentials in response.json] + return [ + Credentials.from_mapping(credentials) for credentials in json.loads(response.text) + ] except ( requests.exceptions.JSONDecodeError, requests.exceptions.ConnectionError,