FILE *fdump;\r
FILE *fkeys;\r
\r
+ char c;\r
+ \r
if ((fdump = fopen("dumpdata.bin","rb")) == NULL) {\r
PrintAndLog("Could not find file dump.bin");\r
return 1;\r
fread(keyB[i], 1, 6, fkeys);\r
}\r
\r
- PrintAndLog("going...");\r
+ PrintAndLog("Restoring dumpdata.bin to card");\r
\r
for (i=0 ; i<16 ; i++) {\r
for( j=0 ; j<4 ; j++) {\r
bldata[15] = (keyB[i][5]);\r
} \r
\r
- PrintAndLog("writing to block %2d: %s confirm?", i*4+j, sprint_hex(bldata, 16));\r
+ PrintAndLog("Writing to block %2d: %s Confirm? [Y,N]", i*4+j, sprint_hex(bldata, 16));\r
+ \r
+ scanf("%c",&c);\r
+ if ((c != 'y') || (c != 'Y')){\r
+ PrintAndLog("Aborting !");\r
+ return 1;\r
+ }\r
\r
memcpy(c.d.asBytes + 10, bldata, 16);\r
SendCommand(&c);\r