Merge pull request #507 from FrixosTh/patch-2

Bug Fix on AircrackOnly.py plugin
This commit is contained in:
evilsocket
2019-11-03 15:57:38 +01:00
committed by GitHub

View File

@ -27,16 +27,16 @@ class AircrackOnly(plugins.Plugin):
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
todelete = 0 todelete = 0
handshakeFound = 0
result = subprocess.run(('/usr/bin/aircrack-ng ' + filename + ' | grep "1 handshake" | awk \'{print $2}\''), result = subprocess.run(('/usr/bin/aircrack-ng ' + filename + ' | grep "1 handshake" | awk \'{print $2}\''),
shell=True, stdout=subprocess.PIPE) shell=True, stdout=subprocess.PIPE)
result = result.stdout.decode('utf-8').translate({ord(c): None for c in string.whitespace}) result = result.stdout.decode('utf-8').translate({ord(c): None for c in string.whitespace})
if result: if result:
handshakeFound = 1
logging.info("[AircrackOnly] contains handshake") logging.info("[AircrackOnly] contains handshake")
else:
todelete = 1
if todelete == 0: if handshakeFound == 0:
result = subprocess.run(('/usr/bin/aircrack-ng ' + filename + ' | grep "PMKID" | awk \'{print $2}\''), result = subprocess.run(('/usr/bin/aircrack-ng ' + filename + ' | grep "PMKID" | awk \'{print $2}\''),
shell=True, stdout=subprocess.PIPE) shell=True, stdout=subprocess.PIPE)
result = result.stdout.decode('utf-8').translate({ord(c): None for c in string.whitespace}) result = result.stdout.decode('utf-8').translate({ord(c): None for c in string.whitespace})