skip sector 16 at all since it seems to always be locked down even if the keys authenticate. MFC Ev1 related and less errrors in autopwn when running against a MFC Ev1 in the dumping phase

This commit is contained in:
iceman1001 2023-07-27 12:40:04 +02:00
commit 42700d3c51

View file

@ -2084,13 +2084,20 @@ int MifareECardLoad(uint8_t sectorcnt, uint8_t keytype) {
iso14a_set_timeout(fwt / (8 * 16)); iso14a_set_timeout(fwt / (8 * 16));
for (uint8_t s = 0; s < sectorcnt; s++) { for (uint8_t s = 0; s < sectorcnt; s++) {
uint64_t ui64Key = emlGetKey(s, keytype);
// MFC 1K EV1 sector 16,17 don't use key A. if (sectorcnt == 18) {
if ((sectorcnt == 18) && (keytype == 0) && s > 15) { // MFC 1K EV1, skip sector 16 since its lockdown
continue; if (s == 16) {
continue;
}
// MFC 1K EV1 sector 17 don't use key A.
if (keytype == 0) {
continue;
}
} }
uint64_t ui64Key = emlGetKey(s, keytype);
// use fast select // use fast select
if (have_uid == false) { // need a full select cycle to get the uid first if (have_uid == false) { // need a full select cycle to get the uid first
iso14a_card_select_t card_info; iso14a_card_select_t card_info;