From a575827c99ac61f7102ed9df4ef713fc889dff02 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 12 Oct 2020 21:40:47 +0200 Subject: [PATCH] add tearoff to hf 14a raw --- armsrc/iso14443a.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index ec5d11d00..19c16f656 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -2929,10 +2929,15 @@ void ReaderIso14443a(PacketCommandNG *c) { ReaderTransmit(cmd, len, NULL); // 8 bits, odd parity } } - arg0 = ReaderReceive(buf, par); - FpgaDisableTracing(); - reply_old(CMD_ACK, arg0, 0, 0, buf, sizeof(buf)); + if (tearoff_hook() == PM3_ETEAROFF) { // tearoff occured + FpgaDisableTracing(); + reply_old(CMD_ACK, 0, 0, 0, NULL, 0); + } else { + arg0 = ReaderReceive(buf, par); + FpgaDisableTracing(); + reply_old(CMD_ACK, arg0, 0, 0, buf, sizeof(buf)); + } } if ((param & ISO14A_REQUEST_TRIGGER))