The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.
As someone wanted to use the --dict in CLI and got an error, the source shows the functions load_key_file and load_dict_file are not defined.
After some tests, I believe the functionality does not need to be an own function, it is easier to read and understand in one block while parsing the keys.
The if ... elif ... else construct is not very elegant, but works better for the different types of comparing as a match ... case. It is good to extend, if a .dic file (or single keys from a file) needs to be converted.
As someone wanted to use the --dict in CLI and got an error, the source shows the functions
load_key_file
andload_dict_file
are not defined. After some tests, I believe the functionality does not need to be an own function, it is easier to read and understand in one block while parsing the keys.The
if ... elif ... else
construct is not very elegant, but works better for the different types of comparing as amatch ... case
. It is good to extend, if a .dic file (or single keys from a file) needs to be converted.