mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-19 13:48:16 +08:00
Corrected some errors from r487, WHICH I FORGOT TO COMMENT.
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"
This commit is contained in:
parent
3d0adc14cf
commit
5ff9150e3b
1 changed files with 3 additions and 8 deletions
|
@ -381,20 +381,15 @@ int CmdHF14AMfRestore1k(const char *Cmd)
|
|||
{
|
||||
|
||||
int i,j;
|
||||
uint8_t blockNo = 0;
|
||||
uint8_t keyType = 0;
|
||||
uint8_t key[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||
uint8_t bldata[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
uint8_t keyA[16][6];
|
||||
uint8_t keyB[16][6];
|
||||
|
||||
char cmdp = 0x00;
|
||||
|
||||
FILE *fdump;
|
||||
FILE *fkeys;
|
||||
|
||||
FILE *fdebug = fopen("debug.bin","wb");
|
||||
|
||||
if ((fdump = fopen("dumpdata.bin","rb")) == NULL) {
|
||||
PrintAndLog("Could not find file dump.bin");
|
||||
return 1;
|
||||
|
@ -641,15 +636,15 @@ int CmdHF14AMfNested(const char *Cmd)
|
|||
|
||||
if (createDumpFile) {
|
||||
if ((fkeys = fopen("dumpkeys.bin","wb")) == NULL) {
|
||||
rintAndLog("Could not create file keys.bin");
|
||||
PrintAndLog("Could not create file keys.bin");
|
||||
free(e_sector);
|
||||
return 1;
|
||||
}
|
||||
for(i=0; i<16; i++) {
|
||||
fwrite ( e_sector[i].Key[0], sizeof(e_sector[i].Key[0]), 1, fkeys );
|
||||
fwrite ( e_sector[i].Key, sizeof(e_sector[i].Key[0]), 1, fkeys );
|
||||
}
|
||||
for(i=0; i<16; i++) {
|
||||
fwrite ( e_sector[i].Key[1], sizeof(e_sector[i].Key[1]), 1, fkeys );
|
||||
fwrite ( e_sector[i].Key, sizeof(e_sector[i].Key[1]), 1, fkeys );
|
||||
}
|
||||
fclose(fkeys);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue