Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lastpass/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,20 @@ def parse_accounts(self, chunks, encryption_key):

key = encryption_key
rsa_private_key = None
shar_folder_name = None

for i in chunks:
if i.id == b'ACCT':
# TODO: Put shared folder name as group in the account
account = parser.parse_ACCT(i, key)
if shar_folder_name is not None:
account.group = shar_folder_name
if account:
accounts.append(account)
elif i.id == b'PRIK':
rsa_private_key = parser.parse_PRIK(i, encryption_key)
elif i.id == b'SHAR':
# After SHAR chunk all the folliwing accounts are enrypted with a new key
key = parser.parse_SHAR(i, encryption_key, rsa_private_key)['encryption_key']

shar = parser.parse_SHAR(i, encryption_key, rsa_private_key)
key = shar['encryption_key']
shar_folder_name = shar['name']
return accounts