Coder Social home page Coder Social logo

lp-vault-manager's Introduction

LastPass Vault Manager

LP Vault manager is an Alfred 2 workflow to interact with a LastPass vault.

NOTE: This project is no longer actively maintained by the original owner and is in need of new owners/maintainers going forward. If you are interested, please reach out to [email protected].

LastPass Vault Manager in action

With it, you can:

  • search a vault by query
  • search a vault by your browser's front-most tab
  • launch a vault URL in the default browser
  • copy a vault item's username
  • copy vault item's password
  • inspect a vault item's fields (and copy their values)
  • generate random passwords
  • manage many different configuration options
  • much more!

Installation

Installing The Workflow

Install the workflow from Packal or download the latest version from the release page. Simply double-click on the downloaded file to install it in Alfred.

Updating The Workflow

To check for published releases on GitHub (including automatic installation), use the "Check For Updates" setting within lpsettings.

Updating the workflow

If using Packal, use the Packal Updater Workflow.

Installing lastpass-cli

The engine that drives the ability to interact with LastPass remotely is LastPass' own lastpass-cli command line tool. Therefore, the first step is to ensure that this is installed on your machine. Helpful hint: the Homebrew method is my recommended method. Make sure the version you install has the ability to run lpass export – not all versions do!

Logging In To LastPass

Use lpsettings command and select "Modify LastPass Settings >> Log In To LastPass" to log into LastPass.

Logging In To LastPass

Preventing Future Master Login Requests

The lpsettings command executes the following behind the scenes:

/usr/local/bin/lpass login <USERNAME>

Once executed, you will be asked to input the vault's master password. As expected, lastpass-cli requires this to happen after a certain time interval; since this can cause the Alfred workflow to stop working at various points, it is recommended that you prevent the credentials from timing out:

# The following sets the timeout cancellation for
# the current shell; you can always put this in
# ~/.bashrc, ~/.profile, ~/.zshrc, etc. to make
# it permanent.
export LPASS_AGENT_TIMEOUT=0

If that offends a security-conscious mind, don't feel pressure to disable the timeout. The workflow is smart enough to notify you if you need to log in again:

Please re-login

Additional Alfred Configuration

Make sure your Alfred's "Terminal/Shell" settings have a prefix of ">" – this is necessary if you want to use LastPass Vault Manager to log into LastPass.

Proper Prefix

Commands

Searching a Vault (based on query)

Command: lpvs <QUERY>

lpvs Screenshot

Description: Searches the associated LastPass vault (more specifically, searches the URL and Hostname fields of all vault items) for the provided query.

Default Action: Copy password to the system clipboard.

Modifiers:

  • Tab an item to inspect all of its fields.
  • ⌘-Click an item to copy its username to the system clipboard.
  • Shift-Click an item to open its URL in the user's default browser.

Searching a Vault (based on current URL)

Command: lpbrowser

lpbrowser Screenshot

Description: Searches the associated LastPass vault (more specifically, searches the URL of all vault items) for the URL of the front-most tab in the user's default browser (set by the lpsettings command).

Default Action: Copy password to the system clipboard.

Modifiers:

  • Tab an item to inspect all of its fields.
  • ⌘-Click an item to copy its username to the system clipboard.
  • Shift-Click an item to open its URL in the user's default browser.

Generating Random Passwords

Command: lppg

lppg Screenshot

Description: Generates a number of random passwords.

Default Action: Copy the password to the system clipboard.

Re-Caching Data

Command: lpdd

lpdd Screenshot

Description: Destroys the cached LastPass metadata and re-downloads it.

Default Action: N/A

Relevant Configuration Options: N/A

Setting Configuration Options

Command: lpsettings

lpsettings Screenshot

Description: A nice, guided approach to managing the various settings that LastPass Vault Manager exposes.

