2022-03-24 01:14:34 +03:00
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include <gui/modules/widget.h>
|
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
#include <lib/nfc/protocols/mifare_classic.h>
|
2022-03-24 01:14:34 +03:00
|
|
|
|
|
|
|
typedef struct DictAttack DictAttack;
|
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
typedef void (*DictAttackCallback)(void* context);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
|
|
|
DictAttack* dict_attack_alloc();
|
|
|
|
|
|
|
|
void dict_attack_free(DictAttack* dict_attack);
|
|
|
|
|
|
|
|
void dict_attack_reset(DictAttack* dict_attack);
|
|
|
|
|
|
|
|
View* dict_attack_get_view(DictAttack* dict_attack);
|
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_callback(DictAttack* dict_attack, DictAttackCallback callback, void* context);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_header(DictAttack* dict_attack, const char* header);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_card_detected(DictAttack* dict_attack, MfClassicType type);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_card_removed(DictAttack* dict_attack);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_sector_read(DictAttack* dict_attack, uint8_t sec_read);
|
2022-03-24 01:14:34 +03:00
|
|
|
|
2022-07-26 18:30:49 +03:00
|
|
|
void dict_attack_set_keys_found(DictAttack* dict_attack, uint8_t keys_found);
|
|
|
|
|
|
|
|
void dict_attack_set_current_sector(DictAttack* dict_attack, uint8_t curr_sec);
|
|
|
|
|
|
|
|
void dict_attack_inc_current_sector(DictAttack* dict_attack);
|
|
|
|
|
|
|
|
void dict_attack_inc_keys_found(DictAttack* dict_attack);
|