Project

lastpass

0.04
Low commit activity in last 3 years
No release in over a year
Read only access to the online LastPass vault
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.8.19
~> 12.0
~> 3.5
~> 1.2

Runtime

~> 0.14
 Project Readme

LastPass Ruby API

Build Status Coverage Status Code Climate Dependency 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 a C#/.NET port and a Python port 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:

require "lastpass.rb"

vault = LastPass::Vault.open_remote "username", "password"
vault.accounts.each do |i|
    puts "#{i.name}: #{i.username}, #{i.password} (#{i.url})"
end

A multifactor password (YubiKey, Google Authenticator) can optionally be appended to the login credentials:

vault = LastPass::Vault.open_remote "username", "password", "multifactor_password"

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 a totally incomplete C++ port of this library. 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.

Thanks

License

The library is released under the MIT license.