From c145cad65356244cb073c6ef896e4e742dbed79b Mon Sep 17 00:00:00 2001 From: assasinfil Date: Tue, 21 Nov 2023 22:34:29 +0300 Subject: [PATCH] Verify card bugfix --- .../main/nfc/plugins/supported_cards/social_moscow.c | 10 +++++----- applications/main/nfc/plugins/supported_cards/troika.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/applications/main/nfc/plugins/supported_cards/social_moscow.c b/applications/main/nfc/plugins/supported_cards/social_moscow.c index 3ccdadc1f..ca52661b2 100644 --- a/applications/main/nfc/plugins/supported_cards/social_moscow.c +++ b/applications/main/nfc/plugins/supported_cards/social_moscow.c @@ -10,7 +10,7 @@ #include #include -#define TAG "Social Moscow" +#define TAG "Social_Moscow" typedef struct { uint64_t a; @@ -1463,10 +1463,10 @@ bool parse_transport_block(const MfClassicBlock* block, FuriString* result) { static bool social_moscow_get_card_config(SocialMoscowCardConfig* config, MfClassicType type) { bool success = true; if(type == MfClassicType1k) { - config->data_sector = 32; + config->data_sector = 15; config->keys = social_moscow_1k_keys; } else if(type == MfClassicType4k) { - config->data_sector = 32; + config->data_sector = 15; config->keys = social_moscow_4k_keys; } else { success = false; @@ -1495,7 +1495,7 @@ static bool social_moscow_verify_type(Nfc* nfc, MfClassicType type) { FURI_LOG_D(TAG, "Failed to read block %u: %d", block_num, error); break; } - + FURI_LOG_D(TAG, "Verify success!"); verified = true; } while(false); @@ -1517,7 +1517,7 @@ static bool social_moscow_read(Nfc* nfc, NfcDevice* device) { nfc_device_copy_data(device, NfcProtocolMfClassic, data); do { - MfClassicType type = MfClassicTypeMini; + MfClassicType type = MfClassicType4k; MfClassicError error = mf_classic_poller_sync_detect_type(nfc, &type); if(error != MfClassicErrorNone) break; diff --git a/applications/main/nfc/plugins/supported_cards/troika.c b/applications/main/nfc/plugins/supported_cards/troika.c index b714739cc..3f252390f 100644 --- a/applications/main/nfc/plugins/supported_cards/troika.c +++ b/applications/main/nfc/plugins/supported_cards/troika.c @@ -1486,10 +1486,10 @@ static bool troika_get_card_config(TroikaCardConfig* config, MfClassicType type) bool success = true; if(type == MfClassicType1k) { - config->data_sector = 4; + config->data_sector = 11; config->keys = troika_1k_keys; } else if(type == MfClassicType4k) { - config->data_sector = 8; + config->data_sector = 11; config->keys = troika_4k_keys; } else { success = false; @@ -1518,7 +1518,7 @@ static bool troika_verify_type(Nfc* nfc, MfClassicType type) { FURI_LOG_D(TAG, "Failed to read block %u: %d", block_num, error); break; } - + FURI_LOG_D(TAG, "Verify success!"); verified = true; } while(false);