mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
style
This commit is contained in:
parent
0f35e89f4e
commit
043ff257c4
2 changed files with 39 additions and 3 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
|
- Fixed viewing MFC dump - border char is now white (@iceman1001)
|
||||||
- Changed `data diff` - to print filenames in header if it fits (@iceman1001)
|
- Changed `data diff` - to print filenames in header if it fits (@iceman1001)
|
||||||
- Changed viewing MFC dump files - it now colors ACL + GPB bytes (@iceman1001)
|
- Changed viewing MFC dump files - it now colors ACL + GPB bytes (@iceman1001)
|
||||||
- Added `hf mf supercard --furui` - now supports key recovery from Furui detection card. Thanks foxushka! (@iceman1001)
|
- Added `hf mf supercard --furui` - now supports key recovery from Furui detection card. Thanks foxushka! (@iceman1001)
|
||||||
|
|
|
@ -226,10 +226,37 @@ bool mfc_value(const uint8_t *d, int32_t *val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mf_print_block_one(uint8_t blockno, uint8_t *d, bool verbose) {
|
void mf_print_block_one(uint8_t blockno, uint8_t *d, bool verbose) {
|
||||||
|
|
||||||
if (blockno == 0) {
|
if (blockno == 0) {
|
||||||
PrintAndLogEx(INFO, "%3d | " _RED_("%s"), blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
char ascii[24] = {0};
|
||||||
|
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
||||||
|
PrintAndLogEx(INFO, "%3d | " _RED_("%s") "| " _RED_("%s"),
|
||||||
|
blockno,
|
||||||
|
sprint_hex(d, MFBLOCK_SIZE),
|
||||||
|
ascii
|
||||||
|
);
|
||||||
} else if (mfIsSectorTrailer(blockno)) {
|
} else if (mfIsSectorTrailer(blockno)) {
|
||||||
PrintAndLogEx(INFO, "%3d | " _YELLOW_("%s"), blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
|
||||||
|
char keya[26] = {0};
|
||||||
|
hex_to_buffer((uint8_t *)keya, d, MIFARE_KEY_SIZE, sizeof(keya) - 1, 0, 1, true);
|
||||||
|
|
||||||
|
char acl[20] = {0};
|
||||||
|
hex_to_buffer((uint8_t *)acl, d + MIFARE_KEY_SIZE, 4, sizeof(acl) - 1, 0, 1, true);
|
||||||
|
|
||||||
|
char keyb[26] = {0};
|
||||||
|
hex_to_buffer((uint8_t *)keyb, d + 10, MIFARE_KEY_SIZE, sizeof(keyb) - 1, 0, 1, true);
|
||||||
|
|
||||||
|
char ascii[24] = {0};
|
||||||
|
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO, "%3d | " _YELLOW_("%s") _MAGENTA_("%s") _YELLOW_("%s") "| " _YELLOW_("%s"),
|
||||||
|
blockno,
|
||||||
|
keya,
|
||||||
|
acl,
|
||||||
|
keyb,
|
||||||
|
ascii
|
||||||
|
);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
if (verbose && mfc_value(d, &value)) {
|
if (verbose && mfc_value(d, &value)) {
|
||||||
|
@ -249,7 +276,15 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blockno == 0) {
|
if (blockno == 0) {
|
||||||
PrintAndLogEx(INFO, "%s| %3d | " _RED_("%s"), secstr, blockno, sprint_hex_ascii(d, MFBLOCK_SIZE));
|
char ascii[24] = {0};
|
||||||
|
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
|
||||||
|
PrintAndLogEx(INFO, "%s| %3d | " _RED_("%s") "| " _RED_("%s"),
|
||||||
|
secstr,
|
||||||
|
blockno,
|
||||||
|
sprint_hex(d, MFBLOCK_SIZE),
|
||||||
|
ascii
|
||||||
|
);
|
||||||
|
|
||||||
} else if (mfIsSectorTrailer(blockno)) {
|
} else if (mfIsSectorTrailer(blockno)) {
|
||||||
|
|
||||||
char keya[26] = {0};
|
char keya[26] = {0};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue