Mifare mini with sak 89 support

This commit is contained in:
MX 2023-05-18 02:38:45 +03:00
parent f7d9ef0c97
commit 2b01766460
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
2 changed files with 5 additions and 3 deletions

View File

@ -376,7 +376,8 @@ bool mf_classic_is_value_block(MfClassicData* data, uint8_t block_num) {
bool mf_classic_check_card_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) { bool mf_classic_check_card_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) {
UNUSED(ATQA1); UNUSED(ATQA1);
if((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08 || SAK == 0x88 || SAK == 0x09)) { if((ATQA0 == 0x44 || ATQA0 == 0x04) &&
(SAK == 0x08 || SAK == 0x88 || SAK == 0x09 || SAK == 0x89)) {
return true; return true;
} else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) { } else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) {
//skylanders support //skylanders support
@ -393,7 +394,7 @@ MfClassicType mf_classic_get_classic_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t
if((ATQA0 == 0x44 || ATQA0 == 0x04)) { if((ATQA0 == 0x44 || ATQA0 == 0x04)) {
if((SAK == 0x08 || SAK == 0x88)) { if((SAK == 0x08 || SAK == 0x88)) {
return MfClassicType1k; return MfClassicType1k;
} else if(SAK == 0x09) { } else if((SAK == 0x09 || SAK == 0x89)) {
return MfClassicTypeMini; return MfClassicTypeMini;
} }
} else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) { } else if((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01)) {

View File

@ -6,7 +6,8 @@ MifareType mifare_common_get_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) {
if((ATQA0 == 0x44) && (ATQA1 == 0x00) && (SAK == 0x00)) { if((ATQA0 == 0x44) && (ATQA1 == 0x00) && (SAK == 0x00)) {
type = MifareTypeUltralight; type = MifareTypeUltralight;
} else if( } else if(
((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08 || SAK == 0x88 || SAK == 0x09)) || ((ATQA0 == 0x44 || ATQA0 == 0x04) &&
(SAK == 0x08 || SAK == 0x88 || SAK == 0x09 || SAK == 0x89)) ||
((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) || ((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) ||
((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01))) { ((ATQA0 == 0x01) && (ATQA1 == 0x0F) && (SAK == 0x01))) {
type = MifareTypeClassic; type = MifareTypeClassic;