Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Oct 12, 2019
2 parents b47f3c6 + 17d2083 commit 8bc4219
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pwnagotchi/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ main:
quickdic:
enabled: false
wordlist_folder: /opt/wordlists/
AircrackOnly:
enabled: false
# monitor interface to use
iface: mon0
# command to run to bring the mon interface up in case it's not up already
Expand Down
57 changes: 57 additions & 0 deletions pwnagotchi/plugins/default/AircrackOnly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
__author__ = 'pwnagotchi [at] rossmarks [dot] uk'
__version__ = '1.0.0'
__name__ = 'AircrackOnly'
__license__ = 'GPL3'
__description__ = 'confirm pcap contains handshake/PMKID or delete it'

'''
Aircrack-ng needed, to install:
> apt-get install aircrack-ng
'''

import logging
import subprocess
import string
import re
import os

OPTIONS = dict()

def on_loaded():
logging.info("cleancap plugin loaded")

def on_handshake(agent, filename, access_point, client_station):
display = agent._view
todelete = 0

result = subprocess.run(('/usr/bin/aircrack-ng '+ filename +' | grep "1 handshake" | awk \'{print $2}\''),shell=True, stdout=subprocess.PIPE)
result = result.stdout.decode('utf-8').translate({ord(c) :None for c in string.whitespace})
if result:
logging.info("[AircrackOnly] contains handshake")
else:
todetele = 1

if todelete == 0:
result = subprocess.run(('/usr/bin/aircrack-ng '+ filename +' | grep "PMKID" | awk \'{print $2}\''),shell=True, stdout=subprocess.PIPE)
result = result.stdout.decode('utf-8').translate({ord(c) :None for c in string.whitespace})
if result:
logging.info("[AircrackOnly] contains PMKID")
else:
todetele = 1

if todelete == 1:
os.remove(filename)
set_text("uncrackable pcap")
display.update(force=True)

text_to_set = "";
def set_text(text):
global text_to_set
text_to_set = text

def on_ui_update(ui):
global text_to_set
if text_to_set:
ui.set('face', "(>.<)")
ui.set('status', text_to_set)
text_to_set = ""

0 comments on commit 8bc4219

Please sign in to comment.