X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/84bdbc19174eaf54db337ef0470e35cf45dc8e9d..d56ee2b1db8ebf88a3ce1afa0e57a18ee10a0ea4:/armsrc/iso14443a.c diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 39604874..425352b9 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -918,7 +918,11 @@ void SimulateIso14443aTag(int tagType, int flags, byte_t* data) { memcpy(data+3, emdata+4, 4); // uid bytes 3-7 flags |= FLAG_7B_UID_IN_DATA; } - } break; + } break; + case 8: { // MIFARE Classic 4k + response1[0] = 0x02; + sak = 0x18; + } break; default: { Dbprintf("Error: unkown tagtype (%d)",tagType); return; @@ -1108,12 +1112,12 @@ void SimulateIso14443aTag(int tagType, int flags, byte_t* data) { p_response = NULL; } else if (receivedCmd[0] == MIFARE_ULEV1_READ_CNT && tagType == 7) { // Received a READ COUNTER -- uint8_t index = receivedCmd[1]; - uint8_t data[] = {0x00,0x00,0x00,0x14,0xa5}; + uint8_t cmd[] = {0x00,0x00,0x00,0x14,0xa5}; if ( counters[index] > 0) { - num_to_bytes(counters[index], 3, data); - AppendCrc14443a(data, sizeof(data)-2); + num_to_bytes(counters[index], 3, cmd); + AppendCrc14443a(cmd, sizeof(cmd)-2); } - EmSendCmdEx(data,sizeof(data),false); + EmSendCmdEx(cmd,sizeof(cmd),false); p_response = NULL; } else if (receivedCmd[0] == MIFARE_ULEV1_INCR_CNT && tagType == 7) { // Received a INC COUNTER -- // number of counter @@ -2043,7 +2047,6 @@ int iso14_apdu(uint8_t *cmd, uint16_t cmd_len, void *data) { { iso14_pcb_blocknum ^= 1; } - return len; }