Add support for Mifare Classic 4k SAK 0x38 ATQA 0x02, 0x04, 0x08 (#3009)

Co-authored-by: suaveolent <suaveolent@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
suaveolent 2023-09-01 04:22:29 +02:00 committed by GitHub
parent 7531e18020
commit d8d2b360cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -381,7 +381,9 @@ bool mf_classic_check_card_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) {
} else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) {
//skylanders support
return true;
} else if((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) {
} else if(
((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) ||
((ATQA0 == 0x02 || ATQA0 == 0x04 || ATQA0 == 0x08) && (SAK == 0x38))) {
return true;
} else {
return false;
@ -393,13 +395,17 @@ MfClassicType mf_classic_get_classic_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t
if((ATQA0 == 0x44 || ATQA0 == 0x04)) {
if((SAK == 0x08 || SAK == 0x88)) {
return MfClassicType1k;
} else if((SAK == 0x38)) {
return MfClassicType4k;
} else if(SAK == 0x09) {
return MfClassicTypeMini;
}
} else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) {
//skylanders support
return MfClassicType1k;
} else if((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) {
} else if(
((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) ||
((ATQA0 == 0x02 || ATQA0 == 0x08) && (SAK == 0x38))) {
return MfClassicType4k;
}
return MfClassicType1k;