diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 38221f765..0fa29c5ad 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -2231,6 +2231,7 @@ static int mfu_fingerprint(uint64_t tagtype, bool has_auth_key, const uint8_t *a } maxbytes = ((maxbytes / MFU_BLOCK_SIZE) + 1) * MFU_BLOCK_SIZE; + maxbytes = MAX(maxbytes, TRANSIT_MFU_IDENTIFY_LEN); data = calloc(maxbytes, sizeof(uint8_t)); if (data == NULL) { PrintAndLogEx(WARNING, "Failed to allocate memory"); @@ -2337,6 +2338,14 @@ static int mfu_fingerprint(uint64_t tagtype, bool has_auth_key, const uint8_t *a } } + transit_idents_t transit_ids; + if (transit_mfu_identify(data, buffer_size, &transit_ids) > 0) { + transit_print_idents(&transit_ids); + (void)transit_mfu_parse(data, buffer_size); + transit_print_ident_hints(&transit_ids, NULL); + res = PM3_SUCCESS; + } + out: if (res != PM3_SUCCESS) { diff --git a/client/src/parsers/parsetransit.h b/client/src/parsers/parsetransit.h index 3c0165b9b..b078f377f 100644 --- a/client/src/parsers/parsetransit.h +++ b/client/src/parsers/parsetransit.h @@ -247,6 +247,7 @@ int transit_felica_identify(const uint16_t *system_codes, size_t count, transit_ bool transit_felica_check_identify(const char *what, uint16_t system_code, const char *name, transit_id_t want); // Ultralight, ST25TB and Calypso info commands read the same data a dump has +#define TRANSIT_MFU_IDENTIFY_LEN 64 // pages 0..15 cover every Ultralight parser int transit_mfu_identify(const uint8_t *data, size_t datalen, transit_idents_t *ids); int transit_st25tb_identify(const uint8_t *data, size_t datalen, const uint8_t *uid, transit_idents_t *ids); int transit_calypso_identify(const transit_calypso_card_t *card, transit_idents_t *ids);