Skip to content

detunized/lastpass-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LastPass C++ API

Build Status

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.

There are also Ruby and C#/.NET ports available.

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:

#include <iostream>
#include <lastpass/vault.h>

int main()
{
    auto vault = Vault::create("username", "password");
    for (auto const &i: vault.accounts())
    {
        std::cout << "      id: " << i.id() << '\n'
                  << "    name: " << i.name() << '\n'
                  << "username: " << i.username() << '\n'
                  << "password: " << i.password() << '\n'
                  << "   group: " << i.group() << '\n'
                  << "     url: " << i.url() << '\n'
                  << '\n';
    }

    return 0;
}

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

LostPass iOS App

There's an iOS app called LostPass that is based on this library (well almost). If you are a LastPass user it would have made your life much easier if I didn't have to take it down from the App Store. Now it's open source and if you have a developer account or a jailbroken phone you could build it and install it on the phone. The source code is here.

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.

About

LastPass C++ API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages