dnpak.py
My first reverse engineering library. Originally written in Python and now rewritten in Rust to learn more about binary parsing and improve performance.
dnpak.py
is a Python package (with Rust backend) to manipulate Dragon Nest .pak
files. It is based on data definitions from vincentzhang96/DragonNestFileFormats.
You can:
- Write new PAK files and add files into them.
- Add an entire folder into a PAK file.
- Read existing PAKs and extract all contents.
Installation #
pip install dnpak.py
Getting Started #
Write a new PAK and add files manually:
import dnpak
pak = dnpak.EtFileSystem.write("filename.pak")
pak.add_file("path/to/file", "file/location/in/pak")
pak.close_file_system()
Or add an entire folder:
pak = dnpak.EtFileSystem.write("filename.pak")
pak.add_files("path/to/folder")
pak.close_file_system()
Read and extract from an existing .pak
:
pak = dnpak.EtFileSystem.read("filename.pak")
pak.extract()
pak.close_file_system()