-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "" |