Tshark is optional, falls-back to Wash for WPS-detection.
Should resolve #77
This commit is contained in:
@@ -10,6 +10,10 @@ class Tshark(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def exists():
|
||||
return Process.exists('tshark')
|
||||
|
||||
@staticmethod
|
||||
def check_for_wps_and_update_targets(capfile, targets):
|
||||
'''
|
||||
@@ -21,9 +25,9 @@ class Tshark(object):
|
||||
capfile - .cap file from airodump containing packets
|
||||
targets - list of Targets from scan, to be updated
|
||||
'''
|
||||
# Tshark is required to detect WPS networks
|
||||
if not Process.exists('tshark'):
|
||||
return
|
||||
|
||||
if not Tshark.exists():
|
||||
raise Exception('Cannot detect WPS networks: Tshark does not exist')
|
||||
|
||||
command = [
|
||||
'tshark',
|
||||
@@ -38,7 +42,6 @@ class Tshark(object):
|
||||
]
|
||||
p = Process(command)
|
||||
|
||||
|
||||
try:
|
||||
p.wait()
|
||||
lines = p.stdout()
|
||||
|
||||
Reference in New Issue
Block a user