From 1368595be11f8f035ea331b56457c4646b1251e3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 26 Aug 2019 20:37:33 +0200 Subject: [PATCH] hf mf nested: swap loops for faster results (try harder to break keyA first) --- client/cmdhfmf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a1fe25457..d3199c429 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1243,9 +1243,9 @@ static int CmdHF14AMfNested(const char *Cmd) { // int iterations = 0; bool calibrate = true; - for (int i = 0; i < MIFARE_SECTOR_RETRY; i++) { + for (trgKeyType = 0; trgKeyType < 2; ++trgKeyType) { for (uint8_t sectorNo = 0; sectorNo < SectorsCnt; ++sectorNo) { - for (trgKeyType = 0; trgKeyType < 2; ++trgKeyType) { + for (int i = 0; i < MIFARE_SECTOR_RETRY; i++) { if (e_sector[sectorNo].foundKey[trgKeyType]) continue;