KeePassHttpClient 1.2.0

dotnet add package KeePassHttpClient --version 1.2.0
                    
NuGet\Install-Package KeePassHttpClient -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KeePassHttpClient" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KeePassHttpClient" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="KeePassHttpClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KeePassHttpClient --version 1.2.0
                    
#r "nuget: KeePassHttpClient, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KeePassHttpClient@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KeePassHttpClient&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=KeePassHttpClient&version=1.2.0
                    
Install as a Cake Tool

This is archived and no longer maintained.


KeePassHttpClient

KeePassHttpClient is a .Net library of for accessing a KeePass database through KeePassHttp.

I've searched for a KeePass command line client, found nothing - so I created this together with KeePassHttpCli.

Currently not every request type is implemented, see the usage examples below.

Installation

KeePassHttpClient is available via NuGet: https://www.nuget.org/packages/KeePassHttpClient

Or directly via the Package Manager Console: Install-Package KeePassHttpClient

Usage examples

//Connect to a local default KeePassHttp instance and associate the database, if not already done
KeePassHttpConnection connection new KeePassHttpConnection();
if (!connection.Connect())
  connection.Associate();

//Get an object representing the current connection state (key and so on, store this somewhere to connect with the same id again)
ConnectionInfo connectionInfo = connection.GetConnectionInfo()

//So from now on we can create the connection like so
KeePassHttpConnection connection2 = KeePassHttpConnection.FromConnectionInfo(connectionInfo);

//Get all credentials matching the url "google.com"
KeePassCredential[] credentialsByUrl = connection.RetrieveCredentialsByUrl("google.com");

//Get all credentials matching the generic search string "google" (the search is execute like through the quick search box in KeePass)
//Please note that you may need a patched version of KeePassHttp, if it's not already merged, see https://github.com/berrnd/keepasshttp/commit/5361f72d03dd44ddb0c49f700f15e416e6983685
KeePassCredential[] credentialsBySearch = connection.RetrieveCredentialsByCustomSearchString("google");

Maybe also KeePassHttpCli is a good reference for an usage example.

ToDo

  • Documentation
  • Implement all KeePassHttp request types

Parts of KeePassHttpClient were inspired by https://github.com/vprovalov/passie

Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 1,877 9/16/2015 1.2.0 is deprecated because it is no longer maintained.
1.1.0 1,471 9/16/2015
1.0.0 1,461 9/15/2015

Implemented KeePassHttp request type "get-logins-custom-search"