Add dependency check for aircrack-ng

aircrackonly and quickdic plugins check that aircrack-ng is installed else log warning
This commit is contained in:
xBelladonna 2019-12-21 10:58:17 +09:30
parent 35e30c0363
commit 45812d0c72
2 changed files with 16 additions and 2 deletions

View File

@ -22,6 +22,13 @@ class AircrackOnly(plugins.Plugin):
def on_loaded(self): def on_loaded(self):
logging.info("aircrackonly plugin loaded") logging.info("aircrackonly plugin loaded")
check = subprocess.run(
('/usr/bin/dpkg -l aircrack-ng | grep aircrack-ng | awk \'{print $2, $3}\''), shell=True, stdout=subprocess.PIPE)
check = check.stdout.decode('utf-8').strip()
if check != "aircrack-ng <none>":
logging.info("aircrackonly: Found " + check)
else:
logging.warning("aircrack-ng is not installed!")
def on_handshake(self, agent, filename, access_point, client_station): def on_handshake(self, agent, filename, access_point, client_station):
display = agent._view display = agent._view

View File

@ -23,6 +23,13 @@ class QuickDic(plugins.Plugin):
def on_loaded(self): def on_loaded(self):
logging.info("Quick dictionary check plugin loaded") logging.info("Quick dictionary check plugin loaded")
check = subprocess.run(
('/usr/bin/dpkg -l aircrack-ng | grep aircrack-ng | awk \'{print $2, $3}\''), shell=True, stdout=subprocess.PIPE)
check = check.stdout.decode('utf-8').strip()
if check != "aircrack-ng <none>":
logging.info("quickdic: Found " + check)
else:
logging.warning("aircrack-ng is not installed!")
def on_handshake(self, agent, filename, access_point, client_station): def on_handshake(self, agent, filename, access_point, client_station):
display = agent.view() display = agent.view()