This commit is contained in:
iceman1001 2023-06-25 22:30:58 +02:00
commit f64f538519
4 changed files with 30 additions and 31 deletions

View file

@ -3089,7 +3089,7 @@ static int CmdDiff(const char *Cmd) {
if (fnlenA && fnlenB && (max_fn_space > fnlenA) && (max_fn_space > fnlenB)) { if (fnlenA && fnlenB && (max_fn_space > fnlenA) && (max_fn_space > fnlenB)) {
snprintf(hdr0, sizeof(hdr0) - 1, " # | " _CYAN_("%.*s"), max_fn_space, filenameA); snprintf(hdr0, sizeof(hdr0) - 1, " # | " _CYAN_("%.*s"), max_fn_space, filenameA);
memset(hdr0 + strlen(hdr0), ' ', hdr_sln - strlen(filenameA) - 1 ); memset(hdr0 + strlen(hdr0), ' ', hdr_sln - strlen(filenameA) - 1);
snprintf(hdr0 + strlen(hdr0), sizeof(hdr0) - 1 - strlen(hdr0), "| " _CYAN_("%.*s"), max_fn_space, filenameB); snprintf(hdr0 + strlen(hdr0), sizeof(hdr0) - 1 - strlen(hdr0), "| " _CYAN_("%.*s"), max_fn_space, filenameB);
} else { } else {
strcat(hdr0, " # | " _CYAN_("a")); strcat(hdr0, " # | " _CYAN_("a"));

View file

@ -231,10 +231,10 @@ void mf_print_block_one(uint8_t blockno, uint8_t *d, bool verbose) {
char ascii[24] = {0}; char ascii[24] = {0};
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1); ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
PrintAndLogEx(INFO, "%3d | " _RED_("%s") "| " _RED_("%s"), PrintAndLogEx(INFO, "%3d | " _RED_("%s") "| " _RED_("%s"),
blockno, blockno,
sprint_hex(d, MFBLOCK_SIZE), sprint_hex(d, MFBLOCK_SIZE),
ascii ascii
); );
} else if (mfIsSectorTrailer(blockno)) { } else if (mfIsSectorTrailer(blockno)) {
char keya[26] = {0}; char keya[26] = {0};
@ -250,13 +250,13 @@ void mf_print_block_one(uint8_t blockno, uint8_t *d, bool verbose) {
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1); ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
PrintAndLogEx(INFO, "%3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"), PrintAndLogEx(INFO, "%3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"),
blockno, blockno,
keya, keya,
acl, acl,
d[9], d[9],
keyb, keyb,
ascii ascii
); );
} else { } else {
int32_t value = 0; int32_t value = 0;
@ -280,11 +280,11 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
char ascii[24] = {0}; char ascii[24] = {0};
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1); ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
PrintAndLogEx(INFO, "%s| %3d | " _RED_("%s") "| " _RED_("%s"), PrintAndLogEx(INFO, "%s| %3d | " _RED_("%s") "| " _RED_("%s"),
secstr, secstr,
blockno, blockno,
sprint_hex(d, MFBLOCK_SIZE), sprint_hex(d, MFBLOCK_SIZE),
ascii ascii
); );
} else if (mfIsSectorTrailer(blockno)) { } else if (mfIsSectorTrailer(blockno)) {
@ -301,14 +301,14 @@ static void mf_print_block(uint8_t blockno, uint8_t *d, bool verbose) {
ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1); ascii_to_buffer((uint8_t *)ascii, d, MFBLOCK_SIZE, sizeof(ascii) - 1, 1);
PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"), PrintAndLogEx(INFO, "%s| %3d | " _YELLOW_("%s") _MAGENTA_("%s") "%02X " _YELLOW_("%s") "| " _YELLOW_("%s"),
secstr, secstr,
blockno, blockno,
keya, keya,
acl, acl,
d[9], d[9],
keyb, keyb,
ascii ascii
); );
} else { } else {
int32_t value = 0; int32_t value = 0;
if (verbose && mfc_value(d, &value)) { if (verbose && mfc_value(d, &value)) {

View file

@ -332,8 +332,7 @@
"data diff -a fileA -b fileB", "data diff -a fileA -b fileB",
"data diff -a fileA --eb", "data diff -a fileA --eb",
"data diff --fa fileA -b fileB", "data diff --fa fileA -b fileB",
"data diff --fa fileA --fb fileB", "data diff --fa fileA --fb fileB"
"data diff --ea --cb"
], ],
"offline": true, "offline": true,
"options": [ "options": [
@ -12095,6 +12094,6 @@
"metadata": { "metadata": {
"commands_extracted": 759, "commands_extracted": 759,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2023-06-24T15:16:04" "extracted_on": "2023-06-25T20:30:44"
} }
} }