fix unirf crash, fix keeloq seed display, fix flipfrid

and add new unirf icon(animated) by Svarich
This commit is contained in:
MX
2022-08-25 03:21:44 +03:00
parent b31e4a36a8
commit f9d3d6bf5c
14 changed files with 94 additions and 65 deletions

View File

@@ -1,11 +1,10 @@
App(
appid="flipfrid",
name="Rfid fuzzer",
name="RFID Fuzzer",
apptype=FlipperAppType.PLUGIN,
entry_point="flipfrid_start",
cdefines=["APP_FLIP_FRID"],
requires=["gui"],
stack_size=1 * 1024,
icon="A_125khz_14",
order=185,
order=29,
)

View File

@@ -9,7 +9,7 @@
#include "flipfrid.h"
#define NUMBER_OF_ATTACKS 4
#define NUMBER_OF_ATTACKS 3
#define TIME_BETWEEN_CARDS \
5 // Emulate 2 cards per second : (5 * (configTICK_RATE_HZ_RAW/10)) == (5*(1000/10)) == (5*100) == (500)ms
#define TAG "FLIPFRID"
@@ -207,6 +207,8 @@ int32_t flipfrid_start(void* p) {
case InputKeyRight:
// Next badge type
flipfrid_state->emitting = false;
attack_state = 0;
notification_message(flipfrid_state->notify, &sequence_blink_stop);
if(menu_selected_item_index < (NUMBER_OF_ATTACKS - 1)) {
menu_selected_item_index++;
flipfrid_state->current_attack_type =
@@ -216,6 +218,8 @@ int32_t flipfrid_start(void* p) {
case InputKeyLeft:
// Previous badge type
flipfrid_state->emitting = false;
attack_state = 0;
notification_message(flipfrid_state->notify, &sequence_blink_stop);
if(menu_selected_item_index > 0) {
menu_selected_item_index--;
flipfrid_state->current_attack_type =
@@ -232,10 +236,12 @@ int32_t flipfrid_start(void* p) {
flipfrid_state->emitting = true;
attack_state = 0;
// TODO FIX BLINK
notification_message(flipfrid_state->notify, &sequence_blink_start_magenta);
notification_message(
flipfrid_state->notify, &sequence_blink_start_blue);
}
break;
case InputKeyBack:
notification_message(flipfrid_state->notify, &sequence_blink_stop);
flipfrid_state->emitting = false;
running = false;
break;

View File

@@ -36,7 +36,6 @@ App(
provides=[
"music_player",
"bt_hid",
"flipfrid",
],
)
@@ -78,5 +77,6 @@ App(
"wifi_scanner",
"wav_player",
"multi_converter",
"flipfrid",
],
)

View File

@@ -86,7 +86,6 @@ typedef struct {
SubGhzTransmitter* tx_transmitter;
FlipperFormat* tx_fff_data;
const char* tx_file_path;
//int repeat;
int button;
int file_result;
@@ -457,7 +456,9 @@ bool unirfremix_set_preset(UniRFPreset* p, const char* preset) {
} else if(!strcmp(preset, "FuriHalSubGhzPreset2FSKDev476Async")) {
string_set(p->name, "FM476");
} else if(!strcmp(preset, "FuriHalSubGhzPresetCustom")) {
string_set(p->name, "CUSTOM");
FURI_LOG_E(TAG, "Custom preset unsupported now");
return false;
// string_set(p->name, "CUSTOM");
} else {
FURI_LOG_E(TAG, "Unsupported preset");
return false;
@@ -501,6 +502,8 @@ bool unirfremix_key_load(
}
if(!strcmp(string_get_cstr(temp_str), "FuriHalSubGhzPresetCustom")) {
// TODO: check if preset is custom
FURI_LOG_E(TAG, "Could not use custom preset");
break;
}
size_t preset_index =
subghz_setting_get_inx_preset_by_name(setting, string_get_cstr(preset->name));
@@ -583,11 +586,16 @@ bool unirfremix_save_protocol_to_file(FlipperFormat* fff_file, const char* dev_f
}
void unirfremix_tx_stop(UniRFRemix* app) {
if(app->processing == 0) {
return;
}
if(!string_cmp_str(app->txpreset->protocol, "RAW")) {
while(!furi_hal_subghz_is_async_tx_complete()) {
furi_delay_ms(60);
furi_delay_ms(15);
}
}
//Stop TX
furi_hal_subghz_stop_async_tx();
FURI_LOG_I(TAG, "TX Done!");
@@ -1062,9 +1070,8 @@ int32_t unirfremix_app(void* p) {
break;
case InputKeyBack:
if(input.type == InputTypeShort) {
unirfremix_tx_stop(app);
exit_loop = true;
}
break;
}
@@ -1135,9 +1142,7 @@ int32_t unirfremix_app(void* p) {
case InputKeyOk:
break;
case InputKeyBack:
if(input.type == InputTypeShort) {
exit_loop = true;
}
break;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1 +1 @@
3
4

View File

@@ -944,6 +944,7 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) {
uint32_t code_found_reverse_hi = code_found_reverse >> 32;
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
if(strcmp(instance->manufacture_name, "BFT") == 0) {
string_cat_printf(
output,
"%s %dbit\r\n"
@@ -961,4 +962,22 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) {
instance->generic.btn,
instance->manufacture_name,
instance->generic.seed);
} else {
string_cat_printf(
output,
"%s %dbit\r\n"
"Key:%08lX%08lX\r\n"
"Fix:0x%08lX Cnt:%04X\r\n"
"Hop:0x%08lX Btn:%01lX\r\n"
"MF:%s",
instance->generic.protocol_name,
instance->generic.data_count_bit,
code_found_hi,
code_found_lo,
code_found_reverse_hi,
instance->generic.cnt,
code_found_reverse_lo,
instance->generic.btn,
instance->manufacture_name);
}
}