Fix mifare ultralight/ntag unlock #1624

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich 2022-08-22 20:14:31 +03:00 committed by GitHub
parent 9829145d8c
commit 8992f8ac36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -545,6 +545,16 @@ void nfc_worker_mf_ultralight_read_auth(NfcWorker* nfc_worker) {
} }
data->auth_success = mf_ultralight_authenticate(&tx_rx, key, &pack); data->auth_success = mf_ultralight_authenticate(&tx_rx, key, &pack);
if(!data->auth_success) {
// Reset card
furi_hal_nfc_sleep();
if(!furi_hal_nfc_activate_nfca(300, NULL)) {
nfc_worker->callback(NfcWorkerEventFail, nfc_worker->context);
break;
}
}
mf_ul_read_card(&tx_rx, &reader, data); mf_ul_read_card(&tx_rx, &reader, data);
if(data->auth_success) { if(data->auth_success) {
MfUltralightConfigPages* config_pages = mf_ultralight_get_config_pages(data); MfUltralightConfigPages* config_pages = mf_ultralight_get_config_pages(data);