]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Dump1k now writes keys to dumpdata.bin even when they are masked with zeroes in a...
authorcaioxmag <caioxmag@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 2 Sep 2011 08:33:45 +0000 (08:33 +0000)
committercaioxmag <caioxmag@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 2 Sep 2011 08:33:45 +0000 (08:33 +0000)
client/cmdhfmf.c

index 064aaaa5a80f5c0e65d35200fda522bd5ad623f6..9bfa055bcdd4d7781fb71fcd944f8def006827d6 100644 (file)
@@ -330,7 +330,6 @@ int CmdHF14AMfDump1k(const char *Cmd)
        \r
        for (i=0 ; i<16 ; i++) {\r
                for (j=0 ; j<4 ; j++) {\r
-                       \r
                        if (j == 3){\r
                                UsbCommand c = {CMD_MIFARE_READBL, {i*4 + j, 0, 0}};\r
                                memcpy(c.d.asBytes, keyA[i], 6);\r
@@ -358,6 +357,20 @@ int CmdHF14AMfDump1k(const char *Cmd)
                        if (resp != NULL) {\r
                                uint8_t isOK  = resp->arg[0] & 0xff;\r
                                uint8_t *data  = resp->d.asBytes;\r
+                               if (j == 3) {\r
+                                       data[0]  = (keyA[i][0]);\r
+                                       data[1]  = (keyA[i][1]);\r
+                                       data[2]  = (keyA[i][2]);\r
+                                       data[3]  = (keyA[i][3]);\r
+                                       data[4]  = (keyA[i][4]);\r
+                                       data[5]  = (keyA[i][5]);\r
+                                       data[10] = (keyB[i][0]);\r
+                                       data[11] = (keyB[i][1]);\r
+                                       data[12] = (keyB[i][2]);\r
+                                       data[13] = (keyB[i][3]);\r
+                                       data[14] = (keyB[i][4]);\r
+                                       data[15] = (keyB[i][5]);\r
+                               }\r
                                if (isOK) {\r
                                        fwrite ( data, 1, 16, fout );\r
                                }\r
Impressum, Datenschutz