2 # python3 -m pip install pyamiibo
5 from amiibo
import AmiiboDump
, AmiiboMasterKey
8 if(len(sys
.argv
) != 5):
10 \t{0} - helper script for integrating with PyAmiibo
12 Usage: {0} <uid> <infile> <outfile> <keyfile>
16 \t{0} 04123456789ABC my_amiibo_original.bin my_amiibo_with_new_uid.bin keyfile.bin
18 \n""".format(sys
.argv
[0]))
27 print('expecting 7 byte UID')
30 with
open(keyfile
, 'rb') as keybin
:
31 master_key
= AmiiboMasterKey
.from_combined_bin(keybin
.read())
33 with
open(infile
, 'rb') as fin
, open(outfile
, 'wb') as fout
:
34 dump
= AmiiboDump(master_key
, fin
.read(), is_locked
=True)
42 if __name__
== "__main__":