mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 00:18:35 -07:00
Temporarily backport app updates from apps repo
This commit is contained in:
@@ -15,7 +15,6 @@ struct DictAttack {
|
||||
|
||||
typedef struct {
|
||||
DictAttackState state;
|
||||
MfClassicType type;
|
||||
FuriString* header;
|
||||
uint8_t sectors_total;
|
||||
uint8_t sectors_read;
|
||||
@@ -123,7 +122,6 @@ void dict_attack_reset(DictAttack* dict_attack) {
|
||||
DictAttackViewModel * model,
|
||||
{
|
||||
model->state = DictAttackStateRead;
|
||||
model->type = MfClassicType1k;
|
||||
model->sectors_total = 1;
|
||||
model->sectors_read = 0;
|
||||
model->sector_current = 0;
|
||||
@@ -242,6 +240,15 @@ void dict_attack_set_total_dict_keys(DictAttack* dict_attack, uint16_t dict_keys
|
||||
true);
|
||||
}
|
||||
|
||||
void dict_attack_set_current_dict_key(DictAttack* dict_attack, uint16_t current_key) {
|
||||
furi_assert(dict_attack);
|
||||
with_view_model(
|
||||
dict_attack->view,
|
||||
DictAttackViewModel * model,
|
||||
{ model->dict_keys_current = current_key; },
|
||||
true);
|
||||
}
|
||||
|
||||
void dict_attack_inc_current_dict_key(DictAttack* dict_attack, uint16_t keys_tried) {
|
||||
furi_assert(dict_attack);
|
||||
with_view_model(
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include <gui/view.h>
|
||||
#include <gui/modules/widget.h>
|
||||
|
||||
#include <lib/nfc/protocols/mifare_classic.h>
|
||||
|
||||
typedef struct DictAttack DictAttack;
|
||||
|
||||
typedef void (*DictAttackCallback)(void* context);
|
||||
@@ -37,6 +35,8 @@ void dict_attack_inc_keys_found(DictAttack* dict_attack);
|
||||
|
||||
void dict_attack_set_total_dict_keys(DictAttack* dict_attack, uint16_t dict_keys_total);
|
||||
|
||||
void dict_attack_set_current_dict_key(DictAttack* dict_attack, uint16_t current_key);
|
||||
|
||||
void dict_attack_inc_current_dict_key(DictAttack* dict_attack, uint16_t keys_tried);
|
||||
|
||||
void dict_attack_set_key_attack(DictAttack* dict_attack, bool is_key_attack, uint8_t sector);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "loclass.h"
|
||||
#include "../picopass_worker_i.h"
|
||||
|
||||
#include <picopass_device.h>
|
||||
|
||||
#include <gui/elements.h>
|
||||
|
||||
@@ -21,6 +22,10 @@ static void loclass_draw_callback(Canvas* canvas, void* model) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
canvas_draw_str_aligned(canvas, 64, 0, AlignCenter, AlignTop, furi_string_get_cstr(m->header));
|
||||
|
||||
if(m->num_macs == 255) {
|
||||
return;
|
||||
}
|
||||
|
||||
float progress = m->num_macs == 0 ? 0 :
|
||||
(float)(m->num_macs) / (float)(LOCLASS_MACS_TO_COLLECT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user