Settings:

  • Check For Updates
  • Set Default Browser (for use in lpbrowser)
  • Modify LastPass Settings
    • Log in to LastPass
    • Log out from LastPass
    • Set LastPass Username
    • Set Cache Timeout
    • Set lpass Filepath
  • Modify Password Settings
    • Set number of passwords
    • Set password length
    • Set whether uppercase letters should be used in generated passwords
    • Set whether lowercase letters should be used in generated passwords
    • Set whether digits should be used in generated passwords
    • Set whether symbols should be used in generated passwords
    • Set whether ambiguous characters should be avoided in generated passwords
  • Edit Config File (in case you want to do it the power-user way)
  • View Repository

Q&A and Common Issues

Q: You mention data caching in several places. What exactly is cached? I'm concerned that my LastPass data is being stored insecurely.

A: I take security considerations very seriously. At the same time, I want this workflow to provide a speedy user experience. With that said, here's how caching works:

  1. LastPass Vault Manager caches data from the results of lpass export.
  2. Of the data that lpass export returns, only the URL and Hostname fields are stored in the local cache. All other data is thrown away immediately.
  3. LastPass Vault Manager searches across the URL and Hostname fields, either via query (if using lpvs) or the URL of the default browser's front-most tab (if using lpbrowser).
  4. LastPass Vault Manager uses lpass show <HOSTNAME> to grab other fields for use in the workflow. None of these additional fields are ever stored to disk.

Again, I am committed to being secure with your data. If you have further concerns, please reach out to me via the Issues Page.

Q: I'm noticing something strange: when I type a query into lpvs, it seems as though other results appear for a split second before the correct ones do. Sometimes, the "loading" result appears more than once. What's going on?

Check out this discussion on the Alfred forum. Long story short, Alfred processes every key press when running a Script Filter and doesn't kill previous iterations of that script. Sounds like it'll be addressed in Alfred 2.6.

Q: How come Firefox/Opera/etc. isn't an option when I try to set my default browser (for lpbrowser)?

A: Since I use Applescript for the application-level scripting necessary to grab the URL from the browser's tab, I need a browser that has Applescript support for that activity. Unfortunately, many browsers – including Firefox – don't support it. See this Alfred forum topic for more info.

If there is a particular browser that I don't yet support, but does have the requisite Applescript capabilities, let me know via the Issues Page.

Q. I'm getting a ValueError: No JSON object could be decoded error when I run the workflow. What's going on?

A. Check out issue #5 – long story short, you're probably saving raw Unicode characters in your config file.

Q: Didn't this project used to be Ruby-based? Why does it now use Python?

A: During initial development, I found myself tackling a number of fairly common challenges: data caching, fuzzy searching, configuration management, and more. As I looked at other Alfred workflows, I noticed that several developers had started to write libraries to work with Alfred in their preferred language. I decided to do the same.

After some tinkering, I ran across Alfred-Workflow, a Python library designed to manage all of my challenges and more. It was too beautiful not to try; plus, it gives me the opportunity to get better at Python.

Bugs and Feature Requests

To report bugs with or suggest features/changes for LP Vault Manager, please use the Issues Page.

Contributions are welcome and encouraged. To contribute:

  • Fork LP Vault Manager.
  • Create a branch for your contribution (git checkout -b new-feature).
  • Commit your changes (git commit -am 'Added this new feature').
  • Push to the branch (git push origin new-feature).
  • Create a new Pull Request.

Credits and Thanks

License

(The MIT License)

