]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
ADD: Added the possibility to exit the bruteforce mode (either rangesearch or file...
authoriceman1001 <iceman@iuse.se>
Tue, 1 Dec 2015 21:47:03 +0000 (22:47 +0100)
committericeman1001 <iceman@iuse.se>
Tue, 1 Dec 2015 21:47:03 +0000 (22:47 +0100)
FIX:  if not found, the range search printed wrong number.

client/cmdhfmf.c
client/cmdlft55xx.c

index 5b5be6f2066f2d7a6c5d12286b5a5bcf3c39e14d..0a24f6da33c72a1e8036c4baa662144624147dd0 100644 (file)
@@ -61,7 +61,7 @@ start:
                                case -2 : PrintAndLog("Card is not vulnerable to Darkside attack (doesn't send NACK on authentication requests).\n"); break;\r
                                case -3 : PrintAndLog("Card is not vulnerable to Darkside attack (its random number generator is not predictable).\n"); break;\r
                                case -4 : PrintAndLog("Card is not vulnerable to Darkside attack (its random number generator seems to be based on the wellknown");\r
-                                                       PrintAndLog("generating polynomial with 16 effective bits only, but shows unexpected behaviour.\n"); break;\r
+                                                 PrintAndLog("generating polynomial with 16 effective bits only, but shows unexpected behaviour.\n"); break;\r
                                default: ;\r
                        }\r
                        break;\r
index 6e8893d5f345626fef4e81c7e6746e24026b2b3d..92e6f745a213a085a71d3f5a726310d9f7d3ac42 100644 (file)
@@ -1394,6 +1394,12 @@ int CmdT55xxBruteForce(const char *Cmd) {
                uint64_t testpwd = 0x00;\r
                for (uint16_t c = 0; c < keycnt; ++c ) {\r
        \r
+                       if (ukbhit()) {\r
+                               getchar();\r
+                               printf("\naborted via keyboard!\n");\r
+                               return 0;\r
+                       }\r
+               \r
                        testpwd = bytes_to_num(keyBlock + 4*c, 4);\r
 \r
                        PrintAndLog("Testing %08X", testpwd);\r
@@ -1423,23 +1429,27 @@ int CmdT55xxBruteForce(const char *Cmd) {
        \r
        if ( start_password >= end_password ) return usage_t55xx_bruteforce();\r
        \r
-    PrintAndLog("Search password  range [%08X -> %08X]", start_password, end_password);\r
+    PrintAndLog("Search password range [%08X -> %08X]", start_password, end_password);\r
        \r
     uint32_t i = start_password;\r
 \r
     while ((!found) && (i <= end_password)){\r
 \r
+               printf(".");\r
+               fflush(stdout);\r
+               if (ukbhit()) {\r
+                       getchar();\r
+                       printf("\naborted via keyboard!\n");\r
+                       return 0;\r
+               }\r
+                       \r
                if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, TRUE, i)) {\r
                        PrintAndLog("Aquireing data from device failed. Quitting");\r
                        return 0;\r
                }\r
                found = tryDetectModulation();\r
         \r
-               if (found)\r
-                       break;\r
-        \r
-        if ((i % 0x100) == 0) printf("[%08x], ",i);\r
-\r
+               if (found) break;\r
                i++;\r
     }\r
     \r
@@ -1448,7 +1458,7 @@ int CmdT55xxBruteForce(const char *Cmd) {
     if (found)\r
                PrintAndLog("Found valid password: [%08x]", i);\r
     else\r
-               PrintAndLog("Password NOT found. Last tried: [%08x]", i);\r
+               PrintAndLog("Password NOT found. Last tried: [%08x]", --i);\r
     return 0;\r
 }\r
 \r
Impressum, Datenschutz