linux's implementation of local_ips returns array of strs instead of unicodes

This fixes SambaCry Linux->Linux exploit among other things
This commit is contained in:
Itay Mizeretz 2017-10-03 17:08:23 +03:00
parent 14eec1ba99
commit 0c971da15c
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ else:
def local_ips(): def local_ips():
ipv4_nets = get_host_subnets() 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 return valid_ips