hf mf restore - when using keyfile as auth, use dump data for sectortrailer

This commit is contained in:
iceman1001 2021-04-01 00:08:22 +02:00
commit 924a8163d0

View file

@ -1230,6 +1230,7 @@ static int CmdHF14AMfRestore(const char *Cmd) {
return 2;
}
if (use_keyfile_for_auth == false) {
if (blockNo == NumBlocksPerSector(sectorNo) - 1) { // sector trailer
bldata[0] = (keyA[sectorNo][0]);
bldata[1] = (keyA[sectorNo][1]);
@ -1244,6 +1245,7 @@ static int CmdHF14AMfRestore(const char *Cmd) {
bldata[14] = (keyB[sectorNo][4]);
bldata[15] = (keyB[sectorNo][5]);
}
}
memcpy(data + 10, bldata, 16);