when dumping memory also try the MFC_B key

This commit is contained in:
iceman1001 2024-09-13 13:40:24 +02:00
parent 7a5d1b1ddf
commit cd0ce47d89
2 changed files with 7 additions and 1 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Changed to also try the MFC_B key when extracting memory (@iceman1001)
- Fix parallel `make -j check` Thanks @elboulangero (@iceman1001)
- Added support for 8268/8310 (@douniwan5788)
- Changed scripting string params to accept 1024 chars, Thanks @evildaemond! (@iceman1001)

View file

@ -1605,7 +1605,7 @@ static uint8_t chkKey(struct chk_t *c) {
// mifare_classic_halt(c->pcs);
break;
}
if (!selected) {
if (selected == false) {
Dbprintf("chkKey: Failed at fast selecting the card!");
}
return res;
@ -2396,12 +2396,17 @@ int MifareECardLoad(uint8_t sectorcnt, uint8_t keytype) {
// Auth
if (mifare_classic_auth(pcs, cuid, FirstBlockOfSector(s), keytype, ui64Key, AUTH_FIRST)) {
ui64Key = emlGetKey(s, MF_KEY_B);
if (mifare_classic_auth(pcs, cuid, FirstBlockOfSector(s), MF_KEY_B, ui64Key, AUTH_FIRST)) {
retval = PM3_EPARTIAL;
if (g_dbglevel >= DBG_ERROR) {
Dbprintf("Sector %2d - Auth error", s);
}
continue;
}
}
#define MAX_RETRIES 2