NFC fixes part 3 (#1885)

* nfc: fix read next key
* nfc: verify new line ending in user dictionary file
* nfc: fix cache save
* nfc: add unit test for dict load
* nfc: fix total key count in dictionary

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2022-10-17 21:10:41 +04:00
committed by GitHub
parent e7aaf3dbb2
commit dfbe21e720
3 changed files with 87 additions and 5 deletions

View File

@@ -921,7 +921,7 @@ static bool nfc_device_save_mifare_classic_keys(NfcDevice* dev) {
file, furi_string_get_cstr(temp_str), sec_tr->key_a, 6);
}
if(!key_save_success) break;
if(FURI_BIT(data->key_a_mask, i)) {
if(FURI_BIT(data->key_b_mask, i)) {
furi_string_printf(temp_str, "Key B sector %d", i);
key_save_success = flipper_format_write_hex(
file, furi_string_get_cstr(temp_str), sec_tr->key_b, 6);