Jump to content

KeePass Database Automation


smcombs
 Share

Recommended Posts

Ok so I found KeePass which is an amazing product. You can find it here: http://keepass.info/

And I know that KeePass accepts Global Hotkeys and all but I wanted to make it so that I could have my own direct hotkeys and I wanted to manipulate the software a little bit. KeePass can actually do ALMOST everything that i have in this script. So once you get KeePass you can use this script to manipulate the software.

CODE
#include <Misc.au3>

If _Singleton (@ScriptName, 1) = 0 Then ProcessClose(@ScriptName)

AutoItSetOption("WinTitleMatchMode", 4)

HotKeySet("^l", "Exec")

HotKeySet("^s", "Show")

;~ HotKeySet("{ESC}", "Terminate") ;Testing purposes

While 1

Sleep(500)

If WinActive("Your database name.kdbx - KeePass Password Safe") or WinActive("Add Entry") Then

HotKeySet("^h", "Hide")

Else

HotKeySet("^h")

EndIf

If WinExists("Add Entry") Then

HotKeySet("^g", "Gettitle")

Else

HotKeySet("^g")

EndIf

If WinExists("Your database name.kdbx - KeePass Password Safe") Or WinExists("Open Database - Your database name.kdbx") Or WinExists("KeePass") Then

Else

ShellExecute("KeePass.exe", "", "C:\Program Files (x86)\KeePass Password Safe\", "")

WinWait("Open Database - Your database name.kdbx")

WinActivate("Open Database - Your database name.kdbx")

EndIf

WEnd

Func Exec()

$t = WinGetTitle("[ACTIVE]", "")

ControlSend("Your database name.kdbx - KeePass Password Safe", "", "WindowsForms10.SysListView32.app.0.33c0d9d1", $t)

WinActivate("Your database name.kdbx - KeePass Password Safe")

ControlSend("Your database name.kdbx - KeePass Password Safe", "", "WindowsForms10.SysListView32.app.0.33c0d9d1", "^v")

WinSetState("Your database name.kdbx ", "", @SW_HIDE)

EndFunc

Func Gettitle()

$t = WinGetTitle("[ACTIVE]", "")

ControlSend("Add Entry", "", "WindowsForms10.EDIT.app.0.33c0d9d4", $t)

EndFunc

Func Hide()

WinSetState("Your database name.kdbx - KeePass Password Safe", "", @SW_HIDE)

EndFunc

Func Show()

WinSetState("Your database name.kdbx - KeePass Password Safe", "", @SW_SHOW)

EndFunc

;~ Func Terminate() ;Testing purposes

;~ Exit ;Testing purposes

;~ EndFunc ;Testing purposes

Ok I have just learned that when your ready to publish something your not finished. heh. Ok just made some changes It works pretty well now let me know what you guys think and what else it could use. I think all you should have to do is input what your database name is and you should be good to go. What this will allow you to do is basically log into anything that you have in your database, so email, forums, any accounts that you have created on the web in a secure fashion. And all you have to do is be on your login page or window and hit ctrl l. Enjoy!

Edited by smcombs
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...