]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
CHG: "hf mf hardnested" - less printing
[proxmark3-svn] / client / cmdhfmf.c
index 6ddf845aa446ab7fbaf00117eb9e7631d694e404..dc8f78982dca416c58f756928932077760d9678a 100644 (file)
@@ -475,6 +475,7 @@ int CmdHF14AMfDump(const char *Cmd) {
                if ( bytes_read == 0) {\r
                        PrintAndLog("File reading error.");\r
                        fclose(fin);\r
+                       fin = NULL;\r
                        return 2;\r
                }\r
        }\r
@@ -485,12 +486,14 @@ int CmdHF14AMfDump(const char *Cmd) {
                if ( bytes_read == 0) {\r
                        PrintAndLog("File reading error.");\r
                        fclose(fin);\r
+                       fin = NULL;\r
                        return 2;\r
                }\r
        }\r
        \r
        fclose(fin);\r
-\r
+       fin = NULL;\r
+                       \r
        PrintAndLog("|-----------------------------------------|");\r
        PrintAndLog("|------ Reading sector access bits...-----|");\r
        PrintAndLog("|-----------------------------------------|");\r
@@ -596,6 +599,7 @@ int CmdHF14AMfDump(const char *Cmd) {
                uint16_t numblocks = FirstBlockOfSector(numSectors - 1) + NumBlocksPerSector(numSectors - 1);\r
                fwrite(carddata, 1, 16*numblocks, fout);\r
                fclose(fout);\r
+               fout = NULL;            \r
                PrintAndLog("Dumped %d blocks (%d bytes) to file dumpdata.bin", numblocks, 16*numblocks);\r
        }\r
                \r
@@ -644,6 +648,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
                if ( bytes_read == 0) {\r
                        PrintAndLog("File reading error (dumpkeys.bin).");\r
                        fclose(fkeys);\r
+                       fkeys = NULL;\r
                        return 2;\r
                }\r
        }\r
@@ -653,6 +658,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
                if ( bytes_read == 0) {\r
                        PrintAndLog("File reading error (dumpkeys.bin).");\r
                        fclose(fkeys);\r
+                       fkeys = NULL;\r
                        return 2;\r
                }\r
        }\r
@@ -673,6 +679,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
                        if ( bytes_read == 0) {\r
                                PrintAndLog("File reading error (dumpdata.bin).");\r
                                fclose(fdump);\r
+                               fdump = NULL;                           \r
                                return 2;\r
                        }\r
                                        \r
@@ -708,6 +715,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
        }\r
        \r
        fclose(fdump);\r
+       fdump = NULL;   \r
        return 0;\r
 }\r
 \r
Impressum, Datenschutz