if ( bytes_read == 0) {\r
PrintAndLog("File reading error.");\r
fclose(fin);\r
+ fin = NULL;\r
return 2;\r
}\r
}\r
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
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
if ( bytes_read == 0) {\r
PrintAndLog("File reading error (dumpkeys.bin).");\r
fclose(fkeys);\r
+ fkeys = NULL;\r
return 2;\r
}\r
}\r
if ( bytes_read == 0) {\r
PrintAndLog("File reading error (dumpkeys.bin).");\r
fclose(fkeys);\r
+ fkeys = NULL;\r
return 2;\r
}\r
}\r
if ( bytes_read == 0) {\r
PrintAndLog("File reading error (dumpdata.bin).");\r
fclose(fdump);\r
+ fdump = NULL; \r
return 2;\r
}\r
\r
}\r
\r
fclose(fdump);\r
+ fdump = NULL; \r
return 0;\r
}\r
\r