Copyright © 2014 Aaron Bach [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

lp-vault-manager's People

Contributors

bachya avatar mgillman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lp-vault-manager's Issues

No output

Yesterday I upgraded to the new OS X 10.10.2 and now it does not work any more. I did the output trick as mentioned in the other post.
Got this:

File "/Users/hansmestrum/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.1186B027-AB18-4122-8334-243769316500/workflow/workflow.py", line 1971, in run
func(self)
File "/Users/hansmestrum/Dropbox/alfred/Alfred.alfredpreferences/workflows/user.workflow.1186B027-AB18-4122-8334-243769316500/lpvm.py", line 205, in main
from LastPassVaultManager import LastPassVaultManager
ImportError: No module named LastPassVaultManager
08:40:48 workflow.py:1996 DEBUG Workflow finished in 0.062 seconds.

What could be wrong?

LPVS Fails

First of all, thanks for putting this together. It is a great idea.

Unfortunately, I am having difficulty getting it to play nice, and can get the search feature to work.

Here is the error I am getting in the debug console in Alfred:

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 08:28:52 workflow.py:1386 DEBUG Reading settings from /Users/Brandon/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
08:28:52 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:52 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'a']
08:28:52 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query
08:28:52 lpvs_query.py:39 DEBUG Parsed argument: a
08:28:52 lpvs_query.py:40 DEBUG Parsed delimiter: >
08:28:52 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query a
08:28:52 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query
08:28:52 background.py:180 DEBUG Command arguments cached to /Users/Brandon/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache
08:28:52 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/Brandon/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.EAFF1D69-B788-407C-8B7A-6DD63E81C1C5/workflow/background.pyc', u'update'] ...
08:28:52 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:52 workflow.py:1996 DEBUG Workflow finished in 0.017 seconds.
08:28:52 workflow.py:1996 DEBUG Workflow finished in 0.018 seconds.
08:28:53 background.py:189 DEBUG Executing task update in background...
08:28:53 utilities.py:221 DEBUG Search results: None
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.098 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 08:28:53 workflow.py:1386 DEBUG Reading settings from /Users/Brandon/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'ama']
08:28:53 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query
08:28:53 lpvs_query.py:39 DEBUG Parsed argument: ama
08:28:53 lpvs_query.py:40 DEBUG Parsed delimiter: >
08:28:53 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query ama
08:28:53 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query
08:28:53 background.py:180 DEBUG Command arguments cached to /Users/Brandon/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache
08:28:53 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/Brandon/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.EAFF1D69-B788-407C-8B7A-6DD63E81C1C5/workflow/background.pyc', u'update'] ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.020 seconds.
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.021 seconds.
08:28:53 background.py:189 DEBUG Executing task update in background...
08:28:53 utilities.py:221 DEBUG Search results: None
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.101 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 08:28:53 workflow.py:1386 DEBUG Reading settings from /Users/Brandon/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'amaz']
08:28:53 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query
08:28:53 lpvs_query.py:39 DEBUG Parsed argument: amaz
08:28:53 lpvs_query.py:40 DEBUG Parsed delimiter: >
08:28:53 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query amaz
08:28:53 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query
08:28:53 background.py:180 DEBUG Command arguments cached to /Users/Brandon/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache
08:28:53 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/Brandon/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.EAFF1D69-B788-407C-8B7A-6DD63E81C1C5/workflow/background.pyc', u'update'] ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.016 seconds.
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.017 seconds.
08:28:53 background.py:189 DEBUG Executing task update in background...
08:28:53 utilities.py:221 DEBUG Search results: None
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.099 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 08:28:53 workflow.py:1386 DEBUG Reading settings from /Users/Brandon/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'amazo']
08:28:53 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query
08:28:53 lpvs_query.py:39 DEBUG Parsed argument: amazo
08:28:53 lpvs_query.py:40 DEBUG Parsed delimiter: >
08:28:53 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query amazo
08:28:53 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query
08:28:53 background.py:180 DEBUG Command arguments cached to /Users/Brandon/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache
08:28:53 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/Brandon/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.EAFF1D69-B788-407C-8B7A-6DD63E81C1C5/workflow/background.pyc', u'update'] ...
08:28:53 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.017 seconds.
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.018 seconds.
08:28:53 background.py:189 DEBUG Executing task update in background...
08:28:53 utilities.py:221 DEBUG Search results: None
08:28:53 workflow.py:1996 DEBUG Workflow finished in 0.091 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 08:28:54 workflow.py:1386 DEBUG Reading settings from /Users/Brandon/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
08:28:54 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:54 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'amazon']
08:28:54 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query
08:28:54 lpvs_query.py:39 DEBUG Parsed argument: amazon
08:28:54 lpvs_query.py:40 DEBUG Parsed delimiter: >
08:28:54 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query amazon
08:28:54 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query
08:28:54 background.py:180 DEBUG Command arguments cached to /Users/Brandon/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache
08:28:54 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/Brandon/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.EAFF1D69-B788-407C-8B7A-6DD63E81C1C5/workflow/background.pyc', u'update'] ...
08:28:54 workflow.py:1960 DEBUG Workflow version : 4.2.0
08:28:54 workflow.py:1996 DEBUG Workflow finished in 0.020 seconds.
08:28:54 workflow.py:1996 DEBUG Workflow finished in 0.021 seconds.
08:28:54 background.py:189 DEBUG Executing task update in background...
08:28:54 utilities.py:221 DEBUG Search results: None
08:28:54 workflow.py:1996 DEBUG Workflow finished in 0.106 seconds.

