Original: lastpass-python (adapted for iOS - Pythonista)
Uses Pythonista to allow for pseudo x-callback-url functionality for LastPass. It downloads your LastPass vault and stores it in Pythonista's keychain. You can then use Pythonista's powerful scripting coupled with an app such as Launch Center Pro to make the LastPass iOS experience much more bearable.
Note: This does a one-way read-only sync from LastPass using an unofficial API - if you want to manipulate your vault in any way (delete/edit) you must use the official LastPass iOS app (requires a LastPass Premium subscription - $12/yr).
There are 2 ways to import your accounts:
- save the encrypted blob locally
- save your accounts to the
keychain
The advantage to using the encrypted blob is that your accounts are not saved to the keychain
. Although the keychain
is encrypted, there may be ways to access it from other apps. Please weigh the risks before using this.
The advantage to using the keychain
is that it is a bit faster and you are not prompted for the lastpass master credentials each time that the blob is opened. You should set keychain.set_master_password
for additional security.
By default lpfinder.py
will look for .lastpass.blob
first and fallback to the keychain
. If you want to use the keychain
, run the import again and choose "Save to keychain" when prompted. If you want to switch to the blob run the import again and choose "Don't Save to keychain".
See below for more.
- Using filedownloader.py, download and extract the zip of this repo:
- Set URL to
https://codeload.github.com/HyShai/lastpass-pythonista/zip/master
. - Tap "Download"
- When the Extract File alert appears, tap "OK".
- Set URL to
Or
- Using Shellista, type the following commands:
mkdir lastpass
cd lastpass
git clone https://github.com/HyShai/lastpass-pythonista.git
Or
- Download the zip of this repo and sync to Dropbox.
- Download it to Pythonista using DropboxFilePicker or DropboxSync.
- Unzip it using Shellista.
- Import your accounts by running
lpimport_api.py
- To use it in an x-callback-url manner run
lpfinder.py
which takes 2 arguments -account_name
andredirect_url
- Tap the account for which you want the password
- The password will be copied to the clipboard and you will be redirected to the url/app that you passed in
- Use
lpimport_api.py
to manually update your accounts (read-only)
If you want to use the encrypted blob, you can optionally save your lastpass master credentials to the keychain
for convenience - though this entails the same risk as above.
- Save your email as service=lastpass_email, account=lastpass, password={{your-email}}.
- Save your password as service=lastpass_master, account=lastpass, password={{your-password}}.
The names of the service and account are definite - see lpfinder.py if you want to change them. See keychain.set_password
An example Launch Center Pro action is here: https://launchcenterpro.com/q9qmfg
Tap this image to see how it works.
Credit for the vast majority of the reverse engineered LastPass API goes to Dmitry Yakimenko
Credit for the Python version of the API goes to konomae
Credit for the adaption of PBKDF to use pbkdf2 instead of simple-pbkdf2 goes to Ole Moritz (and without whom we wouldn't have the awesome Pythonista ;) )
Credit for pbkdf2.py goes to Dwayne C. Litzenberger