]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfindala.c
added cipherstream recovery
[proxmark3-svn] / client / cmdlfindala.c
index 8ec04cbb7ef4e4bc1ab88754b70373390a9774fd..0a4f783492b8fd8bdf90a0a8743b7ab3780f454f 100644 (file)
@@ -40,10 +40,16 @@ int CmdIndalaDecode(const char *Cmd) {
        }
        uint8_t invert=0;
        size_t size = DemodBufferLen;
        }
        uint8_t invert=0;
        size_t size = DemodBufferLen;
-       int startIdx = indala26decode(DemodBuffer, &size, &invert);
-       if (startIdx < 0 || size > 224) {
-               if (g_debugMode) PrintAndLog("Error2: %i",startIdx);
-               return -1;
+       int startIdx = indala64decode(DemodBuffer, &size, &invert);
+       if (startIdx < 0 || size != 64) {
+               // try 224 indala
+               invert = 0;
+               size = DemodBufferLen;
+               startIdx = indala224decode(DemodBuffer, &size, &invert);
+               if (startIdx < 0 || size != 224) {
+                       if (g_debugMode) PrintAndLog("Error2: %i",startIdx);
+                       return -1;
+               }
        }
        setDemodBuf(DemodBuffer, size, (size_t)startIdx);
        setClockGrid(g_DemodClock, g_DemodStartIdx + (startIdx*g_DemodClock));
        }
        setDemodBuf(DemodBuffer, size, (size_t)startIdx);
        setClockGrid(g_DemodClock, g_DemodStartIdx + (startIdx*g_DemodClock));
Impressum, Datenschutz