From 0c971da15c40b56ea642a71b6e343c6e5f1b8fb9 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Tue, 3 Oct 2017 17:08:23 +0300 Subject: [PATCH] linux's implementation of local_ips returns array of strs instead of unicodes This fixes SambaCry Linux->Linux exploit among other things --- chaos_monkey/network/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chaos_monkey/network/info.py b/chaos_monkey/network/info.py index 605799ce3..e438f37b3 100644 --- a/chaos_monkey/network/info.py +++ b/chaos_monkey/network/info.py @@ -48,7 +48,7 @@ else: def local_ips(): ipv4_nets = get_host_subnets() - valid_ips = [network['addr'] for network in ipv4_nets] + valid_ips = [network['addr'].encode('utf-8').strip() for network in ipv4_nets] return valid_ips