From c364a6821c4f7505fbb0d45c884addad473458ae Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 23 Jan 2023 03:32:38 +0100 Subject: [PATCH] hf tesla info - better textual output --- client/src/cmdhftesla.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/client/src/cmdhftesla.c b/client/src/cmdhftesla.c index 296323319..2680daa90 100644 --- a/client/src/cmdhftesla.c +++ b/client/src/cmdhftesla.c @@ -191,8 +191,6 @@ static int info_hf_tesla(void) { memcpy(auth, response, sizeof(auth)); } - PrintAndLogEx(INFO, "CHALL... %s", sprint_hex_inrow(auth, sizeof(auth))); - keep_field_on = false; DropField(); @@ -203,12 +201,23 @@ static int info_hf_tesla(void) { for (int i=0; i < 3; i++) { PrintAndLogEx(INFO, "%d - %s", i, sprint_hex_inrow(pk[i], 65)); } - PrintAndLogEx(INFO, "Form factor... %s", sprint_hex_inrow(form_factor, sizeof(form_factor))); - PrintAndLogEx(INFO, "Version....... %s", sprint_hex_inrow(version, sizeof(version))); - - if ((memcmp(pk[0], pk[1], 65) == 0)) { - PrintAndLogEx(INFO, "GaussKey detected"); + if (form_factor[1] == 1) { + PrintAndLogEx(INFO, "Form factor... %s (card)", sprint_hex_inrow(form_factor, sizeof(form_factor))); + } else if (form_factor[1] == 2){ + PrintAndLogEx(INFO, "Form factor... %s (phone app)", sprint_hex_inrow(form_factor, sizeof(form_factor))); } + + if (sizeof(version) > 0) { + PrintAndLogEx(INFO, "Version....... %s", sprint_hex_inrow(version, sizeof(version))); + } + + PrintAndLogEx(INFO, "CHALL......... %s", sprint_hex_inrow(auth, sizeof(auth))); + + PrintAndLogEx(INFO, "Fingerprint"); + if ((memcmp(pk[0], pk[1], 65) == 0)) { + PrintAndLogEx(INFO, " GaussKey detected"); + } + // return PM3_SUCCESS; }