use the new utils password obfuscation functions

nanotube [2007-01-10 05:58]
use the new utils password obfuscation functions
Filename
controlpanel.py
diff --git a/controlpanel.py b/controlpanel.py
index 1022dd9..23ec232 100644
--- a/controlpanel.py
+++ b/controlpanel.py
@@ -5,8 +5,7 @@ import tkMessageBox
 from configobj import ConfigObj
 from validate import Validator
 from tooltip import ToolTip
-#import zlib
-import base64
+import myutils

 class PyKeyloggerControlPanel:
     def __init__(self, cmdoptions, mainapp):
@@ -66,7 +65,7 @@ class PyKeyloggerControlPanel:
         #passroot=Tk()
         #passroot.title("Enter Password")
         mypassword = mytkSimpleDialog.askstring("Enter Password", "Password:", show="*", rootx_offset=-20, rooty_offset=-35)
-        if mypassword != base64.b64decode(self.panelsettings['General']['Master Password']):
+        if mypassword != myutils.password_recover(self.panelsettings['General']['Master Password']):
             if mypassword != None:
                 tkMessageBox.showerror("Incorrect Password", "Incorrect Password")
             return 1
@@ -109,7 +108,7 @@ class ConfigPanel(mytkSimpleDialog.Dialog):
                 if key.find("Password") == -1:
                     self.entrydict[key].insert(END, self.settings[self.section][key])
                 else:
-                    self.entrydict[key].insert(END, base64.b64decode(self.settings[self.section][key]))
+                    self.entrydict[key].insert(END, myutils.password_recover(self.settings[self.section][key]))
                 self.entrydict[key].grid(row=index, column=1)
                 self.tooltipdict[key] = ToolTip(self.entrydict[key], follow_mouse=1, delay=500, text=self.settings[self.section][key + " Tooltip"])
                 index += 1
@@ -120,7 +119,7 @@ class ConfigPanel(mytkSimpleDialog.Dialog):
             if key.find("Password") == -1:
                 self.settings[self.section][key] = self.entrydict[key].get()
             else:
-                self.settings[self.section][key] = base64.b64encode(self.entrydict[key].get())
+                self.settings[self.section][key] = myutils.password_obfuscate(self.entrydict[key].get())

         errortext="Some of your input contains errors. Detailed error output below.\n\n"
ViewGit