]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
Adds random nonce (r) option to `hf mf sim`.
[proxmark3-svn] / client / cmdhfmf.c
index 43eca8cb2cdd40ecad54f1d2faa88df9b2489f0f..2b14c763131cabba96e5ba5a03db3b35df6e1013 100644 (file)
@@ -1079,14 +1079,15 @@ void readerAttack(nonces_t ar_resp[], bool setEmulatorMem) {
                        }\r
                }\r
        }\r
-       //moebius attack\r
+       /*\r
+       //un-comment to use as well moebius attack\r
        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 %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
+       }*/\r
 }\r
 \r
 int usage_hf14_mf1ksim(void) {\r
@@ -1099,6 +1100,7 @@ int usage_hf14_mf1ksim(void) {
        PrintAndLog("      x    (Optional) Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)");\r
        PrintAndLog("      e    (Optional) set keys found from 'reader attack' to emulator memory (implies x and i)");\r
        PrintAndLog("      f    (Optional) get UIDs to use for 'reader attack' from file 'f <filename.txt>' (implies x and i)");\r
+       PrintAndLog("      r    (Optional) Generate random nonces instead of sequential nonces.");\r
        PrintAndLog("samples:");\r
        PrintAndLog("           hf mf sim u 0a0a0a0a");\r
        PrintAndLog("           hf mf sim u 11223344556677");\r
@@ -1163,6 +1165,11 @@ int CmdHF14AMf1kSim(const char *Cmd) {
                        exitAfterNReads = param_get8(Cmd, pnr+1);\r
                        cmdp += 2;\r
                        break;\r
+               case 'r':\r
+               case 'R':\r
+                       flags |= FLAG_RANDOM_NONCE;\r
+                       cmdp++;\r
+                       break;\r
                case 'u':\r
                case 'U':\r
                        param_gethex_ex(Cmd, cmdp+1, uid, &uidlen);\r
Impressum, Datenschutz