]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlft55xx.c
ADD: @marshmello42 's fixes for low frequency demodulation lengths greater the 512bits.
[proxmark3-svn] / client / cmdlft55xx.c
index 6e8893d5f345626fef4e81c7e6746e24026b2b3d..b967936b46af49de2f5eb4123f3370f8796f0ca4 100644 (file)
@@ -152,13 +152,15 @@ int usage_t55xx_wakup(){
 int usage_t55xx_bruteforce(){\r
     PrintAndLog("Usage: lf t55xx bruteforce <start password> <end password> [i <*.dic>]");\r
     PrintAndLog("       password must be 4 bytes (8 hex symbols)");\r
+       PrintAndLog("This command uses A) bruteforce to scan a number range");\r
+       PrintAndLog("                  B) a dictionary attack");\r
        PrintAndLog("Options:");\r
        PrintAndLog("     h                     - this help");\r
     PrintAndLog("     i <*.dic>        - loads a default keys dictionary file <*.dic>");\r
     PrintAndLog("");\r
     PrintAndLog("Examples:");\r
     PrintAndLog("       lf t55xx bruteforce aaaaaaaa bbbbbbbb");\r
-       PrintAndLog("       lf t55xx bruteforce i mykeys.dic");\r
+       PrintAndLog("       lf t55xx bruteforce i default_pwd.dic");\r
     PrintAndLog("");\r
     return 0;\r
 }\r
@@ -1394,6 +1396,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 +1431,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 +1460,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