fix unirf crash, fix keeloq seed display, fix flipfrid
and add new unirf icon(animated) by Svarich
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
|
@ -95,7 +95,7 @@ static void flipfrid_draw_callback(Canvas* const canvas, void* ctx) {
|
|||
|
||||
if(flipfrid_state->current_attack_type == BruteForceCustomerId) {
|
||||
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");
|
||||
} else {
|
||||
snprintf(
|
||||
|
@ -142,7 +142,7 @@ static void flipfrid_timer_callback(FuriMessageQueue* event_queue) {
|
|||
// ENTRYPOINT
|
||||
int32_t flipfrid_start(void* p) {
|
||||
UNUSED(p);
|
||||
|
||||
|
||||
// Input
|
||||
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(FlipFridEvent));
|
||||
FlipFridState* flipfrid_state = (FlipFridState*)malloc(sizeof(FlipFridState));
|
||||
|
@ -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;
|
||||
|
@ -255,38 +261,38 @@ int32_t flipfrid_start(void* p) {
|
|||
lfrfid_worker_stop_thread(worker);
|
||||
// set next value
|
||||
switch(flipfrid_state->current_attack_type) {
|
||||
case DefaultKeys: {
|
||||
selectedProtocol = CLEAN;
|
||||
data_size = 5;
|
||||
flipfrid_state->current_uid = id_list[attack_state];
|
||||
attack_state = attack_state + 1;
|
||||
if(attack_state >= sizeof(id_list) / sizeof(id_list[0])) {
|
||||
attack_state = 0;
|
||||
}
|
||||
break;
|
||||
case DefaultKeys: {
|
||||
selectedProtocol = CLEAN;
|
||||
data_size = 5;
|
||||
flipfrid_state->current_uid = id_list[attack_state];
|
||||
attack_state = attack_state + 1;
|
||||
if(attack_state >= sizeof(id_list) / sizeof(id_list[0])) {
|
||||
attack_state = 0;
|
||||
}
|
||||
case BruteForceCustomerId: {
|
||||
data_size = 5;
|
||||
selectedProtocol = CLEAN;
|
||||
candidate[0] = attack_state;
|
||||
flipfrid_state->current_uid = candidate;
|
||||
attack_state = attack_state + 1;
|
||||
if((attack_state + 1) == 256) {
|
||||
attack_state = 0;
|
||||
}
|
||||
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;
|
||||
break;
|
||||
}
|
||||
case BruteForceCustomerId: {
|
||||
data_size = 5;
|
||||
selectedProtocol = CLEAN;
|
||||
candidate[0] = attack_state;
|
||||
flipfrid_state->current_uid = candidate;
|
||||
attack_state = attack_state + 1;
|
||||
if((attack_state + 1) == 256) {
|
||||
attack_state = 0;
|
||||
}
|
||||
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) {
|
||||
|
|
|
@ -36,7 +36,6 @@ App(
|
|||
provides=[
|
||||
"music_player",
|
||||
"bt_hid",
|
||||
"flipfrid",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -78,5 +77,6 @@ App(
|
|||
"wifi_scanner",
|
||||
"wav_player",
|
||||
"multi_converter",
|
||||
"flipfrid",
|
||||
],
|
||||
)
|
|
@ -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) {
|
||||
exit_loop = true;
|
||||
}
|
||||
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;
|
||||
}
|
||||
exit_loop = true;
|
||||
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_lo = code_found_reverse & 0x00000000ffffffff;
|
||||
|
||||
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 Sd:%08lX",
|
||||
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,
|
||||
instance->generic.seed);
|
||||
if(strcmp(instance->manufacture_name, "BFT") == 0) {
|
||||
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 Sd:%08lX",
|
||||
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,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|