| lcp-epub.py | ||
| lcpa-audiobook.py | ||
| README.md | ||
LCP Removal Script
Requirements
Before running the script, ensure you have the necessary dependencies installed. You can do so by running:
pip install pycryptodome lxml
You can also use a virtual environment (recomended)
python -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install pycryptodome lxml
Instructions
Books (epub)
-
Open the .lcpl file in Thorium Reader:
Thorium is a free ebook reader that supports LCP-protected files. You can download it from the official website. -
Export the ebook as an .epub file:
- In Thorium Reader, right-click on the book you want to decrypt.
- Select the option to export it as an
.epubfile (LCP protected).
-
Run the decryption script:
Use the following command to decrypt the.epubfile:python lcp-epub.py -key <your_passphrase_key> <path_to_epub_file>or with a virtual environment (recomended)
.venv/bin/python lcp-epub.py -key <your_passphrase_key> <path_to_epub_file>Replace
<your_passphrase_key>with the passphrase you received when purchasing or borrowing the ebook, and<path_to_ebook_file>with the path to the.epubfile.
Audiobooks
-
Open the .lcpl file in Thorium Reader:
Thorium is a free ebook reader that supports LCP-protected files. You can download it from the official website. -
Export the ebook as an .lcpa file:
- In Thorium Reader, right-click on the book you want to decrypt.
- Select the option to export it as an
.lcpafile (LCP archive).
-
Run the decryption script:
Use the following command to decrypt the.lcpafile:python lcpa-audiobook.py -key <your_passphrase_key> <path_to_lcpa_file>or with a virtual environment (recomended)
.venv/bin/python lcpa-audiobook.py -key <your_passphrase_key> <path_to_lcpa_file>Replace
<your_passphrase_key>with the passphrase you received when purchasing or borrowing the ebook, and<path_to_ebook_file>with the path to the.lcpafile. -
Access the decrypted files:
Once the script runs successfully, all decrypted content will be saved in a new folder created in the same directory as the.lcpafile.- If the
.lcpafile contains an image file (such as.jpg,.jpeg, or.png) for an audiobook, the image will automatically be copied to the output folder.
- If the
Notes
- This script has been tested on both Windows and Linux.
- Although Thorium is used here as an example for exporting LCP-protected audiobooks and ebooks, any LCP-compatible software with export functionality can be used.