[FL-3060] New MFC Bruteforce animation (#2190)
* Change the wording in the headers * Add support for text in the progress bar * New MFC key bruteforce screen * Typo fix * nfc: rename Flipper Dict to System Dict * elements: fix types * Display the correct key attack sector Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -573,17 +573,24 @@ static void nfc_worker_mf_classic_key_attack(
|
||||
FuriHalNfcTxRxContext* tx_rx,
|
||||
uint16_t start_sector) {
|
||||
furi_assert(nfc_worker);
|
||||
furi_assert(nfc_worker->callback);
|
||||
|
||||
bool card_found_notified = true;
|
||||
bool card_removed_notified = false;
|
||||
|
||||
MfClassicData* data = &nfc_worker->dev_data->mf_classic_data;
|
||||
NfcMfClassicDictAttackData* dict_attack_data =
|
||||
&nfc_worker->dev_data->mf_classic_dict_attack_data;
|
||||
uint32_t total_sectors = mf_classic_get_total_sectors_num(data->type);
|
||||
|
||||
furi_assert(start_sector < total_sectors);
|
||||
|
||||
nfc_worker->callback(NfcWorkerEventKeyAttackStart, nfc_worker->context);
|
||||
|
||||
// Check every sector's A and B keys with the given key
|
||||
for(size_t i = start_sector; i < total_sectors; i++) {
|
||||
nfc_worker->callback(NfcWorkerEventKeyAttackNextSector, nfc_worker->context);
|
||||
dict_attack_data->current_sector = i;
|
||||
furi_hal_nfc_sleep();
|
||||
if(furi_hal_nfc_activate_nfca(200, NULL)) {
|
||||
furi_hal_nfc_sleep();
|
||||
@@ -632,6 +639,7 @@ static void nfc_worker_mf_classic_key_attack(
|
||||
}
|
||||
if(nfc_worker->state != NfcWorkerStateMfClassicDictAttack) break;
|
||||
}
|
||||
nfc_worker->callback(NfcWorkerEventKeyAttackStop, nfc_worker->context);
|
||||
}
|
||||
|
||||
void nfc_worker_mf_classic_dict_attack(NfcWorker* nfc_worker) {
|
||||
|
||||
Reference in New Issue
Block a user