mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-02-24 15:44:47 +08:00
updates to function hf mf retore1k
This commit is contained in:
parent
e6b8c965bb
commit
9d71094388
1 changed files with 10 additions and 2 deletions
|
@ -403,6 +403,8 @@ int CmdHF14AMfRestore1k(const char *Cmd)
|
|||
FILE *fdump;
|
||||
FILE *fkeys;
|
||||
|
||||
char c;
|
||||
|
||||
if ((fdump = fopen("dumpdata.bin","rb")) == NULL) {
|
||||
PrintAndLog("Could not find file dump.bin");
|
||||
return 1;
|
||||
|
@ -419,7 +421,7 @@ int CmdHF14AMfRestore1k(const char *Cmd)
|
|||
fread(keyB[i], 1, 6, fkeys);
|
||||
}
|
||||
|
||||
PrintAndLog("going...");
|
||||
PrintAndLog("Restoring dumpdata.bin to card");
|
||||
|
||||
for (i=0 ; i<16 ; i++) {
|
||||
for( j=0 ; j<4 ; j++) {
|
||||
|
@ -443,7 +445,13 @@ int CmdHF14AMfRestore1k(const char *Cmd)
|
|||
bldata[15] = (keyB[i][5]);
|
||||
}
|
||||
|
||||
PrintAndLog("writing to block %2d: %s confirm?", 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",&c);
|
||||
if ((c != 'y') || (c != 'Y')){
|
||||
PrintAndLog("Aborting !");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memcpy(c.d.asBytes + 10, bldata, 16);
|
||||
SendCommand(&c);
|
||||
|
|
Loading…
Reference in a new issue