mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
CHG: "hf mf hardnested" - less printing
CHG: some filehandles = NULL.
This commit is contained in:
parent
3c528f5fda
commit
2dcf60f3df
15 changed files with 112 additions and 61 deletions
|
@ -475,6 +475,7 @@ int CmdHF14AMfDump(const char *Cmd) {
|
|||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error.");
|
||||
fclose(fin);
|
||||
fin = NULL;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -485,12 +486,14 @@ int CmdHF14AMfDump(const char *Cmd) {
|
|||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error.");
|
||||
fclose(fin);
|
||||
fin = NULL;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fin);
|
||||
|
||||
fin = NULL;
|
||||
|
||||
PrintAndLog("|-----------------------------------------|");
|
||||
PrintAndLog("|------ Reading sector access bits...-----|");
|
||||
PrintAndLog("|-----------------------------------------|");
|
||||
|
@ -596,6 +599,7 @@ int CmdHF14AMfDump(const char *Cmd) {
|
|||
uint16_t numblocks = FirstBlockOfSector(numSectors - 1) + NumBlocksPerSector(numSectors - 1);
|
||||
fwrite(carddata, 1, 16*numblocks, fout);
|
||||
fclose(fout);
|
||||
fout = NULL;
|
||||
PrintAndLog("Dumped %d blocks (%d bytes) to file dumpdata.bin", numblocks, 16*numblocks);
|
||||
}
|
||||
|
||||
|
@ -644,6 +648,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
|||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error (dumpkeys.bin).");
|
||||
fclose(fkeys);
|
||||
fkeys = NULL;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -653,6 +658,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
|||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error (dumpkeys.bin).");
|
||||
fclose(fkeys);
|
||||
fkeys = NULL;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -673,6 +679,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
|||
if ( bytes_read == 0) {
|
||||
PrintAndLog("File reading error (dumpdata.bin).");
|
||||
fclose(fdump);
|
||||
fdump = NULL;
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -708,6 +715,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
|||
}
|
||||
|
||||
fclose(fdump);
|
||||
fdump = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue