]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
fix bug in moebius nonce collection - now finishes
[proxmark3-svn] / client / cmdhfmf.c
index 4b82e698b3bae89e74fdd00812cdea9a33824faf..c565a7cf222bac705e1cb21a1b4d7227b6eba719 100644 (file)
@@ -1072,6 +1072,7 @@ int CmdHF14AMf1kSim(const char *Cmd)
        cmdp = param_getchar(Cmd, pnr);\r
        if (cmdp == 'x' || cmdp == 'X') {\r
                flags |= FLAG_NR_AR_ATTACK;\r
+               pnr++;\r
        }\r
 \r
        cmdp = param_getchar(Cmd, pnr);\r
@@ -1119,7 +1120,7 @@ int CmdHF14AMf1kSim(const char *Cmd)
                                if (ar_resp[i].ar2 > 0) {\r
                                        //PrintAndLog("Trying sector %d, cuid %08x, nt %08x, ar %08x, nr %08x, ar2 %08x, nr2 %08x",ar_resp[i].sector, ar_resp[i].cuid,ar_resp[i].nonce,ar_resp[i].ar,ar_resp[i].nr,ar_resp[i].ar2,ar_resp[i].nr2);\r
                                        if (mfkey32(ar_resp[i], &key)) {\r
-                                               PrintAndLog("Found Key%s for sector %d: [%04x%08x]", (ar_resp[i].keytype) ? "B" : "A", ar_resp[i].sector, (uint32_t) (key>>32), (uint32_t) (key &0xFFFFFFFF));\r
+                                               PrintAndLog("Found Key%s for sector %02d: [%04x%08x]", (ar_resp[i].keytype) ? "B" : "A", ar_resp[i].sector, (uint32_t) (key>>32), (uint32_t) (key &0xFFFFFFFF));\r
 \r
                                                for (uint8_t ii = 0; ii<ATTACK_KEY_COUNT; ii++) {\r
                                                        if (key_cnt[ii]==0 || stSector[ii]==ar_resp[i].sector) {\r
@@ -1151,7 +1152,7 @@ int CmdHF14AMf1kSim(const char *Cmd)
                                                char cmd1[36];\r
                                                memset(cmd1,0x00,sizeof(cmd1));\r
                                                snprintf(cmd1,sizeof(cmd1),"%04x%08xFF078069%04x%08x",(uint32_t) (sector_trailer[i].keyA>>32), (uint32_t) (sector_trailer[i].keyA &0xFFFFFFFF),(uint32_t) (sector_trailer[i].keyB>>32), (uint32_t) (sector_trailer[i].keyB &0xFFFFFFFF));\r
-                                               //PrintAndLog("%s",cmd1);\r
+                                               PrintAndLog("Setting Emulator Memory Block %02d: [%s]",stSector[i]*4+3, cmd1);\r
                                                if (param_gethex(cmd1, 0, memBlock, 32)) {\r
                                                        PrintAndLog("block data must include 32 HEX symbols");\r
                                                        return 1;\r
@@ -1168,7 +1169,7 @@ int CmdHF14AMf1kSim(const char *Cmd)
                        for (uint8_t i = ATTACK_KEY_COUNT; i<ATTACK_KEY_COUNT*2; i++) {\r
                                if (ar_resp[i].ar2 > 0) {\r
                                        if (tryMfk32_moebius(ar_resp[i], &key)) {\r
-                                               PrintAndLog("M-Found Key%s for sector %d: [%04x%08x]", (ar_resp[i].keytype) ? "B" : "A", ar_resp[i].sector, (uint32_t) (key>>32), (uint32_t) (key &0xFFFFFFFF));\r
+                                               PrintAndLog("M-Found Key%s for sector %02d: [%04x%08x]", (ar_resp[i].keytype) ? "B" : "A", ar_resp[i].sector, (uint32_t) (key>>32), (uint32_t) (key &0xFFFFFFFF));\r
                                        }\r
                                }\r
                        }\r
Impressum, Datenschutz