From c72e74275db6dbd7c0d031a1438d2a61e79b5bae Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 8 May 2019 20:13:07 +0200 Subject: [PATCH] fast mode on epa pace replay --- client/cmdhfepa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/cmdhfepa.c b/client/cmdhfepa.c index f0d06cda4..e88e1679e 100644 --- a/client/cmdhfepa.c +++ b/client/cmdhfepa.c @@ -109,6 +109,8 @@ static int CmdHFEPAPACEReplay(const char *Cmd) { // transfer the APDUs to the Proxmark uint8_t data[PM3_CMD_DATA_SIZE]; + // fast push mode + conn.block_after_ACK = true; for (int i = 0; i < sizeof(apdu_lengths); i++) { // transfer the APDU in several parts if necessary for (int j = 0; j * sizeof(data) < apdu_lengths[i]; j++) { @@ -117,6 +119,10 @@ static int CmdHFEPAPACEReplay(const char *Cmd) { if (packet_length > sizeof(data)) { packet_length = sizeof(data); } + if ((i == sizeof(apdu_lengths)-1) && (j * sizeof(data) >= apdu_lengths[i] - 1)) { + // Disable fast mode on last packet + conn.block_after_ACK = false; + } memcpy(data, // + (j * sizeof(data)), apdus[i] + (j * sizeof(data)), packet_length);