Home
Softono
lastpass-sharp

lastpass-sharp

Open source MIT C#
36
Stars
17
Forks
0
Issues
3
Watchers
2 years
Last Commit

About lastpass-sharp

lastpass-sharp is an unofficial C library for accessing and parsing LastPass password vault data. It is a port of the Ruby LastPass API and provides functionality to fetch, decrypt, and retrieve account information such as logins, passwords, and URLs from a LastPass account. The library offers a Vault class that simplifies access by exposing all accounts already parsed and decrypted, hiding the underlying complexity. A basic usage example creates a Vault instance with a username and password, then iterates through the accounts to access their credentials. Fetched encrypted blobs can also be stored locally and reused later for offline access. This project is no longer supported. Users are encouraged to use Password Manager Access, a fully supported and regularly updated C library that implements access to a variety of password managers including LastPass. The library is released under the MIT license and welcomes contributions in any form.

Platforms

Web Self-hosted Windows

Languages

C#

Links

LastPass C# API

No longer supported

This project is no longer supported. There's a fully supported and regularly updated C# library that implements access to a veriety of password managers, including LastPass. Please check out Password Manager Access.


This is unofficial LastPass API.

This is a port of Ruby API.

This library implements fetching and parsing of LastPass data. The library is still in the proof of concept stage and doesn't support all LastPass features yet. Only account information (logins, passwords, urls, etc.) is available so far.

There is a low level API which is used to fetch the data from the LastPass server and parse it. Normally this is not the one you would want to use. What you want is the Vault class which hides all the complexity and exposes all the accounts already parsed, decrypted and ready to use. See the example program for detail.

A quick example of accessing your account information:

using LastPass;

var vault = Vault.Create(username, password);
foreach (var i in vault.Accounts)
    Console.WriteLine("{0}: {1}, {2}", i.Name, i.Username, i.Password);

The blob received from LastPass could be safely stored locally (it's well encrypted) and reused later on.

Contributing

Contribution in any form and shape is very welcome. Have comments, suggestions, patches, pull requests? All of the above are welcome.

License

The library is released under the MIT license.