Extract package information from header and PARAM.SFO of PS3/PSX/PSP/PSV/PSM and PS4 packages.
- One-for-all solution to retrieve all header data and PARAM.SFO data from PSN packages
- Decryption of PS3 encrypted data to get all data
- Support of all known package types: PS3/PSX/PSP, PSV/PSM, PS4
- Extraction of PS3/PSX/PSP/PSV/PSM packages similar to pkg2zip and pkg_dec
- pkg_dec's raw extraction, where the complete package is decrypted and again stored as a single file which keeps the package structure 1:1 (decrypted package)
- Content extraction, where the package items are decrypted and stored under their original item names
- ux0 extraction, where the package items are decrypted and stored as they would have been installed on the PS Vita file system.
- PSP: Extraction as EBOOT.PBP for npdrm_free plugin on PSP or on PSV with Adrenaline.
Extraction as ISO/CSO is not supported yet, there are other tools to help out like ISO~PBP Converter and CISO Multi Compressor plus homebrew Takka's ISO Tool 1.981 to integrate updates/patches and Disc Change 2.6 (DL). And also UMDGen.
- PSP: Extraction as EBOOT.PBP for npdrm_free plugin on PSP or on PSV with Adrenaline.
- Easy enhancement of interpreting data (=done at the very end with all data at hand)
- Support http download streaming to avoid harddisk usage
- Support multi-part packages (PS3: XML, PS4: JSON)
- Support multiple output formats
- Support multiple debug verbosity levels
- Easy to maintain and no compiler necessary (=interpreter language)
Unfortunately the cryptographic modules may need a compiler for some operating system (see Requirements ) - Cross platform support
- Decision: Python 3
- Compatible with Python 2 (target version 2.7, but not thoroughly tested anymore)
- Identical output
- Forward-compatible solutions preferred
- Compatible with Python 2 (target version 2.7, but not thoroughly tested anymore)
- Decision: Python 3
- Modular and flexible code for easy enhancement and/or extensions (of course there's always something hard-coded left)
For available options execute: PSN_get_pkg_info.py -h
It is recommended to place --
before the package sources, to avoid them being used as targets, e.g. PSN_get_pkg_info.py --raw -- 01.pkg 02.pkg
will never kill the 01.pkg!
Use at your own risk!
If you state URLs then only the necessary bytes are downloaded into memory. Note that the "--raw" option downloads the complete package once without storing the original data on the file system.
Also see Path Pattern Examples and RIF/RAP/DevKLic Handling.
- Especially information about how to interpret data is needed, e.g. content types
- See TODO.md what is still left to do
- Python Modules
- pycryptodomex >= 3.7.2 (note the X at the end of the module name)
https://www.pycryptodome.org/en/latest/src/installation.html - cryptography (optional if pycryptodomex 3.7.2+ is not available)
- requests
- aenum
- fastxor
- packaging
- ecdsa
- pycryptodomex >= 3.7.2 (note the X at the end of the module name)
-
Python 3, which is the recommended version, and most modules can be installed via apt.
Install Python 3 and some modules via the following apt packages:python3 python3-pip python3-requests
. -
Python 2 is the default on Debian, but comes with an outdated pip version until Debian 8.
Note that with Python 2 ZRIF support is not possible at all.
Starting with Debian 9 "Stretch" install Python 2 modules via the following apt packages:python-pip python-future python-requests
.
For Debian up to 8 "Jessie" use the pip version from the original PyPi source:apt-get purge python-pip python-dev python-future apt-get autoremove wget https://bootstrap.pypa.io/get-pip.py python2 get-pip.py pip2 install --upgrade future
-
Install further necessary Python modules via pip.
- Install pycryptodomex module:
https://www.pycryptodome.org/en/latest/src/installation.html- Python 3:
pip3 install --upgrade pycryptodomex
- Python 2:
pip2 install --upgrade pycryptodomex
- Python 3:
- Install cryptography module:
- Optional:
apt-get install <python3-cryptography|python-cryptography>
- Python 3:
pip3 install --upgrade cryptography
- Python 2:
pip2 install --upgrade cryptography
- Optional:
- Install aenum module:
- Python 3:
pip3 install --upgrade aenum
- Python 2:
pip2 install --upgrade aenum
- Python 3:
- Install fastxor module:
- Python 3:
pip3 install --upgrade fastxor
- Python 2:
pip2 install --upgrade fastxor
- Python 3:
- Install packaging module:
- Python 3:
pip3 install --upgrade packaging
- Python 2:
pip2 install --upgrade packaging
- Python 3:
- Install ecdsa module:
- Optional:
apt-get install <python3-ecdsa|python-ecdsa>
- Python 3:
pip3 install --upgrade ecdsa
- Python 2:
pip2 install --upgrade ecdsa
- Optional:
- Install pycryptodomex module:
-
Install Python
Checked with Python 3.7 x64 on Windows 10 x64 Version 1803.- Get it from the Python homepage
- Install launcher for all users
- Add Python to PATH
Adds %ProgramFiles%\Python37 + \Scripts to PATH - Use Customize Installation (!!! necessary for advanced options !!!)
- Advanced Options
- Install for all users
-
Install necessary Python modules via pip.
- Start an elevated(!!!) Command Prompt (Run As Admin via Right Click)
- Update PIP itself first:
python -m pip install --upgrade pip
- Install pycryptodomex module:
pip install --upgrade pycryptodomex
https://www.pycryptodome.org/en/latest/src/installation.html - Install cryptography module:
pip install --upgrade cryptography
- Install requests module:
pip install --upgrade requests
- Install aenum module:
pip install --upgrade aenum
- Install fastxor module:
pip install --upgrade fastxor
- Install packaging module:
pip install --upgrade packaging
- Install ecdsa module:
pip install --upgrade ecdsa
- Exit Command Prompt:
exit
Executing python scripts can be done via Windows Explorer or a Command Prompt. Normally no elevation is necessary for script execution, except when the python script wants to change something in the system internals.
- Linux:
export HTTP_PROXY="http://192.168.0.1:3128"; export HTTPS_PROXY="http://192.168.0.1:1080";
- eboot.bin:
--pathpattern '^(USRDIR/EBOOT\.BIN|(contents/runtime/){0,1}eboot\.bin)$'
- *.edat:
--pathpattern '\.(edat|EDAT)$'
- RIF/RAP Conversion:
-f 50 --rapkey ... --rifkey ... -- dummy
- Verification:
-f <0|2|99> [-f 50] --rapkey ... --rifkey ... --devklickey ... -- <edat|pkg file>
There can be multiple results for a package file with different EDAT files.- "NOT REQUIRED" = Either SDAT via header hash or EDAT via Dev KLicensee key
- False = no supplied RAP/RIF or Dev KLicensee key worked
- Otherwise the result is the working RAP or Dev KLicensee key
git master repository at https://github.com/windsurfer1122
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
- AnalogMan1511 - initial idea
- https://playstationdev.wiki/ (previously https://vitadevwiki.com/ & https://www.pspdevwiki.com/)
- http://www.psdevwiki.com/
- lusid1 - enhanced pkg2zip
- mmozeiko - original pkg2zip
- st4rk -PkgDecrypt (pkg_dec)
- qwikrazor87 - pkgrip
- JK3Y - TypeScript/JavaScript/Node.js version of PSN_get_pkg_info
- SSL and zecoxao