- // Interactive mode flag, means we need to send ACK
- if((flags & FLAG_INTERACTIVE) == FLAG_INTERACTIVE) {
- //May just aswell send the collected ar_nr in the response aswell
- uint8_t len = ar_nr_collected * 4 * 4;
- cmd_send(CMD_ACK, CMD_SIMULATE_MIFARE_CARD, len, 0, &ar_nr_responses, len);
- }
-
- if( ((flags & FLAG_NR_AR_ATTACK) == FLAG_NR_AR_ATTACK ) && MF_DBGLEVEL >= 1 ) {
- if(ar_nr_collected > 1 ) {
- Dbprintf("Collected two pairs of AR/NR which can be used to extract keys from reader:");
- Dbprintf("../tools/mfkey/mfkey32v2.exe %08x %08x %08x %08x %08x %08x %08x",
- ar_nr_responses[0], // CUID
- ar_nr_responses[1], // NT1
- ar_nr_responses[2], // NR1
- ar_nr_responses[3], // AR1
- //ar_nr_responses[4], // CUID2
- ar_nr_responses[5], // NT2
- ar_nr_responses[6], // NR2
- ar_nr_responses[7] // AR2
- );
- } else {
- Dbprintf("Failed to obtain two AR/NR pairs!");
- if(ar_nr_collected == 1 ) {
- Dbprintf("Only got these: UID=%08x, nonce=%08x, NR1=%08x, AR1=%08x",
- ar_nr_responses[0], // CUID
- ar_nr_responses[1], // NT
- ar_nr_responses[2], // NR1
- ar_nr_responses[3] // AR1
- );
- }
- }
- }
- if (MF_DBGLEVEL >= 1) Dbprintf("Emulator stopped. Tracing: %d trace length: %d ", tracing, BigBuf_get_traceLen());