Any Ideas?

Thanks in advance!

Master password reprompts not handled correctly

This might be related to #3.

I couldn't get this workflow to work at first. After a bit of diagnosis, I found lastpass/lastpass-cli#70. Basically, your Lastpass can be configured at the account level, or at the individual site/note level to require a master password reprompt. The kicker is that if your vault contains a single site or secure note that requires reprompt, then every call to lpass export will require the master password, regardless of whether you have an active lpass agent session or not.

You can test this by changing one of your sites to require password reprompt, then run lpass export over and over again - you'll hit the master password prompt every single time.

This totally breaks this Alfred workflow, because the master prompt gets hit when it tries to run the export. In essence, no matter how robust you make the "am I currently logged in?" check (btw - I think checking the sockfile is a good solution), you'll still break in this case.

When you run lpass export, is there any reason why you can't detect the master password prompt (I believe it's output on stderr), and then show an error to the user? As it currently stands, the export that lpdd runs will actually hang indefinitely on the master password prompt.

Failed to login

Failed to login. Nothing happen once I press login, no place for password to enter. And show error when I choose 'login to lastpass'. (Error in workflow: Error2: no such file or directory)

lpass cli installed, logined and working great.

I have multifactor action enabled(yubikey or google authentication), not sure this will cause any problem. Do you cover this part? Cheers.

screen shot 2015-03-12 at 1 18 05 pm 1

lpvs fails with error

First, just wanted to commend you on this excellent workflow. It was sorely needed.

When I run the lpvs command, hit space, and then start to type a query I get the following error (?everytime the filter runs?). Note that this happens with an unquoted (i.e. standard) query such as:
lpvs jira

The error seen in Alfred debug is:

