diff --git a/monkey/infection_monkey/network/firewall.py b/monkey/infection_monkey/network/firewall.py index 85191551f..f66bea7f4 100644 --- a/monkey/infection_monkey/network/firewall.py +++ b/monkey/infection_monkey/network/firewall.py @@ -41,9 +41,9 @@ class WinAdvFirewall(FirewallApp): cmd = subprocess.Popen('netsh advfirewall show currentprofile', stdout=subprocess.PIPE) out = cmd.stdout.readlines() - for l in out: - if l.startswith('State'): - state = l.split()[-1].strip() + for line in out: + if line.startswith('State'): + state = line.split()[-1].strip() return state == "ON" except Exception: @@ -107,10 +107,10 @@ class WinFirewall(FirewallApp): cmd = subprocess.Popen('netsh firewall show state', stdout=subprocess.PIPE) out = cmd.stdout.readlines() - for l in out: - if l.startswith('Operational mode'): - state = l.split('=')[-1].strip() - elif l.startswith('The service has not been started.'): + for line in out: + if line.startswith('Operational mode'): + state = line.split('=')[-1].strip() + elif line.startswith('The service has not been started.'): return False return state == "Enable" diff --git a/monkey/infection_monkey/network/info.py b/monkey/infection_monkey/network/info.py index cf43271c5..22de0eebb 100644 --- a/monkey/infection_monkey/network/info.py +++ b/monkey/infection_monkey/network/info.py @@ -75,8 +75,8 @@ else: ifaddr = socket.inet_ntoa(ifreq[20:24]) routes.append((dst, msk, "0.0.0.0", LOOPBACK_NAME, ifaddr)) - for l in f.readlines()[1:]: - iff, dst, gw, flags, x, x, x, msk, x, x, x = [var.encode() for var in l.split()] + for line in f.readlines()[1:]: + iff, dst, gw, flags, x, x, x, msk, x, x, x = [var.encode() for var in line.split()] flags = int(flags, 16) if flags & RTF_UP == 0: continue