From 73856a8be933d513dfb03ea8dd8a29102b74c1ce Mon Sep 17 00:00:00 2001 From: "maor.rayzin" Date: Tue, 6 Nov 2018 18:19:52 +0200 Subject: [PATCH] HOTFIX: fixing location to be str and not unicode, BytesIO cant work with unicode. --- monkey/infection_monkey/exploit/sambacry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/sambacry.py b/monkey/infection_monkey/exploit/sambacry.py index f55b43553..9e08d2dff 100644 --- a/monkey/infection_monkey/exploit/sambacry.py +++ b/monkey/infection_monkey/exploit/sambacry.py @@ -311,7 +311,7 @@ class SambaCryExploiter(HostExploiter): return open(get_binary_file_path(self.SAMBACRY_RUNNER_FILENAME_64), "rb") def get_monkey_commandline_file(self, location): - return BytesIO(DROPPER_ARG + build_monkey_commandline(self.host, get_monkey_depth() - 1, location)) + return BytesIO(DROPPER_ARG + build_monkey_commandline(self.host, get_monkey_depth() - 1, str(location))) @staticmethod def is_share_writable(smb_client, share):