This commit is contained in:
iceman1001 2020-04-06 15:25:56 +02:00
commit 3519dea0cf

View file

@ -1421,38 +1421,30 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
// Double & triple sized UID, can be mapped to a manufacturer. // Double & triple sized UID, can be mapped to a manufacturer.
if (card.uidlen <= 4) { if (card.uidlen <= 4) {
nxptype = detect_nxp_card(card.sak, ((card.atqa[1] << 8) + card.atqa[0])); nxptype = detect_nxp_card(card.sak, ((card.atqa[1] << 8) + card.atqa[0]));
if ((nxptype & MTCLASSIC) == MTCLASSIC) isMifareClassic = true;
else isMifareClassic = false; isMifareClassic = ((nxptype & MTCLASSIC) == MTCLASSIC);
if ((nxptype & MTDESFIRE) == MTDESFIRE) { isMifareDESFire = ((nxptype & MTDESFIRE) == MTDESFIRE);
isMifareDESFire = true; isMifarePlus = ((nxptype & MTPLUS) == MTPLUS);
} else { isMifareUltralight = ((nxptype & MTULTRALIGHT) == MTULTRALIGHT);
isMifareDESFire = false;
} if ((nxptype & MTOTHER) == MTOTHER)
if ((nxptype & MTPLUS) == MTPLUS) isMifarePlus = true; isMifareClassic = true;
else isMifarePlus = false;
if ((nxptype & MTULTRALIGHT) == MTULTRALIGHT) isMifareUltralight = true;
else isMifareUltralight = false;
if ((nxptype & MTOTHER) == MTOTHER) isMifareClassic = true;
} }
if (card.uidlen > 4) { if (card.uidlen > 4) {
PrintAndLogEx(SUCCESS, "MANUFACTURER: " _YELLOW_("%s"), getTagInfo(card.uid[0])); PrintAndLogEx(SUCCESS, "MANUFACTURER: " _YELLOW_("%s"), getTagInfo(card.uid[0]));
PrintAndLogEx(SUCCESS, "Possible Type:"); PrintAndLogEx(SUCCESS, "Possible Type:");
switch (card.uid[0]) { switch (card.uid[0]) {
case 0x04: // NXP case 0x04: // NXP
nxptype = detect_nxp_card(card.sak, ((card.atqa[1] << 8) + card.atqa[0])); nxptype = detect_nxp_card(card.sak, ((card.atqa[1] << 8) + card.atqa[0]));
if ((nxptype & MTCLASSIC) == MTCLASSIC) isMifareClassic = true;
else isMifareClassic = false; isMifareClassic = ((nxptype & MTCLASSIC) == MTCLASSIC);
if ((nxptype & MTDESFIRE) == MTDESFIRE) { isMifareDESFire = ((nxptype & MTDESFIRE) == MTDESFIRE);
isMifareDESFire = true; isMifarePlus = ((nxptype & MTPLUS) == MTPLUS);
} else { isMifareUltralight = ((nxptype & MTULTRALIGHT) == MTULTRALIGHT);
isMifareDESFire = false;
} if ((nxptype & MTOTHER) == MTOTHER)
if ((nxptype & MTPLUS) == MTPLUS) isMifarePlus = true; isMifareClassic = true;
else isMifarePlus = false;
if ((nxptype & MTULTRALIGHT) == MTULTRALIGHT) isMifareUltralight = true;
else isMifareUltralight = false;
if ((nxptype & MTOTHER) == MTOTHER) isMifareClassic = true;
break; break;
case 0x05: // Infineon case 0x05: // Infineon
if ((card.uid[1] & 0xF0) == 0x10) { if ((card.uid[1] & 0xF0) == 0x10) {
@ -1473,7 +1465,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
default: default:
getTagLabel(card.uid[0], card.uid[1]); getTagLabel(card.uid[0], card.uid[1]);
switch (card.sak) { switch (card.sak) {
case 0x00: case 0x00: {
isMifareClassic = false; isMifareClassic = false;
// ******** is card of the MFU type (UL/ULC/NTAG/ etc etc) // ******** is card of the MFU type (UL/ULC/NTAG/ etc etc)
@ -1502,23 +1494,30 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
return select_status; return select_status;
} }
break; break;
case 0x0A: }
case 0x0A: {
printTag("FM11RF005SH (Shanghai Metro)"); printTag("FM11RF005SH (Shanghai Metro)");
break; break;
case 0x20: }
case 0x20: {
printTag("JCOP 31/41"); printTag("JCOP 31/41");
break; break;
case 0x28: }
case 0x28: {
printTag("JCOP31 or JCOP41 v2.3.1"); printTag("JCOP31 or JCOP41 v2.3.1");
break; break;
case 0x38: }
case 0x38: {
printTag("Nokia 6212 or 6131"); printTag("Nokia 6212 or 6131");
break; break;
case 0x98: }
case 0x98: {
printTag("Gemplus MPCOS"); printTag("Gemplus MPCOS");
break; break;
default: }
default: {
break; break;
}
} }
break; break;
} }
@ -1784,5 +1783,6 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) {
} }
} }
DropField();
return select_status; return select_status;
} }