From 28ee794f59aac1fac7aa18bfbaa4050d48a90260 Mon Sep 17 00:00:00 2001 From: Oleg Moiseenko Date: Sat, 10 Feb 2018 20:41:56 +0200 Subject: [PATCH] fix appearance --- client/cmdhf.c | 6 ++++-- client/cmdhflist.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/cmdhf.c b/client/cmdhf.c index 9f3ff4e4..00b1aa8d 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -434,10 +434,12 @@ uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trace, ui } if (DecodeMifareData(frame, data_len, isResponse, mfData, &mfDataLen)) { - PrintAndLog(" | | |%-64s | %s| %s", + annotateIso14443a(explanation, sizeof(explanation), mfData, mfDataLen); + + PrintAndLog(" | * | dec |%-64s | %-4s| %s", sprint_hex(mfData, mfDataLen), "", - (false) ? explanation : ""); + (true) ? explanation : ""); }; if (is_last_record(tracepos, trace, traceLen)) return traceLen; diff --git a/client/cmdhflist.c b/client/cmdhflist.c index 0eaafa68..3dd03970 100644 --- a/client/cmdhflist.c +++ b/client/cmdhflist.c @@ -268,15 +268,15 @@ bool DecodeMifareData(uint8_t *cmd, uint8_t cmdsize, bool isResponse, uint8_t *m crypto1_get_lfsr(revstate, &lfsr); crypto1_destroy(revstate); // LastKey = lfsr; - printf("uid:%x nt:%x ar_enc:%x at_enc:%x\n", AuthData.uid, AuthData.nt, AuthData.ar_enc, AuthData.at_enc); - printf("AUTH: probable key:%x%x Prng:%s ks2:%08x ks3:%08x\n", + PrintAndLog(" | * | key | probable key:%x%x Prng:%s ks2:%08x ks3:%08x | |", (unsigned int)((lfsr & 0xFFFFFFFF00000000) >> 32), (unsigned int)(lfsr & 0xFFFFFFFF), - validate_prng_nonce(AuthData.nt) ? "WEAK": "HARDEND", + validate_prng_nonce(AuthData.nt) ? "WEAK": "HARD", ks2, ks3); AuthData.first_auth = false; } else { + printf("uid:%x nt:%x ar_enc:%x at_enc:%x\n", AuthData.uid, AuthData.nt, AuthData.ar_enc, AuthData.at_enc); } -- 2.39.5