skip all zeros response that "hf mf sim" might answer.. (wrongly)

This commit is contained in:
iceman1001 2020-09-05 08:32:26 +02:00
parent fa532a0e1b
commit 643a53c592

View file

@ -1970,6 +1970,10 @@ int MifareECardLoad(uint8_t sectorcnt, uint8_t keytype) {
continue;
}
if (memcmp(dataoutbuf, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16) == 0) {
continue;
}
if (blockNo < NumBlocksPerSector(sectorNo) - 1) {
emlSetMem(dataoutbuf, FirstBlockOfSector(sectorNo) + blockNo, 1);
} else { // sector trailer, keep the keys, set only the AC