Skip to content

Possible fix for known bug #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion display-password.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class DisplayPassword(plugins.Plugin):
__version__ = '1.0.0'
__license__ = 'GPL3'
__description__ = 'A plugin to display recently cracked passwords'


def __init__(self):
self.peers_detected = False

def on_loaded(self):
logging.info("display-password loaded")

Expand Down Expand Up @@ -60,6 +63,21 @@ def on_unload(self, ui):
ui.remove_element('display-password')

def on_ui_update(self, ui):
if self.peers_detected:
ui.hide_element('display-password')
else:
ui.show_element('display-password')


last_line = 'tail -n 1 /root/handshakes/wpa-sec.cracked.potfile | awk -F: \'{print $3 " - " $4}\''
ui.set('display-password',
"%s" % (os.popen(last_line).read().rstrip()))

# Called when a new peer is detected
def on_peer_detected(self, agent, peer):
self.peers_detected = True

# Called when a known peer is lost
def on_peer_lost(self, agent, peer):
self.peers_detected = False
ui.show_element('display-password')