1

Trying to grab a list of my passwords from my corporate LastPass account. Using the simple:

import lastpass
vault = lastpass.Vault.open_remote(username, password)
for i in vault.accounts:
    print(i.id, i.username, i.password, i.url)

Got this error: TypeError: Odd-length string

However, before I had more access in my account, that code would return a simple test entry.

Thanks, just started the new job, trying to impress my boss ;).

Misha AM
  • 137
  • 3
  • 13
  • That error usually only shows up when decoding hex-strings. How do you get `username` and `password`? – Graipher Dec 07 '16 at 13:59
  • I would just put my own as strings. I have 1000s of passwords there, most may not even be used. Can it be that the string is literally just too long to be returned? – Misha AM Dec 07 '16 at 14:37
  • Well, I can't reproduce it using my login credentials (for my personal account, don't know whether corporate LastPass accounts are different). It would help if you told us *where* this exception is raised. Is it the `open_remote` call or one of the `print`s? Does any account get printed or none? – Graipher Dec 07 '16 at 17:30
  • Thanks, yes, this works for my personal account as well. It had also worked for my corporate account before I had a massive amount of PWs in there- after admin turned them on for me. And I will try to answer your suggestion in a bit. But while you're here, do you have any idea is it is possible to use this library to also upload to LastPass, or only download? Thanks. – Misha AM Dec 07 '16 at 17:43
  • Since I did not know about this library until I saw your question, I can only say, have a look at the github documentation. – Graipher Dec 07 '16 at 17:44
  • Right, unfortunately, there is not much documentation on GitHub. Here: https://github.com/konomae/lastpass-python – Misha AM Dec 07 '16 at 17:46
  • I don't see any files indicating that something like a `push` or `add` would be implemented, only the `fetch`. So I guess not. – Graipher Dec 07 '16 at 17:49

0 Answers0