A KeePass plugin to provide a communication channel for php-scripts, ... to be able to query the KeePass password store from the commandline.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
example
src Commit version 1.0 Jan 11, 2019
.gitignore Commit version 1.0 Jan 11, 2019
CONTRIBUTING.md Commit version 1.0 Jan 11, 2019
LICENSE.md Commit version 1.0 Jan 11, 2019
README.md Commit version 1.0 Jan 11, 2019
screenshot.png

README.md

KeePass Commander

KeePass Commander is a plugin for the KeePass password store. It's purpose is to provide a communication channel for php-scripts, ... to be able to query the KeePass password store from the commandline.

Screenshot

Download binary

For Windows (.NET framework 2.0 / .NET framework 4), the latest version can be found here. The plugin works with KeePass 2.41. Because the plugin barely uses anything from KeePass, it will probably work with all future KeePass versions.

Download the zip and unpack it in the KeePass directory where KeePass.exe is located.

Commandline arguments

KeePassCommand.exe get {-out:outputfilename} "KeePass-entry-title" "KeePass-entry-title" ...

KeePass-entry-title must match exactly, there is no fuzzy logic. All open databases in KeePass are searched.

If -out: is ommitted then the output will be at the console (STDOUT).

When using -out:, don't forget to delete the outputfile from the (hopefully Bitlocker encrypted, with Bitlocker boot password) harddisk after reading the contents!

e.g. KeePassCommand.exe get "Sample Entry"

Examples

Examples are found in the github directory example.

  • example.kdbx is a KeePass database. It's master password is example.
  • KeePassEntry.php can be used to query the KeePass password store from PHP. With minimal modifications you can use it anywhere.

Why

The plugin KeePassHttp already exists for querying the password store. I did not want to use this plugin, because it embeds a http server inside KeePass. And I don't want to "pair" with a code, because I want to communicate from the commandline, without configuration.

So I build KeePassCommander.dll plugin which runs a Windows named-pipe-server inside KeePass. And a KeePassCommand.exe commandline tool to communicate with KeePassCommander.dll.

I'm using this plugin among other things to automate DeployHQ. In KeePass I store the DeployHQ API key. From a php script the API key is queried and then used.

Contributions

Contributions are welcome. Please read CONTRIBUTING.md before making any contribution!

License

The license is MIT.