{\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
\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