mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge pull request #507 from FrixosTh/patch-2
Bug Fix on AircrackOnly.py plugin
This commit is contained in:
@ -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})
|
||||||
|
Reference in New Issue
Block a user