mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
@@ -16,8 +16,7 @@ typedef struct {
|
||||
|
||||
static const uint32_t mf_classic_data_format_version = 2;
|
||||
|
||||
// MIFARE Plus 2K SL1 has 32 sectors (128 blocks total) per official specification
|
||||
#define MF_CLASSIC_PLUS2K_SCAN_SECTORS 32
|
||||
#define MF_CLASSIC_PLUS2K_SCAN_SECTORS 18
|
||||
|
||||
static const MfClassicFeatures mf_classic_features[MfClassicTypeNum] = {
|
||||
[MfClassicTypeMini] =
|
||||
|
||||
@@ -65,15 +65,6 @@ static MfClassicListenerCommand mf_classic_listener_auth_first_part_handler(
|
||||
|
||||
uint8_t sector_num = mf_classic_get_sector_by_block(block_num);
|
||||
|
||||
// Reject authentication immediately if keys are not found (uninitialized sector)
|
||||
// This matches real card behavior where empty sectors reject authentication
|
||||
// Fast path: check mask directly instead of function call
|
||||
if(key_type == MfClassicKeyTypeA) {
|
||||
if(FURI_BIT(instance->data->key_a_mask, sector_num) == 0) break;
|
||||
} else {
|
||||
if(FURI_BIT(instance->data->key_b_mask, sector_num) == 0) break;
|
||||
}
|
||||
|
||||
MfClassicSectorTrailer* sec_tr =
|
||||
mf_classic_get_sector_trailer_by_sector(instance->data, sector_num);
|
||||
MfClassicKey* key = (key_type == MfClassicKeyTypeA) ? &sec_tr->key_a : &sec_tr->key_b;
|
||||
|
||||
Reference in New Issue
Block a user