RfidResearchGroup / ChameleonUltra

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.
https://chameleonultra.com
GNU General Public License v3.0
783 stars 137 forks source link

Add CLI view commands to display memory content #208

Closed simonemarfo closed 2 months ago

simonemarfo commented 4 months ago

Thanks to @taichunmin and @rickNmorty2 for the implementation and the enhancement of fchk and dump commands.

Display memory function (xxd like)

Add print_mem_dump(bindata, blocksize) in chameleon_util.py to display memory content

Display chameleon MIFARE Classic emulation memory

Add hf mf eview to display emulation memory content

[USB] chameleon --> hf mf eview -s 1
[=] ----+-------------------------------------------------+-----------------
[=] blk | data                                            | ascii
[=] ----+-------------------------------------------------+-----------------
[=]   1 | C7 CF 0C 03 07 08 04 00 62 63 64 65 66 67 68 69 | ........bcdefghi 
[=]   2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   4 | 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF | .........i...... 
[=]   5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................

Display content from MIFARE Classic tag or dump file

Add hf mf view command to display content from:

[USB] chameleon --> hf mf view -d dump.bin
Reading dump file
[=] ----+-------------------------------------------------+-----------------
[=] blk | data                                            | ascii
[=] ----+-------------------------------------------------+-----------------
[=]   1 | C7 CF 0C 03 07 08 04 00 62 63 64 65 66 67 68 69 | ........bcdefghi 
[=]   2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   4 | 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF | .........i...... 
[=]   5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
[USB] chameleon --> hf mf view --1k -k recovered_keys
Reading tag memory
[=] ----+-------------------------------------------------+-----------------
[=] blk | data                                            | ascii
[=] ----+-------------------------------------------------+-----------------
[=]   1 | C7 CF 0C 03 07 08 04 00 62 63 64 65 66 67 68 69 | ........bcdefghi 
[=]   2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 
[=]   4 | 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF | .........i...... 
[=]   5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
github-actions[bot] commented 4 months ago

You are welcome to add an entry to the CHANGELOG.md as well

github-actions[bot] commented 4 months ago

Built artifacts for commit c1dd088e6a79864ec40419288bdc5f096e39dafe

Firmware

Client

xianglin1998 commented 2 months ago

Perfect!!!