Based on the original author's investigation at https://blog.unauthorizedaccess.nl/2021/03/07/export-totps-from-lastpass-authenticator.html
- python 3.10
- pip 22.2.2
- Place the script somewhere on a filesystem that is not backed up (for example: avoid google drive or apple time machine protected drives)
- Install dependencies. Ex:
pip install -r requirements.txt(default python3 installations with pip on command interpreter path)pip3 install -r requirements.txt(non-default python3 installations with pip on command interpreter path)python -m pip install -r requirements.txt(python3 installation with pip not on command interpreter path)
- Execute the script. Ex:
python lastpass-authenticator-export.py -u <lastpass_account>(default python3 installation without lastpass OTP configured)python lastpass-authenticator-export.py -u <lastpass_account> -o <######>(default python3 installation with lastpass OTP configured)python3 lastpass-authenticator-export.py -u <lastpass_account>(non-default python3 installation without lastpass OTP configured)
- The python script will request password and proceed once authenticated.
- The script will create an
exportsubdirectory of the invocation directory, with anexport.htmlthat goes through all qr codes along with a name for each. - Once you've enrolled all the codes to your new authenticator, securely delete the
exportdirectory with all of its contents. This may require a data shredder application. At a minimum avoid any trash can/recycle bin options.