From 4ef59c37717de3ce6671e564e372ce3e7dd48bcc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 18 Dec 2018 18:43:27 +0100 Subject: [PATCH] CHG: uniform output. --- client/emv/emvcore.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/emv/emvcore.c b/client/emv/emvcore.c index 1b4808410..058aefe50 100644 --- a/client/emv/emvcore.c +++ b/client/emv/emvcore.c @@ -249,7 +249,7 @@ int EMVExchangeEx(EMVCommandChannel channel, bool ActivateField, bool LeaveField memcpy(&data[5], apdu.data, apdu.Lc); if (APDULogging) - PrintAndLogEx(NORMAL, ">>>> %s", sprint_hex(data, (IncludeLe?6:5) + apdu.Lc)); + PrintAndLogEx(SUCCESS, ">>>> %s", sprint_hex(data, (IncludeLe?6:5) + apdu.Lc)); switch(channel) { case ECC_CONTACTLESS: @@ -269,7 +269,7 @@ int EMVExchangeEx(EMVCommandChannel channel, bool ActivateField, bool LeaveField } if (APDULogging) - PrintAndLogEx(NORMAL, "<<<< %s", sprint_hex(Result, *ResultLen)); + PrintAndLogEx(SUCCESS, "<<<< %s", sprint_hex(Result, *ResultLen)); if (*ResultLen < 2) { return 200; @@ -422,7 +422,7 @@ int EMVSearch(EMVCommandChannel channel, bool ActivateField, bool LeaveFieldON, } retrycnt = 0; - PrintAndLogEx(FAILED, "Retry failed [%s]. Skiped...", AIDlist[i].aid); + PrintAndLogEx(FAILED, "Retry failed [%s]. Skipped...", AIDlist[i].aid); } continue; } @@ -431,8 +431,11 @@ int EMVSearch(EMVCommandChannel channel, bool ActivateField, bool LeaveFieldON, if (res) continue; - if (decodeTLV){ - PrintAndLogEx(NORMAL, "%s:", AIDlist[i].aid); + if (!datalen) + continue; + + if (decodeTLV) { + PrintAndLogEx(SUCCESS, "%s", AIDlist[i].aid); TLVPrintFromBuffer(data, datalen); } }