npkPy is an unpacker tool for MikroTiks custom npk container format
Project description
npkPy
The npkPy package module is an unpacking tool for MikroTiks custom NPK container format. The tool is capable to display the content of any NPK package and to export all container.
"NPK stands for MikroTik RouterOS upgrade package" and since there is no solid unpacking tool for the format available, I want to share my approach of it. The format, in general, is used by MikroTik to install and update the software on MikroTiks routerOs systems.
NPK packages can be found here: MikroTik Archive
The code covers the ability to modify the container payload. Yet, this ability won't be available for cli. Please be aware, that you can't create or modify valid packages since they are signed.
All recent packages are signed with EC-KCDSA signature,
and there's no way to create a valid npk file unless you know a secret key.
Installation
pip install npkPy
Usage
$ npkPy is an unpacking tool for MikroTiks custom NPK container format
optional arguments:
-h, --help show this help message and exit
input:
--files FILES Select one or more files to process
--srcFolder SRCFOLDER
Process all NPK files found recursively in given source folder.
--glob GLOB Simple glob. Filter files from --srcFolder which match the given string.
output:
--dstFolder DSTFOLDER
Extract container into given folder
actions:
--showContainer List all container from selected NPK files
--exportAll Export all container from selected NPK files
--exportSquashFs Export all SquashFs container from selected NPK files
--exportZlib Export all Zlib compressed container from selected NPK files
Common understanding: A file represents an NPK package with multiple containers. Each container 'contains' payloads like descriptions, SquashFs images or Zlib compressed data.
Other unpacking tools
If npkPy does not work for you, check out older approaches of NPK unpacking tools:
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
Hashes for npkPy-2020.9.27.10.42-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 293833f823fdf736f9e08e3aae1b9b432e88ac30ad30d66d6efe9d77ce1162f4 |
|
MD5 | d62ef823820933cae2579506bcfd2ff6 |
|
BLAKE2b-256 | 9b189f6fde2aea24295346f86a7e6bf0adc40550655b9ba70754e86a6d793c90 |