Skip to content

Instantly share code, notes, and snippets.

@karlgluck
Last active April 28, 2024 19:41
Show Gist options
  • Save karlgluck/665c5554dfda62bf2216f3c01d381207 to your computer and use it in GitHub Desktop.
Save karlgluck/665c5554dfda62bf2216f3c01d381207 to your computer and use it in GitHub Desktop.
How to export all LastPass attachments by building lastpass-cli on Windows 11 in 2024

This was harder to do than it should have been.

Install the Windows Subsystem for Linux and get an Ubuntu container running:

PS > wsl --install
PS > wsl --install -d Ubuntu

Run Ubuntu from the Start menu. In the console, become root and install dependencies:

user@UBUNTU> sudo su
root@UBUNTU# apt-get install git openssl libcurl4-openssl-dev libxm12 libssl-dev pinentry-curses libxml2 cmake build-essential pkg-config libxml2-dev libssl-dev libcurl4-openssl-dev

Grab the repo from GitHub and build it:

root@UBUNTU# git clone https://github.com/lastpass/lastpass-cli.git && cd ./lastpass-cli
root@UBUNTU# cmake. && make
root@UBUNTU# make install

Now run the export script to put the exported files on your C:\lpass_attr_export folder

root@UBUNTU# lpass sync
root@UBUNTU# mkdir -p /mnt/c/lpass_attr_export ; ./lpass-att-export.sh -l "<USERNAME>" -o /mnt/c/lpass_attr_export

Unsure if the sync is necessary, it seems to hang...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment