From 45ca35fd049e27e181251668d2bda3e267a02288 Mon Sep 17 00:00:00 2001
From: xBelladonna <isabelladonnamoore@outlook.com>
Date: Mon, 6 Jan 2020 21:15:55 +0930
Subject: [PATCH] Add face option in plugins Allows setting custom faces in
 AircrackOnly plugin when a pcap is deleted and in Quickdic when a password is
 cracked.

Signed-off-by: xBelladonna <isabelladonnamoore@noreply.users.github.com>
---
 aircrackonly.py  | 6 +++++-
 aircrackonly.yml | 3 ++-
 quickdic.py      | 6 +++++-
 quickdic.yml     | 3 ++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/aircrackonly.py b/aircrackonly.py
index 438b818..1a4b85d 100644
--- a/aircrackonly.py
+++ b/aircrackonly.py
@@ -22,6 +22,10 @@ class AircrackOnly(plugins.Plugin):
 
     def on_loaded(self):
         logging.info("aircrackonly plugin loaded")
+
+        if 'face' not in self.options:
+            self.options['face'] = '(>.<)'
+
         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()
@@ -59,6 +63,6 @@ class AircrackOnly(plugins.Plugin):
 
     def on_ui_update(self, ui):
         if self.text_to_set:
-            ui.set('face', "(>.<)")
+            ui.set('face', self.options['face'])
             ui.set('status', self.text_to_set)
             self.text_to_set = ""
diff --git a/aircrackonly.yml b/aircrackonly.yml
index 75226f5..b7b54d2 100644
--- a/aircrackonly.yml
+++ b/aircrackonly.yml
@@ -1,2 +1,3 @@
 aircrackonly:
-    enabled: false
\ No newline at end of file
+    enabled: false
+    face: '(>.<)'
\ No newline at end of file
diff --git a/quickdic.py b/quickdic.py
index 19c1be6..009a44d 100644
--- a/quickdic.py
+++ b/quickdic.py
@@ -23,6 +23,10 @@ class QuickDic(plugins.Plugin):
 
     def on_loaded(self):
         logging.info("Quick dictionary check plugin loaded")
+
+        if 'face' not in self.options:
+            self.options['face'] = '(·ω·)'
+
         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()
@@ -54,6 +58,6 @@ class QuickDic(plugins.Plugin):
 
     def on_ui_update(self, ui):
         if self.text_to_set:
-            ui.set('face', "(·ω·)")
+            ui.set('face', self.options['face'])
             ui.set('status', self.text_to_set)
             self.text_to_set = ""
diff --git a/quickdic.yml b/quickdic.yml
index c06d98f..05fe137 100644
--- a/quickdic.yml
+++ b/quickdic.yml
@@ -1,3 +1,4 @@
 quickdic:
     enabled: false
-    wordlist_folder: /opt/wordlists/
\ No newline at end of file
+    wordlist_folder: /opt/wordlists/
+    face: '(·ω·)'
\ No newline at end of file