A Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs
Project description
Libray
Libray: A portmanteau of Libre and Blu-Ray
Libray aims to be a Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs.
A hackable, crossplatform, alternative to ISOTools and ISO-Rebuilder.
How to install
Note: You will need Python 3, so you might want to use python3
and pip3
instead of python
and pip
depending on your system.
From PyPi:
sudo pip install libray
Manually:
-
Clone this repository
git clone https://notabug.org/necklace/libray
-
Install dependencies with
sudo pip install -r requirements.txt
-
Run
sudo python setup.py install
From AUR:
For Arch or Arch-based GNU/Linux distributions there's an option to install libray from the AUR (Arch User Repository).
You will need an AUR helper (of which there are many).
Then you will need to run the appropriate install command for that AUR helper using libray
as package name.
This will essentially automatically do the manual method for you.
With pipx:
- PyPi version:
pipx install libray
Done!
libray
is now installed to your path.
How do I use it?
usage: libray [-h] (-i ISO | -k IRD) [-o OUTPUT] [-d DECRYPTION_KEY] [-v] [-q] [-r] [-c] [-t CHECKSUM_TIMEOUT] [--info]
A Libre (FLOSS) Python application for unencrypting, extracting, repackaging, and encrypting PS3 ISOs
options:
-h, --help show this help message and exit
-i ISO, --iso ISO Path to .iso file or stream
-k IRD, --ird IRD Path to .ird file
optional arguments:
-o OUTPUT, --output OUTPUT
Output filename
-d DECRYPTION_KEY, --decryption-key DECRYPTION_KEY
Manually specify key
-v, --verbose Increase verbosity
-q, --quiet Quiet mode, only prints on error
-r, --re-encrypt Re-encrypt .iso
-c, --checksum Allow fallback to CRC32 checksum (disabled by default)
-t CHECKSUM_TIMEOUT, --checksum-timeout CHECKSUM_TIMEOUT
How many seconds to wait for CRC32 checksum (default 15)
--info Print info about .iso or .ird, then quit.
First off, even before you install libray, you will need a compatible Blu-Ray drive that can read PS3 discs.
There's a compiled list of compatible drives here: https://rpcs3.net/quickstart (archive) (see "Compatible Blu-ray disc drives section").
1. Decrypt
On some systems (eg. Linux), you can decrypt directly from the disc:
libray -i /dev/sr0 -o ps3_game_decrypted.iso
Libray is bundled with redump keys and will automatically try to decrypt the .iso if it finds a compatible key. If not, it will try to download an IRD decryption file for your iso. If you don't have internet connection, but you do have an .ird file you can specify that:
libray -i /dev/sr0 -k game_ird_file.ird -o ps3_game_decrypted.iso
Alternatively, you can first rip the disc to an ISO file and then decrypt from the ISO file:
libray -i ps3_game.iso -o ps3_game_decrypted.iso
If libray is unable to download an .ird for your game, you could manually give it the key, if you have it:
libray -i ps3_game.iso -d DECRYPTION_KEY -o ps3_game_decrypted.iso
2. Extract decrypted ISO
Then, if you want to feed it into RPCS3 just extract the contents of the .ISO:
7z x nfs_ps3_decrypted.iso
And move the resulting folders into a folder named after the game ID into the appropriate folder for RPCS3, for example:
- Linux: /home/username/.config/rpcs3/dev_hdd0/disc/BLUS0000
- macOS: ~/Library/Application Support/rpcs3/dev_hdd0/disc/BLUS0000
3. (Optional) Print info about .iso or .ird:
Get info from .iso without decrypting
libray -i ps3_game.iso --info
Get info from .ird
libray -k game_ird_file.ird --info
License
This project is Free, Libre, and Open Source Software; FLOSS, licensed under the GNU General Public License version 3. GPLv3.
See also COPYING or LICENSE.txt
Copyright © 2018 - 2024 Nichlas Severinsen
Error!
Help! I get
ImportError: No module named Crypto.Cipher
or
ImportError: cannot import name 'byte_string' from 'Crypto.Util.py3compat' (/usr/lib/python3.7/site-packages/Crypto/Util/py3compat.py)
This is due to multiple similarly named python crypto packages, one way to fix it is:
sudo pip uninstall crypto
sudo pip uninstall pycrypto
sudo pip install pycryptodome
If you get any other errors, or have any other problem with libray, please create an issue!
Development
Bluray disc encryption (archive.fo)
TITLE_ID for Physical Media (archive.fo)
clp = compressed length prefix
Tests
python -m unittest discover -b
Deployment
pip3 install wheel twine
- Place redump keys in tools/keys and .dat in tools/
- Run keys2db.py, ensure it made a file in libray/data/keys.db
- Run
python3 setup.py sdist bdist_wheel
- Run
twine upload dist/*
Todo
- Extract ISO (currently doable with
7z x output.iso
) - Repackage (unextract) iso
- Test .irds with version < 9
- Custom command to backup all irds available
- Unit tests
- Download .irds from vimm.net?
- Parallelization?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file libray-0.0.10.tar.gz
.
File metadata
- Download URL: libray-0.0.10.tar.gz
- Upload date:
- Size: 720.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b5c0ef06385f0f22a9b316be7eb3d361eac6471e9571b46685adb8f012b517f |
|
MD5 | 3f84488cab8cfaa91ba807ec4cef2391 |
|
BLAKE2b-256 | 2171ba6980c3b8a423d415e56d4033d6f045b9c1fde866f36f4aedeaee0ced4b |
File details
Details for the file libray-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: libray-0.0.10-py3-none-any.whl
- Upload date:
- Size: 497.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62f45b85d310ab711cb510803c43181e81a9e014771fd324ddf45ce6a9cff8bc |
|
MD5 | bbbc18165e7d47cac25313f656e78f73 |
|
BLAKE2b-256 | a7d9a3da2a02ed57899af0cf698f510d72133e2639930e910d7b9c341a277746 |