]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Corrected some errors from r487, WHICH I FORGOT TO COMMENT.
authorcaioxmag <caioxmag@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 31 Aug 2011 07:09:50 +0000 (07:09 +0000)
committercaioxmag <caioxmag@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 31 Aug 2011 07:09:50 +0000 (07:09 +0000)
Log for r487 should have been:
"added hf mf dump1k and hf mf restore1k functions"
"modified hf mf nested function to add option to create dumpkeys.bin file from its output"

client/cmdhfmf.c

index 742b7b3b02dbe90f53963c1542b4114c77525e74..ed3394e5034f23545092ebcda432ea491b74189f 100644 (file)
@@ -381,20 +381,15 @@ int CmdHF14AMfRestore1k(const char *Cmd)
 {\r
 \r
        int i,j;\r
-       uint8_t blockNo = 0;\r
        uint8_t keyType = 0;\r
        uint8_t key[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\r
        uint8_t bldata[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\r
        uint8_t keyA[16][6];\r
        uint8_t keyB[16][6];\r
        \r
-       char cmdp = 0x00;\r
-       \r
        FILE *fdump;\r
        FILE *fkeys;\r
        \r
-       FILE *fdebug = fopen("debug.bin","wb");\r
-       \r
        if ((fdump = fopen("dumpdata.bin","rb")) == NULL) {\r
                PrintAndLog("Could not find file dump.bin");\r
                return 1;\r
@@ -641,15 +636,15 @@ int CmdHF14AMfNested(const char *Cmd)
                \r
                if (createDumpFile) {\r
                        if ((fkeys = fopen("dumpkeys.bin","wb")) == NULL) { \r
-                               rintAndLog("Could not create file keys.bin");\r
+                               PrintAndLog("Could not create file keys.bin");\r
                                free(e_sector);\r
                                return 1;\r
                        }\r
                        for(i=0; i<16; i++) {\r
-                               fwrite ( e_sector[i].Key[0], sizeof(e_sector[i].Key[0]), 1, fkeys );\r
+                               fwrite ( e_sector[i].Key, sizeof(e_sector[i].Key[0]), 1, fkeys );\r
                        }\r
                        for(i=0; i<16; i++) {\r
-                               fwrite ( e_sector[i].Key[1], sizeof(e_sector[i].Key[1]), 1, fkeys );\r
+                               fwrite ( e_sector[i].Key, sizeof(e_sector[i].Key[1]), 1, fkeys );\r
                        }\r
                        fclose(fkeys);\r
                }\r
Impressum, Datenschutz