Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect condition check #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mfcuk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,14 +1570,14 @@ int main(int argc, char *argv[])
ERR("tag was removed or cannot be selected");
}

if (0 > nfc_initiator_mifare_cmd(pnd, k, block, &mp)) {
ERR("AUTH sector %d, block %d, key %012"PRIx64", key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode);
} else {
if (nfc_initiator_mifare_cmd(pnd, k, block, &mp)) {
// Mark current key-type as verified
ptr_trailer->abtAccessBits[result_byte] |= ACTIONS_VERIFY;

// Copy default key on top of dump only in case default keys option was specified in command line and the default key matched
memcpy((k == keyA) ? (ptr_trailer->abtKeyA) : (ptr_trailer->abtKeyB), current_default_keys[j], MIFARE_CLASSIC_KEY_BYTELENGTH);
} else {
ERR("AUTH sector %d, block %d, key %012"PRIx64", key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode);
}
} // for (j = 0; (j < crntNumVerifKeys); j++)
} // for (i=0; i<max_sectors; i++)
Expand Down