]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
tweaked sim command, added mfkey32
authorroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 7 Mar 2013 12:22:12 +0000 (12:22 +0000)
committerroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Thu, 7 Mar 2013 12:22:12 +0000 (12:22 +0000)
armsrc/iso14443a.c
tools/mfkey/Makefile
tools/mfkey/example_trace.txt

index 7c1db14ba842a3067f808fd09a0fffa71898d455..8e07814023e057799c65662ab699059927976d37 100644 (file)
@@ -1133,7 +1133,7 @@ void SimulateIso14443aTag(int tagType, int uid_1st, int uid_2nd)
                        respdata = &nack;
                        respsize = sizeof(nack); // 4-bit answer
                } else if(receivedCmd[0] == 0x50) {     // Received a HALT
                        respdata = &nack;
                        respsize = sizeof(nack); // 4-bit answer
                } else if(receivedCmd[0] == 0x50) {     // Received a HALT
-                       DbpString("Reader requested we HALT!:");
+//                     DbpString("Reader requested we HALT!:");
                        // Do not respond
                        resp = resp1; respLen = 0; order = 0;
                        respdata = NULL;
                        // Do not respond
                        resp = resp1; respLen = 0; order = 0;
                        respdata = NULL;
@@ -1147,16 +1147,19 @@ void SimulateIso14443aTag(int tagType, int uid_1st, int uid_2nd)
                        respdata = response6;
                        respsize = sizeof(response6);
                } else {
                        respdata = response6;
                        respsize = sizeof(response6);
                } else {
-                       // Never seen this command before
-                       Dbprintf("Received (len=%d): %02x %02x %02x %02x %02x %02x %02x %02x %02x",
-                       len,
-                       receivedCmd[0], receivedCmd[1], receivedCmd[2],
-                       receivedCmd[3], receivedCmd[4], receivedCmd[5],
-                       receivedCmd[6], receivedCmd[7], receivedCmd[8]);
-                       // Do not respond
-                       resp = resp1; respLen = 0; order = 0;
-                       respdata = NULL;
-                       respsize = 0;
+      if (order == 7 && len ==8) {
+        uint32_t nr = bytes_to_num(receivedCmd,4);
+        uint32_t ar = bytes_to_num(receivedCmd+4,4);
+        Dbprintf("Auth attempt {nr}{ar}: %08x %08x",nr,ar);
+      } else {
+        // Never seen this command before
+        Dbprintf("Received unknown command (len=%d):",len);
+        Dbhexdump(len,receivedCmd,false);
+      }
+      // Do not respond
+      resp = resp1; respLen = 0; order = 0;
+      respdata = NULL;
+      respsize = 0;
                }
 
                // Count number of wakeups received after a halt
                }
 
                // Count number of wakeups received after a halt
index c01d64b91fd937fa6e4ab00aa17d71628e036d8c..f4f7eb82c02d496e0039d79e8d18a7a17ee8d59b 100755 (executable)
@@ -5,7 +5,7 @@ LDFLAGS =
 
 OBJS = crapto1.o crypto1.o
 HEADERS = 
 
 OBJS = crapto1.o crypto1.o
 HEADERS = 
-EXES = mfkey
+EXES = mfkey64 mfkey32
 LIBS =
        
 all: $(OBJS) $(EXES) $(LIBS)
 LIBS =
        
 all: $(OBJS) $(EXES) $(LIBS)
index 16637fb5dcf17ba3703f4303017cca5b3027446b..f2587fcd8805fd5a293024b09713db76f88f3c55 100644 (file)
@@ -11,5 +11,5 @@
  +   1287:    :     a1  e4  58  ce  6e  ea  41  e0
  +     64:   0: TAG 5c  ad  f4  39
 
  +   1287:    :     a1  e4  58  ce  6e  ea  41  e0
  +     64:   0: TAG 5c  ad  f4  39
 
-./mfkey 9c599b32 82a4166c a1e458ce 6eea41e0 5cadf439
+./mfkey64 9c599b32 82a4166c a1e458ce 6eea41e0 5cadf439
 
 
Impressum, Datenschutz