summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3d0adc1)
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"
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
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 *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
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
\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
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
}\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