fast mode on epa pace replay

This commit is contained in:
Philippe Teuwen 2019-05-08 20:13:07 +02:00
parent e7362d5e6a
commit c72e74275d

View file

@ -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);