+\r
+ if (isOK) {\r
+ if ((fout = fopen("dumpdata.bin","wb")) == NULL) { \r
+ PrintAndLog("Could not create file name dumpdata.bin");\r
+ return 1;\r
+ }\r
+ uint16_t numblocks = FirstBlockOfSector(numSectors - 1) + NumBlocksPerSector(numSectors - 1);\r
+ fwrite(carddata, 1, 16*numblocks, fout);\r
+ fclose(fout);\r
+ PrintAndLog("Dumped %d blocks (%d bytes) to file dumpdata.bin", numblocks, 16*numblocks);\r
+ }\r