├── README.md ├── display-password.py ├── display-password.toml └── screenshot.jpg /README.md: -------------------------------------------------------------------------------- 1 | # Pwnagotchi display-password.py Plugin 2 | 3 | ### Now available in the [evilsocket/pwnagotchi-plugins-contrib](https://github.com/evilsocket/pwnagotchi-plugins-contrib) repo, woohoo! 4 | 5 | Displays the most recent cracked password on the Pwnagotchi display. It currently processes the wpa-sec potfile generated by the Pwnagotchi wpa-sec.py plugin. Support for OnlineHashCrack is a goal. Feel free to help out if you want. 6 | 7 | # Installation 8 | 9 | 1. SSH into your Pwnagotchi and create a new folder for third-party Pwnagotchi plugins. I use `/root/custom_plugins/` but it doesn't really matter: `mkdir /root/custom_plugins/` 10 | 1. Grab the `display-password.py` and `display-password.toml` file from this Github repo and put it into that custom plugins directory. 11 | 1. Edit `/etc/pwnagotchi/config.toml` and change the `main.custom_plugins` variable to point to the custom plugins directory you just created: `main.custom_plugins = "/root/custom_plugins/"` 12 | 1. In the same `/etc/pwnagotchi/config.toml` file, add the following lines to enable the plugin: 13 | ``` 14 | main.plugins.display-password.enabled = true 15 | main.plugins.display-password.orientation = "horizontal" 16 | ``` 17 | Once the above steps are completed, reboot the Pwnagotchi to ensure all changes are applied. 18 | 19 | # Screenshot: 20 | 21 | ![display-password.py](/screenshot.jpg?raw=true "display-password.py") 22 | -------------------------------------------------------------------------------- /display-password.py: -------------------------------------------------------------------------------- 1 | # display-password shows recently cracked passwords on the pwnagotchi display 2 | # 3 | # 4 | ############################################################### 5 | # 6 | # Inspired by, and code shamelessly yoinked from 7 | # the pwnagotchi memtemp.py plugin by https://github.com/xenDE 8 | # 9 | ############################################################### 10 | from pwnagotchi.ui.components import LabeledValue 11 | from pwnagotchi.ui.view import BLACK 12 | import pwnagotchi.ui.fonts as fonts 13 | import pwnagotchi.plugins as plugins 14 | import pwnagotchi 15 | import logging 16 | import os 17 | 18 | 19 | class DisplayPassword(plugins.Plugin): 20 | __author__ = '@nagy_craig' 21 | __version__ = '1.0.0' 22 | __license__ = 'GPL3' 23 | __description__ = 'A plugin to display recently cracked passwords' 24 | 25 | def on_loaded(self): 26 | logging.info("display-password loaded") 27 | 28 | def on_ui_setup(self, ui): 29 | if ui.is_waveshare_v2(): 30 | h_pos = (0, 95) 31 | v_pos = (180, 61) 32 | elif ui.is_waveshare_v1(): 33 | h_pos = (0, 95) 34 | v_pos = (170, 61) 35 | elif ui.is_waveshare144lcd(): 36 | h_pos = (0, 92) 37 | v_pos = (78, 67) 38 | elif ui.is_inky(): 39 | h_pos = (0, 83) 40 | v_pos = (165, 54) 41 | elif ui.is_waveshare27inch(): 42 | h_pos = (0, 153) 43 | v_pos = (216, 122) 44 | else: 45 | h_pos = (0, 91) 46 | v_pos = (180, 61) 47 | 48 | if self.options['orientation'] == "vertical": 49 | ui.add_element('display-password', LabeledValue(color=BLACK, label='', value='', 50 | position=v_pos, 51 | label_font=fonts.Bold, text_font=fonts.Small)) 52 | else: 53 | # default to horizontal 54 | ui.add_element('display-password', LabeledValue(color=BLACK, label='', value='', 55 | position=h_pos, 56 | label_font=fonts.Bold, text_font=fonts.Small)) 57 | 58 | def on_unload(self, ui): 59 | with ui._lock: 60 | ui.remove_element('display-password') 61 | 62 | def on_ui_update(self, ui): 63 | last_line = 'tail -n 1 /root/handshakes/wpa-sec.cracked.potfile | awk -F: \'{print $3 " - " $4}\'' 64 | ui.set('display-password', 65 | "%s" % (os.popen(last_line).read().rstrip())) 66 | -------------------------------------------------------------------------------- /display-password.toml: -------------------------------------------------------------------------------- 1 | main.plugins.display-password.enabled = true 2 | main.plugins.display-password.orientation = "horizontal" -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c-nagy/pwnagotchi-display-password-plugin/f1c7d2a3b356aa7933a4056b902ff99c777872a1/screenshot.jpg --------------------------------------------------------------------------------