From 856d6e52236e6fc65a6f35ce2a1f80662013e9d5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 10 Nov 2026 10:50:23 +0700 Subject: [PATCH] hf mfu info: identify transit tickets The fingerprint read now covers at least pages 0..15, two more page reads inside the same READCARD exchange and no extra round trip. That is all the Troika Ultralight, TRT and Ventra parsers use, so a match is decoded in full right there. Their detection is a layout check, so the line says "Possible". Hints `hf mfu dump`. Co-Authored-By: Claude Opus 5.5 --- client/src/cmdhfmfu.c | 9 +++++++++ client/src/parsers/parsetransit.h | 1 + 2 files changed, 10 insertions(+) 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);