fix unirf crash, fix keeloq seed display, fix flipfrid
and add new unirf icon(animated) by Svarich
|
@ -1,11 +1,10 @@
|
||||||
App(
|
App(
|
||||||
appid="flipfrid",
|
appid="flipfrid",
|
||||||
name="Rfid fuzzer",
|
name="RFID Fuzzer",
|
||||||
apptype=FlipperAppType.PLUGIN,
|
apptype=FlipperAppType.PLUGIN,
|
||||||
entry_point="flipfrid_start",
|
entry_point="flipfrid_start",
|
||||||
cdefines=["APP_FLIP_FRID"],
|
cdefines=["APP_FLIP_FRID"],
|
||||||
requires=["gui"],
|
requires=["gui"],
|
||||||
stack_size=1 * 1024,
|
stack_size=1 * 1024,
|
||||||
icon="A_125khz_14",
|
order=29,
|
||||||
order=185,
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "flipfrid.h"
|
#include "flipfrid.h"
|
||||||
|
|
||||||
#define NUMBER_OF_ATTACKS 4
|
#define NUMBER_OF_ATTACKS 3
|
||||||
#define TIME_BETWEEN_CARDS \
|
#define TIME_BETWEEN_CARDS \
|
||||||
5 // Emulate 2 cards per second : (5 * (configTICK_RATE_HZ_RAW/10)) == (5*(1000/10)) == (5*100) == (500)ms
|
5 // Emulate 2 cards per second : (5 * (configTICK_RATE_HZ_RAW/10)) == (5*(1000/10)) == (5*100) == (500)ms
|
||||||
#define TAG "FLIPFRID"
|
#define TAG "FLIPFRID"
|
||||||
|
@ -95,7 +95,7 @@ static void flipfrid_draw_callback(Canvas* const canvas, void* ctx) {
|
||||||
|
|
||||||
if(flipfrid_state->current_attack_type == BruteForceCustomerId) {
|
if(flipfrid_state->current_attack_type == BruteForceCustomerId) {
|
||||||
snprintf(uid, sizeof(uid), " ID : %2X ", flipfrid_state->current_uid[0]);
|
snprintf(uid, sizeof(uid), " ID : %2X ", flipfrid_state->current_uid[0]);
|
||||||
} else if (flipfrid_state->current_attack_type == BadCrc) {
|
} else if(flipfrid_state->current_attack_type == BadCrc) {
|
||||||
snprintf(uid, sizeof(uid), "Sending packets");
|
snprintf(uid, sizeof(uid), "Sending packets");
|
||||||
} else {
|
} else {
|
||||||
snprintf(
|
snprintf(
|
||||||
|
@ -142,7 +142,7 @@ static void flipfrid_timer_callback(FuriMessageQueue* event_queue) {
|
||||||
// ENTRYPOINT
|
// ENTRYPOINT
|
||||||
int32_t flipfrid_start(void* p) {
|
int32_t flipfrid_start(void* p) {
|
||||||
UNUSED(p);
|
UNUSED(p);
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(FlipFridEvent));
|
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(FlipFridEvent));
|
||||||
FlipFridState* flipfrid_state = (FlipFridState*)malloc(sizeof(FlipFridState));
|
FlipFridState* flipfrid_state = (FlipFridState*)malloc(sizeof(FlipFridState));
|
||||||
|
@ -207,6 +207,8 @@ int32_t flipfrid_start(void* p) {
|
||||||
case InputKeyRight:
|
case InputKeyRight:
|
||||||
// Next badge type
|
// Next badge type
|
||||||
flipfrid_state->emitting = false;
|
flipfrid_state->emitting = false;
|
||||||
|
attack_state = 0;
|
||||||
|
notification_message(flipfrid_state->notify, &sequence_blink_stop);
|
||||||
if(menu_selected_item_index < (NUMBER_OF_ATTACKS - 1)) {
|
if(menu_selected_item_index < (NUMBER_OF_ATTACKS - 1)) {
|
||||||
menu_selected_item_index++;
|
menu_selected_item_index++;
|
||||||
flipfrid_state->current_attack_type =
|
flipfrid_state->current_attack_type =
|
||||||
|
@ -216,6 +218,8 @@ int32_t flipfrid_start(void* p) {
|
||||||
case InputKeyLeft:
|
case InputKeyLeft:
|
||||||
// Previous badge type
|
// Previous badge type
|
||||||
flipfrid_state->emitting = false;
|
flipfrid_state->emitting = false;
|
||||||
|
attack_state = 0;
|
||||||
|
notification_message(flipfrid_state->notify, &sequence_blink_stop);
|
||||||
if(menu_selected_item_index > 0) {
|
if(menu_selected_item_index > 0) {
|
||||||
menu_selected_item_index--;
|
menu_selected_item_index--;
|
||||||
flipfrid_state->current_attack_type =
|
flipfrid_state->current_attack_type =
|
||||||
|
@ -232,10 +236,12 @@ int32_t flipfrid_start(void* p) {
|
||||||
flipfrid_state->emitting = true;
|
flipfrid_state->emitting = true;
|
||||||
attack_state = 0;
|
attack_state = 0;
|
||||||
// TODO FIX BLINK
|
// TODO FIX BLINK
|
||||||
notification_message(flipfrid_state->notify, &sequence_blink_start_magenta);
|
notification_message(
|
||||||
|
flipfrid_state->notify, &sequence_blink_start_blue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case InputKeyBack:
|
case InputKeyBack:
|
||||||
|
notification_message(flipfrid_state->notify, &sequence_blink_stop);
|
||||||
flipfrid_state->emitting = false;
|
flipfrid_state->emitting = false;
|
||||||
running = false;
|
running = false;
|
||||||
break;
|
break;
|
||||||
|
@ -255,38 +261,38 @@ int32_t flipfrid_start(void* p) {
|
||||||
lfrfid_worker_stop_thread(worker);
|
lfrfid_worker_stop_thread(worker);
|
||||||
// set next value
|
// set next value
|
||||||
switch(flipfrid_state->current_attack_type) {
|
switch(flipfrid_state->current_attack_type) {
|
||||||
case DefaultKeys: {
|
case DefaultKeys: {
|
||||||
selectedProtocol = CLEAN;
|
selectedProtocol = CLEAN;
|
||||||
data_size = 5;
|
data_size = 5;
|
||||||
flipfrid_state->current_uid = id_list[attack_state];
|
flipfrid_state->current_uid = id_list[attack_state];
|
||||||
attack_state = attack_state + 1;
|
attack_state = attack_state + 1;
|
||||||
if(attack_state >= sizeof(id_list) / sizeof(id_list[0])) {
|
if(attack_state >= sizeof(id_list) / sizeof(id_list[0])) {
|
||||||
attack_state = 0;
|
attack_state = 0;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case BruteForceCustomerId: {
|
break;
|
||||||
data_size = 5;
|
}
|
||||||
selectedProtocol = CLEAN;
|
case BruteForceCustomerId: {
|
||||||
candidate[0] = attack_state;
|
data_size = 5;
|
||||||
flipfrid_state->current_uid = candidate;
|
selectedProtocol = CLEAN;
|
||||||
attack_state = attack_state + 1;
|
candidate[0] = attack_state;
|
||||||
if((attack_state + 1) == 256) {
|
flipfrid_state->current_uid = candidate;
|
||||||
attack_state = 0;
|
attack_state = attack_state + 1;
|
||||||
}
|
if((attack_state + 1) == 256) {
|
||||||
break;
|
attack_state = 0;
|
||||||
}
|
|
||||||
case BadCrc: {
|
|
||||||
selectedProtocol = BAD_CRC;
|
|
||||||
data_size = 5;
|
|
||||||
candidate[0] = 0xFF;
|
|
||||||
candidate[1] = 0xDE;
|
|
||||||
candidate[2] = 0xAD;
|
|
||||||
candidate[3] = 0xBE;
|
|
||||||
candidate[4] = 0xEF;
|
|
||||||
flipfrid_state->current_uid = candidate;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BadCrc: {
|
||||||
|
selectedProtocol = BAD_CRC;
|
||||||
|
data_size = 5;
|
||||||
|
candidate[0] = 0xFF;
|
||||||
|
candidate[1] = 0xDE;
|
||||||
|
candidate[2] = 0xAD;
|
||||||
|
candidate[3] = 0xBE;
|
||||||
|
candidate[4] = 0xEF;
|
||||||
|
flipfrid_state->current_uid = candidate;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(counter > TIME_BETWEEN_CARDS) {
|
if(counter > TIME_BETWEEN_CARDS) {
|
||||||
|
|
|
@ -36,7 +36,6 @@ App(
|
||||||
provides=[
|
provides=[
|
||||||
"music_player",
|
"music_player",
|
||||||
"bt_hid",
|
"bt_hid",
|
||||||
"flipfrid",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -78,5 +77,6 @@ App(
|
||||||
"wifi_scanner",
|
"wifi_scanner",
|
||||||
"wav_player",
|
"wav_player",
|
||||||
"multi_converter",
|
"multi_converter",
|
||||||
|
"flipfrid",
|
||||||
],
|
],
|
||||||
)
|
)
|
|
@ -86,7 +86,6 @@ typedef struct {
|
||||||
SubGhzTransmitter* tx_transmitter;
|
SubGhzTransmitter* tx_transmitter;
|
||||||
FlipperFormat* tx_fff_data;
|
FlipperFormat* tx_fff_data;
|
||||||
const char* tx_file_path;
|
const char* tx_file_path;
|
||||||
//int repeat;
|
|
||||||
int button;
|
int button;
|
||||||
|
|
||||||
int file_result;
|
int file_result;
|
||||||
|
@ -457,7 +456,9 @@ bool unirfremix_set_preset(UniRFPreset* p, const char* preset) {
|
||||||
} else if(!strcmp(preset, "FuriHalSubGhzPreset2FSKDev476Async")) {
|
} else if(!strcmp(preset, "FuriHalSubGhzPreset2FSKDev476Async")) {
|
||||||
string_set(p->name, "FM476");
|
string_set(p->name, "FM476");
|
||||||
} else if(!strcmp(preset, "FuriHalSubGhzPresetCustom")) {
|
} 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 {
|
} else {
|
||||||
FURI_LOG_E(TAG, "Unsupported preset");
|
FURI_LOG_E(TAG, "Unsupported preset");
|
||||||
return false;
|
return false;
|
||||||
|
@ -501,6 +502,8 @@ bool unirfremix_key_load(
|
||||||
}
|
}
|
||||||
if(!strcmp(string_get_cstr(temp_str), "FuriHalSubGhzPresetCustom")) {
|
if(!strcmp(string_get_cstr(temp_str), "FuriHalSubGhzPresetCustom")) {
|
||||||
// TODO: check if preset is custom
|
// TODO: check if preset is custom
|
||||||
|
FURI_LOG_E(TAG, "Could not use custom preset");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
size_t preset_index =
|
size_t preset_index =
|
||||||
subghz_setting_get_inx_preset_by_name(setting, string_get_cstr(preset->name));
|
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) {
|
void unirfremix_tx_stop(UniRFRemix* app) {
|
||||||
|
if(app->processing == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!string_cmp_str(app->txpreset->protocol, "RAW")) {
|
if(!string_cmp_str(app->txpreset->protocol, "RAW")) {
|
||||||
while(!furi_hal_subghz_is_async_tx_complete()) {
|
while(!furi_hal_subghz_is_async_tx_complete()) {
|
||||||
furi_delay_ms(60);
|
furi_delay_ms(15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Stop TX
|
//Stop TX
|
||||||
furi_hal_subghz_stop_async_tx();
|
furi_hal_subghz_stop_async_tx();
|
||||||
FURI_LOG_I(TAG, "TX Done!");
|
FURI_LOG_I(TAG, "TX Done!");
|
||||||
|
@ -1062,9 +1070,8 @@ int32_t unirfremix_app(void* p) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case InputKeyBack:
|
case InputKeyBack:
|
||||||
if(input.type == InputTypeShort) {
|
unirfremix_tx_stop(app);
|
||||||
exit_loop = true;
|
exit_loop = true;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,9 +1142,7 @@ int32_t unirfremix_app(void* p) {
|
||||||
case InputKeyOk:
|
case InputKeyOk:
|
||||||
break;
|
break;
|
||||||
case InputKeyBack:
|
case InputKeyBack:
|
||||||
if(input.type == InputTypeShort) {
|
exit_loop = true;
|
||||||
exit_loop = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 1.6 KiB |
BIN
assets/icons/MainMenu/UniRFRemix_14/frame_6.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/icons/MainMenu/UniRFRemix_14/frame_7.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -1 +1 @@
|
||||||
3
|
4
|
||||||
|
|
|
@ -944,21 +944,40 @@ 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_hi = code_found_reverse >> 32;
|
||||||
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
|
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
|
||||||
|
|
||||||
string_cat_printf(
|
if(strcmp(instance->manufacture_name, "BFT") == 0) {
|
||||||
output,
|
string_cat_printf(
|
||||||
"%s %dbit\r\n"
|
output,
|
||||||
"Key:%08lX%08lX\r\n"
|
"%s %dbit\r\n"
|
||||||
"Fix:0x%08lX Cnt:%04X\r\n"
|
"Key:%08lX%08lX\r\n"
|
||||||
"Hop:0x%08lX Btn:%01lX\r\n"
|
"Fix:0x%08lX Cnt:%04X\r\n"
|
||||||
"MF:%s Sd:%08lX",
|
"Hop:0x%08lX Btn:%01lX\r\n"
|
||||||
instance->generic.protocol_name,
|
"MF:%s Sd:%08lX",
|
||||||
instance->generic.data_count_bit,
|
instance->generic.protocol_name,
|
||||||
code_found_hi,
|
instance->generic.data_count_bit,
|
||||||
code_found_lo,
|
code_found_hi,
|
||||||
code_found_reverse_hi,
|
code_found_lo,
|
||||||
instance->generic.cnt,
|
code_found_reverse_hi,
|
||||||
code_found_reverse_lo,
|
instance->generic.cnt,
|
||||||
instance->generic.btn,
|
code_found_reverse_lo,
|
||||||
instance->manufacture_name,
|
instance->generic.btn,
|
||||||
instance->generic.seed);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|