diff --git a/py/Airmon.py b/py/Airmon.py index 52595d2..e22b753 100644 --- a/py/Airmon.py +++ b/py/Airmon.py @@ -44,9 +44,8 @@ class Airmon(object): p = Process('airmon-ng') for line in p.stdout().split('\n'): # Ignore blank/header lines - if len(line) == 0: continue - if line.startswith('Interface'): continue - if line.startswith('PHY'): continue + if len(line) == 0 or line.startswith('Interface') or line.startswith('PHY'): + continue # Strip out interface information fields = line.split("\t") @@ -242,8 +241,8 @@ class Airmon(object): if re.search('^ *PID', line): hit_pids = True continue - if not hit_pids: continue - if line.strip() == '': continue + if not hit_pids or line.strip() == '': + continue match = re.search('^[ \t]*(\d+)[ \t]*([a-zA-Z0-9_\-]+)[ \t]*$', line) if match: # Found process to kill diff --git a/py/Airodump.py b/py/Airodump.py index 0957774..c8814e7 100644 --- a/py/Airodump.py +++ b/py/Airodump.py @@ -120,9 +120,7 @@ class Airodump(object): # Remove .cap and .xor files from pwd for fil in os.listdir('.'): - if fil.startswith('replay_') and fil.endswith('.cap'): - os.remove(fil) - if fil.endswith('.xor'): + if fil.startswith('replay_') and fil.endswith('.cap') or fil.endswith('.xor'): os.remove(fil) def get_targets(self, apply_filter=True): diff --git a/py/Configuration.py b/py/Configuration.py index c62abc7..fc34585 100644 --- a/py/Configuration.py +++ b/py/Configuration.py @@ -321,9 +321,8 @@ class Configuration(object): result += Color.s('{W}%s------------------{W}\n' % ('-' * max_len)) for (key,val) in sorted(Configuration.__dict__.iteritems()): - if key.startswith('__'): continue - if type(val) == staticmethod: continue - if val is None: continue + if key.startswith('__') or type(val) == staticmethod or val is None: + continue result += Color.s("{G}%s {W} {C}%s{W}\n" % (key.ljust(max_len),val)) return result