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 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-10 11:05:59 +07:00
1 parent b109a22023
commit 856d6e5223
2 files changed
+10

No files matched your search

+9
View File
@@ -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) {
+1
View File
@@ -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);