Skip to content

Commit

Permalink
Merge pull request #7 from xBelladonna/master
Browse files Browse the repository at this point in the history
Dependency check for aircrack-ng
  • Loading branch information
evilsocket authored Dec 23, 2019
2 parents c68ce64 + 45812d0 commit aefbe52
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions aircrackonly.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ def __init__(self):

def on_loaded(self):
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):
display = agent._view
Expand All @@ -47,6 +54,7 @@ def on_handshake(self, agent, filename, access_point, client_station):
if todelete == 1:
os.remove(filename)
self.text_to_set = "Removed an uncrackable pcap"
logging.warning("Removed uncrackable pcap " + filename)
display.update(force=True)

def on_ui_update(self, ui):
Expand Down
11 changes: 9 additions & 2 deletions quickdic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Aircrack-ng needed, to install:
> apt-get install aircrack-ng
Upload wordlist files in .txt format to folder in config file (Default: /opt/wordlists/)
Cracked handshakes stored in handshake folder as [essid].pcap.cracked
Cracked handshakes stored in handshake folder as [essid].pcap.cracked
'''


Expand All @@ -23,6 +23,13 @@ def __init__(self):

def on_loaded(self):
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):
display = agent.view()
Expand All @@ -35,7 +42,7 @@ def on_handshake(self, agent, filename, access_point, client_station):
logging.info("[quickdic] Handshake confirmed")
result2 = subprocess.run(('aircrack-ng -w `echo ' + self.options[
'wordlist_folder'] + '*.txt | sed \'s/\ /,/g\'` -l ' + filename + '.cracked -q -b ' + result + ' ' + filename + ' | grep KEY'),
shell=True, stdout=subprocess.PIPE)
shell=True, stdout=subprocess.PIPE)
result2 = result2.stdout.decode('utf-8').strip()
logging.info("[quickdic] " + result2)
if result2 != "KEY NOT FOUND":
Expand Down

0 comments on commit aefbe52

Please sign in to comment.