The Wayback Machine - https://web.archive.org/web/20230101170141/https://github.com/detunized/lastpass-sharp
Skip to content

detunized/lastpass-sharp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

LastPass C# API

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.