small updates to hf mf restore1k

This commit is contained in:
caioxmag 2011-09-19 12:58:58 +00:00
commit 6c064e161c

View file

@ -403,8 +403,6 @@ int CmdHF14AMfRestore1k(const char *Cmd)
FILE *fdump; FILE *fdump;
FILE *fkeys; FILE *fkeys;
char ch;
if ((fdump = fopen("dumpdata.bin","rb")) == NULL) { if ((fdump = fopen("dumpdata.bin","rb")) == NULL) {
PrintAndLog("Could not find file dump.bin"); PrintAndLog("Could not find file dump.bin");
return 1; return 1;
@ -445,13 +443,17 @@ int CmdHF14AMfRestore1k(const char *Cmd)
bldata[15] = (keyB[i][5]); bldata[15] = (keyB[i][5]);
} }
PrintAndLog("Writing to block %2d: %s", i*4+j, sprint_hex(bldata, 16));
/*
PrintAndLog("Writing to block %2d: %s Confirm? [Y,N]", i*4+j, sprint_hex(bldata, 16)); PrintAndLog("Writing to block %2d: %s Confirm? [Y,N]", i*4+j, sprint_hex(bldata, 16));
scanf("%c",&ch); scanf("%c",&ch);
if ((ch != 'y') || (ch != 'Y')){ if ((ch != 'y') && (ch != 'Y')){
PrintAndLog("Aborting !"); PrintAndLog("Aborting !");
return 1; return 1;
} }
*/
memcpy(c.d.asBytes + 10, bldata, 16); memcpy(c.d.asBytes + 10, bldata, 16);
SendCommand(&c); SendCommand(&c);