- // Interactive mode flag, means we need to send ACK
- if(flags & FLAG_INTERACTIVE) {
- //May just aswell send the collected ar_nr in the response aswell
- uint8_t len = ar_nr_collected*5*4;
- cmd_send(CMD_ACK, CMD_SIMULATE_MIFARE_CARD, len, 0, &ar_nr_responses, len);
- }
-
- if(flags & 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/mfkey32 %08x %08x %08x %08x %08x %08x",
- ar_nr_responses[0], // CUID
- ar_nr_responses[1], // NT
- ar_nr_responses[2], // AR1
- ar_nr_responses[3], // NR1
- ar_nr_responses[4], // AR2
- ar_nr_responses[5] // NR2
- );
- } else {
- Dbprintf("Failed to obtain two AR/NR pairs!");
- if(ar_nr_collected > 0 ) {
- Dbprintf("Only got these: UID=%08x, nonce=%08x, AR1=%08x, NR1=%08x",
- ar_nr_responses[0], // CUID
- ar_nr_responses[1], // NT
- ar_nr_responses[2], // AR1
- ar_nr_responses[3] // NR1
- );
- }
- }
- }
- if (MF_DBGLEVEL >= 1) Dbprintf("Emulator stopped. Tracing: %d trace length: %d ", tracing, BigBuf_get_traceLen());