Esempio n. 1
0
def decryptHandler(pwd):
    if not unlocked:
        gpwd = decryptPwdE.get()
        if gpwd != "":
            if ap.checkPassword(gpwd) == True:
                detailsGapL2.config(
                    text=
                    '\nPassword decrypted.\nClose the window to encrypt it.\n',
                    fg='green')
                decryptPwdBtn.grid_remove()
                decryptPwdE.grid_remove()
                decryptPwdT.grid_remove()
                pwdTL.config(text=al.decrypt(pwd))
                loginPwdBtn = Button(detailsWindow,
                                     text='Copy Password',
                                     command=lambda key=pwd: copy_button(key))
                loginPwdBtn.grid(row=6, column=5, columnspan=4, sticky=E)
            else:
                detailsGapL2.config(text='\nIncorrect global password.\n',
                                    fg='red')
        else:
            detailsGapL2.config(text='\nPlease enter your global password.\n',
                                fg='red')
    else:
        detailsGapL2.config(
            text='\nPassword decrypted.\nClose the window to encrypt it.\n',
            fg='green')
        pwdTL.config(text=al.decrypt(pwd))
        decryptPwdBtn.grid_remove()
Esempio n. 2
0
def unlockSession():
    global unlocked
    pwd = simpledialog.askstring("Unlock Session",
                                 "If you unlock this session, you will not be asked to enter a password\neach time you want to decrypt an account's information.\nUse when safe.\n\nEnter your global password to continue.",
                                 show='*')
    if pwd is not None:
        if ap.checkPassword(pwd) == True:
            unlocked = True
            f.Log("This session has been unlocked.", "unlockSession")
            refreshWindow()
        else:
            f.Log("This session couldn't unlocked.", "unlockSession")
            messagebox.showerror("Error", "Wrong Password. (or error)")
Esempio n. 3
0
def confirmDeleteAll():
    if not unlocked:
        pwd = simpledialog.askstring("Delete All?",
                                     "Enter your global password to confirm deletion of all accounts.\n\nWarning: This can not be undone.",
                                     show='*')
        if pwd is not None:
            if ap.checkPassword(pwd) == True:
                deleteAll()
            else:
                messagebox.showerror("Error", "Wrong Password. (or error)")
    else:
        confirm = messagebox.askokcancel("Delete Account?",
                                         "Do you want to delete all accounts?\n\nWarning: This can not be undone.")
        if confirm:
            deleteAll()
Esempio n. 4
0
def deleteEntryHandler(id):
    detailsWindow.destroy()
    if not unlocked:
        pwd = simpledialog.askstring("Delete Account?",
                                     "Enter your global password to confirm deletion of this account.\n\nWarning: This can not be undone.",
                                     show='*')
        if pwd is not None:
            if ap.checkPassword(pwd) == True:
                deleteAccount(id)
            else:
                messagebox.showerror("Error", "Wrong Password. (or error)")
    else:
        confirm = messagebox.askokcancel("Delete Account?",
                                         "Do you want to delete this account?\n\nWarning: This can not be undone.")
        if confirm:
            deleteAccount(id)