From 5aa74846d0764836832f46e4c5d05e91c4635566 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 10 Nov 2026 10:50:50 +0700 Subject: [PATCH] hf felica info: identify transit cards Names Japan IC (system 0003), Octopus (8008) and Shenzhen Tong (8005) from the system codes info already discovers, no extra card exchange. Hints `hf felica dump`, which reads the public services and decodes balance and history. `hf felica reader` only polls for the IDm and is left alone. Co-Authored-By: Claude Opus 5.5 --- client/src/cmdhffelica.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index f064f8e1b..38ed8cd75 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -3209,6 +3209,18 @@ static int info_felica(bool verbose, bool no_ic_optimizations) { for (size_t i = 0; i < discovered_systems.count; i++) { felica_info_process_system(INFO, optional_flags, &discovered_systems.systems[i], &auth_keys, &caps, verbose); } + + uint16_t codes[FELICA_DISCOVERED_SYSTEM_MAX_COUNT]; + size_t ncodes = 0; + for (size_t i = 0; i < discovered_systems.count && ncodes < ARRAYLEN(codes); i++) { + codes[ncodes++] = discovered_systems.systems[i].system_code; + } + transit_idents_t transit_ids; + if (transit_felica_identify(codes, ncodes, &transit_ids) > 0) { + PrintAndLogEx(NORMAL, ""); + transit_print_idents(&transit_ids); + transit_print_ident_hints(&transit_ids, NULL); + } } felica_auth_key_store_free(&auth_keys);