PyAmiibo is a library for manipulating Amiibo dumps.
Project description
PyAmiibo
PyAmiibo helps to read, modify and write dump files of Nintendo Amiibo figures. PyAmiibo is capable of parsing most NTAG properties, as well as some Amiibo data.
IMPORTANT: To decrypt and encrypt Amiibo data, you will need two master keys, commonly called unfixed-info.bin and locked-secret.bin. They are not provided.
You can also view the full PyAmiibo docs on ReadTheDocs.
It is based on Marcos Del Sol Vives’ reverse engineering efforts of the Amiibo cryptography (amiitool, reddit).
So why does PyAmiibo exist? amiitool is a C binary, difficult to use in other tools (especially web-based tools). It also re-arranges the sections of the dump file when decrypting, and doesn’t seem to support editing dumps (e.g. changing the UID). Even though PyAmiibo doesn’t use any of amiitool’s code and contains a lot of my own research into the NTAG format and Amiibo data, it would not have been possible without Marcos’ efforts.
Usage
PyAmiibo is Python 3 only, if you get an error installing it this is the most likely reason.
pip install pyamiibo
PyAmiibo is mainly a library, but also contains some simple command-line tools:
$ # convert hexadecimal data to binary, note the quotes!
$ amiibo hex2bin "F1 A3 65 .." unfixed-info.bin
$ # get help for a subcommand
$ amiibo uid --help
$ # update the UID on an existing dump
$ amiibo uid old.bin "04 FF FF FF FF FF FF" new.bin
The master keys must be in the current directory for some commands to work!
It’s also very easy to use in a script or interpreter session:
from amiibo import AmiiboDump, AmiiboMasterKey
with open('unfixed-info.bin', 'rb') as fp_d, \
open('locked-secret.bin', 'rb') as fp_t:
master_keys = AmiiboMasterKey.from_separate_bin(
fp_d.read(), fp_t.read())
with open('dump.bin', 'rb') as fp:
dump = AmiiboDump(master_keys, fp.read())
print('old', dump.uid_hex)
dump.unlock()
dump.uid_hex = '04 FF FF FF FF FF FF'
dump.lock()
dump.unset_lock_bytes()
print('new', dump.uid_hex)
with open('new.bin', 'wb') as fp:
fp.write(dump.data)
Development
Use pipenv to install the development dependencies, and make sure flake8 and pylint pass before a PR is submitted.
pipenv install --three --dev
pipenv shell
isort -y
flake8 amiibo/
pylint amiibo/
sphinx-build -b html docs/ docs/_build
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 pyamiibo-0.2.tar.gz
.
File metadata
- Download URL: pyamiibo-0.2.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63b0c26dd4a6805b3e8655797be93f195d13fe611548eb21111fec4890345542 |
|
MD5 | a8914c01a73dff081b46f3522da6d329 |
|
BLAKE2b-256 | 98e18c607119025439816e0b778db8132da850ac6470b9dbb6ac9258d397c7d8 |
File details
Details for the file pyamiibo-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pyamiibo-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5482eaeb653c6c7677f64e2b44f3d9a0a4b4f9d36dd0fb4b8b02839716ebf03 |
|
MD5 | 0ffa7cab0a4c18820e47246338271446 |
|
BLAKE2b-256 | e171bfe582bf46b7bec226309d11f8d7c0e274ab54892e860f2780f7676dd326 |