[ERROR: alfred.workflow.input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1851:in block (2 levels) in shift': Illegal quoting in line 1. (CSV::MalformedCSVError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1813:ineach'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1813:in block in shift' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1773:inloop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1773:in shift' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/csv.rb:1715:ineach'
from lpvm.rb:126:in to_a' from lpvm.rb:126:insearchVault'
from lpvm.rb:147:in `

'

Apparently not caching any vault data

I have the command line version working fine and as far as I can tell, LPVM is doing everything right EXCEPT caching the data. No matter what query I search, it just tells me that it can't find anything. I've downloaded data several times. I'm definitely logged in. I set LastPass to never have my login time out via the command line.

User error is possible here, but let me know what you need from me to see what's going on.

lpvs fails without error

Hi Aaron,

many thanks for your great work, I look forward to making extensive use of it in the future, saving me some minutes per day! :-)

Now everything seems to work fine save the most important thing: lpvs <term> does just not respond, instead it just displays "Searching vault...". Nothing is output in alfred's debug mode (set to output all information).

The data that returned from lpass export does contain non-ASCII characters, so this might be related to issue #2, testing with the 3.2 pre-release that you offer in that issue does not fix the issue however (after re-executing lpdd).

I'd be glad to provide additional debugging help if you'd like to investigate this further.

Thanks,
Andreas

Can't login with Alfred 3

When trying to login for the first time -

`Starting debug for 'LastPass Vault Manager'

[2016-06-07 13:16:52][STDERR: input.scriptfilter] 13:16:51 workflow.py:1386 DEBUG Reading settings from /Users/USERNAME/Library/Application Support/Alfred 3/Workflow Data/com.bachya.lpvm/settings.json ...
13:16:51 workflow.py:1960 DEBUG Workflow version : 4.2.0
13:16:51 workflow.py:2221 DEBUG Update check not due
13:16:51 lpsettings_query.py:35 DEBUG Query arguments: [u'']
13:16:51 lpsettings_query.py:43 DEBUG Parsed command: list-settings
13:16:51 lpsettings_query.py:44 DEBUG Parsed argument: None
13:16:51 lpsettings_query.py:45 DEBUG Parsed delimiter: >
13:16:51 lpsettings_query.py:46 DEBUG Parsed query: list-settings
13:16:51 workflow.py:1996 DEBUG Workflow finished in 0.043 seconds.
[2016-06-07 13:16:54][STDERR: input.scriptfilter] 13:16:54 workflow.py:1386 DEBUG Reading settings from /Users/USERNAME/Library/Application Support/Alfred 3/Workflow Data/com.bachya.lpvm/settings.json ...
13:16:54 workflow.py:1960 DEBUG Workflow version : 4.2.0
13:16:54 workflow.py:2221 DEBUG Update check not due
13:16:54 lpsettings_query.py:35 DEBUG Query arguments: [u'list-lp-settings']
13:16:54 lpsettings_query.py:43 DEBUG Parsed command: list-lp-settings
13:16:54 lpsettings_query.py:44 DEBUG Parsed argument: None
13:16:54 lpsettings_query.py:45 DEBUG Parsed delimiter: >
13:16:54 lpsettings_query.py:46 DEBUG Parsed query: list-lp-settings
13:16:54 workflow.py:1996 DEBUG Workflow finished in 0.022 seconds.
[2016-06-07 13:17:00][STDERR: input.scriptfilter] 13:17:00 workflow.py:1386 DEBUG Reading settings from /Users/USERNAME/Library/Application Support/Alfred 3/Workflow Data/com.bachya.lpvm/settings.json ...
13:17:00 workflow.py:1960 DEBUG Workflow version : 4.2.0
13:17:00 workflow.py:2221 DEBUG Update check not due
13:17:00 lpsettings_query.py:35 DEBUG Query arguments: [u'lastpass-login']
13:17:00 lpsettings_query.py:43 DEBUG Parsed command: lastpass-login
13:17:00 lpsettings_query.py:44 DEBUG Parsed argument: None
13:17:00 lpsettings_query.py:45 DEBUG Parsed delimiter: >
13:17:00 lpsettings_query.py:46 DEBUG Parsed query: lastpass-login
13:17:00 lpsettings_query.py:71 DEBUG Executing command: lastpass-login
Error: Could not find decryption key. Perhaps you need to login with /usr/local/bin/lpass login.
13:17:00 workflow.py:1386 DEBUG Reading settings from /Users/USERNAME/Library/Application Support/Alfred 3/Workflow Data/com.bachya.lpvm/settings.json ...
13:17:00 workflow.py:1960 DEBUG Workflow version : 4.2.0
13:17:00 workflow.py:2221 DEBUG Update check not due
13:17:00 lpsettings_exec.py:24 DEBUG Exec arguments: [u'login']
13:17:00 lpsettings_exec.py:29 DEBUG Parsed command: login
13:17:00 lpsettings_exec.py:30 DEBUG Parsed argument: None
13:17:00 lpsettings_exec.py:31 DEBUG Parsed delimiter: >
13:17:00 lpsettings_exec.py:53 DEBUG Executing command: login
13:17:00 utilities.py:162 DEBUG Executing Applescript: tell application "Alfred 2" to search ">/usr/local/bin/lpass login [email protected] && exit"
31:39: syntax error: A “"” can’t go after this identifier. (-2740)
13:17:00 workflow.py:1996 DEBUG Workflow finished in 0.135 seconds.
13:17:00 workflow.py:1996 DEBUG Workflow finished in 0.277 seconds.
[2016-06-07 13:17:00][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Hit ENTER to login to LastPass. `

Cannot Access lpsettings or any lp commands

I am new to Alfred so this might be a problem on my end.

I downloaded and installed the latests lp-vault-manager and installed by double-clicking. When I try to use it, the following happens.

It start out fine:

screen shot 2015-04-05 at 11 25 31 am

I can get here:

screen shot 2015-04-05 at 11 25 46 am

but when I hit Enter, lpsettings is gone:

screen shot 2015-04-05 at 11 25 56 am

I have lpass-cli installed:

$ /usr/local/bin/lpass --version
LastPass CLI v0.5.0

Searching never completes

Having problems after setting everything up. I've managed to get logged in successfully after setting my email, but now whenever searching the vault it just says "Searching...." and stays like that. AFAIK I've followed instructions to the letter!

Any ideas?

lpvs fails with error

Installation, setting up my username and login seems to be working fine. Also lpass export (from the cmdline lists a lot of data.

But I get the following error when trying to search my vault:

example: lpvs skand

Starting debug for 'LastPass Vault Manager'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 23:35:18 workflow.py:1598 DEBUG    Loading cached data from : /Users/fmr/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle
23:35:18 workflow.py:1951 ERROR    'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)
Traceback (most recent call last):
  File "/Users/fmr/Dropbox/settings/alfred_2/Alfred.alfredpreferences/workflows/user.workflow.127EFC78-D2F5-47D5-BD4A-B4C80FBCFB73/workflow/workflow.py", line 1946, in run
    func(self)
  File "lpvm.py", line 246, in main
    search_vault(wf, vault, args.query)
  File "lpvm.py", line 141, in search_vault
    results = _search_vault(wf, vault, query)
  File "lpvm.py", line 40, in _search_vault
    match_on=MATCH_ALL ^ MATCH_ALLCHARS
  File "/Users/fmr/Dropbox/settings/alfred_2/Alfred.alfredpreferences/workflows/user.workflow.127EFC78-D2F5-47D5-BD4A-B4C80FBCFB73/workflow/workflow.py", line 1780, in filter
    value = key(item).strip()
  File "lpvm.py", line 88, in search_item_fields
    return ' '.join(elements)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)
23:35:18 workflow.py:1969 DEBUG    Workflow finished in 0.790 seconds.

lpdd failing to download data

I ran across this workflow today and it looks wonderful—I’d love to use it. However, it doesn’t seem to be working correctly.

I got through the login process fine, but running lpvs returns no results. Running lpdd starts the process but it never finishes. If I quit the lpass process from Activity Monitor, the following data shows up in the debug log:

Starting debug for 'LastPass Vault Manager'

[ERROR: alfred.workflow.action.script] 16:18:11 workflow.py:1386 DEBUG    Reading settings from `/Users/andrew/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
16:18:12 workflow.py:1960 DEBUG    Workflow version : 4.2.0
16:18:12 lpdd_exec.py:22 DEBUG    Exec arguments: [u'download-data']
16:18:12 lpdd_exec.py:34 DEBUG    Parsed command: download-data
16:18:12 lpdd_exec.py:35 DEBUG    Parsed argument: None
16:18:12 lpdd_exec.py:36 DEBUG    Parsed delimiter: >
16:18:12 lpdd_exec.py:43 DEBUG    Executing command: download-data
Please enter the LastPass master password for <[email protected]>.

Master Password: 16:18:24 utilities.py:70 ERROR    There was an issue with LastPass: Command '[u'/usr/local/bin/lpass', u'export']' returned non-zero exit status -15
16:18:24 workflow.py:1996 DEBUG    Workflow finished in 12.587 seconds.

Any idea what might be wrong? I did run lpass from the command line to enter my 2FA password and told it to trust the “browser,” so I don’t think that’s the issue. I just disabled 2FA on my LastPass account and am still seeing the same behavior.

Thanks

Sending password to current window instead of copying to clipboard

I really don't know whether an Alfred workflow can do something like that. But I would really like to send the password directly to the current window instead of copying in the clipboard because the clipboard can be accessed by any application.

Would that be possible?

lpvs not finding anything

Hi Aaron,

Whilst relatively new to Alfred and workflows, I am a long term fan of Lastpass, but am attempting to use the command line interface version for the first time. I am sure your workflow is going to be hugely helpful to me, once I figure out what I have done wrong below.

I used the homebrew installation routine for lastpass. Installed your workflow in the usual way.

However, the search does not seem to work. It either just reports searching, with no result or it quickly tells me nothing has been found.

Following guidance given on another issue, I attempted to run lastpass in a terminal. See below. The key issue seems to be: ImportError: No module named LastPassVaultManager. Would appreciate any guidance you can give.

OSX:usr auser$ python /Users/auser/Library/Application\ Support/Alfred\ 2/Alfred.alfredpreferences/workflows/user.workflow.F3FDC3FF-8A3E-4B15-9276-4A1BB2F4AB6A/lpvm.py search-vault "amazon"
13:06:30 workflow.py:1386 DEBUG Reading settings from /Users/auser/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ...
13:06:30 workflow.py:1960 DEBUG Workflow version : 3.9.0
13:06:30 workflow.py:1978 ERROR No module named LastPassVaultManager
Traceback (most recent call last):
File "/Users/auser/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.F3FDC3FF-8A3E-4B15-9276-4A1BB2F4AB6A/workflow/workflow.py", line 1971, in run
func(self)
File "/Users/auser/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.F3FDC3FF-8A3E-4B15-9276-4A1BB2F4AB6A/lpvm.py", line 205, in main
from LastPassVaultManager import LastPassVaultManager
ImportError: No module named LastPassVaultManager
13:06:30 workflow.py:1996 DEBUG Workflow finished in 0.036 seconds.
OSX:usr auser$

Copied Passwords Adding a CR

Hi there, I've got LP Vault manager configured and working fine. Searches the vault etc and I've got it to copy the data for local access however I've noticed that every time I copy a password from LPVM it adds a carriage return at the end. This means that logins fail when I paste the password in to the respect app or whatever and forget to delete the last character.

ignore password in Clipboard

Hi guys !
Is there a workaround to clear/ignore the password inside Alfred Clipboard ?
I know that Alfred Clipboard can ignore Apps (with Keychain,Wallet,1Password... as default), but no way to add lastpass-cli :s

lpvs KeyError: u'hostname'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 22:26:56 workflow.py:1386 DEBUG Reading settings from/Users/brad.hurley/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json... 22:26:56 workflow.py:1960 DEBUG Workflow version : 4.2.0 22:26:56 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u't'] 22:26:56 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query 22:26:56 lpvs_query.py:39 DEBUG Parsed argument: t 22:26:56 lpvs_query.py:40 DEBUG Parsed delimiter: > 22:26:56 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query t 22:26:56 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query 22:26:56 workflow.py:1609 DEBUG Loading cached data from : /Users/brad.hurley/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle 22:26:56 workflow.py:1978 ERROR u'hostname' Traceback (most recent call last): File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/workflow/workflow.py", line 1971, in run func(self) File "lpvs_query.py", line 55, in main output_query_vault_results(ap) File "lpvs_query.py", line 151, in output_query_vault_results results = util.search_vault_for_query(ap.arg) File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/utilities.py", line 221, in search_vault_for_query match_on=MATCH_ALL ^ MATCH_ALLCHARS File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/workflow/workflow.py", line 1791, in filter value = key(item).strip() File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/utilities.py", line 199, in search_item_fields elements.append(item['hostname']) KeyError: u'hostname' 22:26:56 workflow.py:1996 DEBUG Workflow finished in 0.019 seconds.

When I run lpass ls the results look as I would expect.

I added a debug statement to utilities.search_item_fields and all of the urls are populated, but the item list does not contain any hostnames.

Cannot Set Settings

Hi,

I originally installed LPVM however had an issue and realised that it was due to me not having the LP CLI installed. I've now done this and, despite removing and re-installing the workflow I cannot set any settings. When I enter 'lpsettings' in Alfred it pauses, then wants to Google search for that rather than execute the workflow.

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.