mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
chg: 'hf mf restore' - add finish message
chg: 'hf mfu restore' - add finish message chg: 'hf 15 restore' - add finish message, close filehandle when failing.
This commit is contained in:
parent
a185e83ffb
commit
0383d7f052
3 changed files with 9 additions and 2 deletions
|
@ -847,6 +847,8 @@ int CmdHF15Restore(const char *Cmd) {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO, "Restoring data blocks.");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
tried = 0;
|
tried = 0;
|
||||||
hex[0] = 0x00;
|
hex[0] = 0x00;
|
||||||
|
@ -877,12 +879,16 @@ int CmdHF15Restore(const char *Cmd) {
|
||||||
for (tried = 0; tried < retries; tried++)
|
for (tried = 0; tried < retries; tried++)
|
||||||
if (!(retval = CmdHF15Write(tmpCmd)))
|
if (!(retval = CmdHF15Write(tmpCmd)))
|
||||||
break;
|
break;
|
||||||
if (tried >= retries)
|
if (tried >= retries) {
|
||||||
|
fclose(f);
|
||||||
return retval;
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
PrintAndLogEx(INFO, "Finish restore");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHF15List(const char *Cmd) {
|
int CmdHF15List(const char *Cmd) {
|
||||||
|
|
|
@ -1055,8 +1055,8 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fdump);
|
fclose(fdump);
|
||||||
|
PrintAndLogEx(INFO, "Finish restore");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2223,6 +2223,7 @@ int CmdHF14AMfURestore(const char *Cmd) {
|
||||||
|
|
||||||
DropField();
|
DropField();
|
||||||
free(dump);
|
free(dump);
|
||||||
|
PrintAndLogEx(INFO, "Finish restore");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue