mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-29 02:08:10 -07:00
remove unnecessary checks from brute plugin, subghz improvements
fix subghz gui in add manually, add BETT protocol in add manually
This commit is contained in:
@@ -106,10 +106,10 @@ bool subbrute_worker_start(
|
||||
furi_hal_subghz_set_frequency_and_path(instance->frequency);
|
||||
furi_hal_subghz_flush_rx();
|
||||
|
||||
if(furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||
instance->frequency = frequency;
|
||||
res = true;
|
||||
}
|
||||
//if(furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||
instance->frequency = frequency;
|
||||
res = true;
|
||||
//}
|
||||
instance->worker_running = res;
|
||||
|
||||
#ifdef FURI_DEBUG
|
||||
@@ -245,13 +245,13 @@ bool subbrute_worker_init_manual_transmit(
|
||||
furi_hal_subghz_set_frequency_and_path(instance->frequency);
|
||||
furi_hal_subghz_flush_rx();
|
||||
|
||||
if(!furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||
/*if(!furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||
FURI_LOG_E(TAG, "Frequency: %d invalid!", frequency);
|
||||
|
||||
instance->frequency = frequency;
|
||||
instance->worker_manual_mode = false;
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_I(TAG, "Frequency: %d", frequency);
|
||||
|
||||
@@ -21,31 +21,31 @@
|
||||
#define TAG "SubBruteApp"
|
||||
|
||||
static const char* subbrute_menu_names[] = {
|
||||
[SubBruteAttackCAME12bit307] = "CAME 12bit 307mhz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 12bit 433mhz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 12bit 868mhz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Chamberlain 9bit 300mhz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Chamberlain 9bit 315mhz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Chamberlain 9bit 390mhz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 10bit 300mhz",
|
||||
[SubBruteAttackLinear10bit310] = "Linear 10bit 310mhz",
|
||||
[SubBruteAttackNICE12bit433] = "NICE 12bit 433mhz",
|
||||
[SubBruteAttackNICE12bit868] = "NICE 12bit 868mhz",
|
||||
[SubBruteAttackCAME12bit307] = "CAME 12bit 307MHz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 12bit 433MHz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 12bit 868MHz",
|
||||
[SubBruteAttackNICE12bit433] = "NICE 12bit 433MHz",
|
||||
[SubBruteAttackNICE12bit868] = "NICE 12bit 868MHz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Chamberlain 9bit 300MHz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Chamberlain 9bit 315MHz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Chamberlain 9bit 390MHz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 10bit 300MHz",
|
||||
[SubBruteAttackLinear10bit310] = "Linear 10bit 310MHz",
|
||||
[SubBruteAttackLoadFile] = "BF existing dump",
|
||||
[SubBruteAttackTotalCount] = "Total Count",
|
||||
};
|
||||
|
||||
static const char* subbrute_menu_names_small[] = {
|
||||
[SubBruteAttackCAME12bit307] = "CAME 307mhz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 433mhz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 868mhz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Cham 300mhz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Cham 315mhz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Cham 390mhz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 300mhz",
|
||||
[SubBruteAttackLinear10bit310] = "Linear 310mhz",
|
||||
[SubBruteAttackNICE12bit433] = "NICE 433mhz",
|
||||
[SubBruteAttackNICE12bit868] = "NICE 868mhz",
|
||||
[SubBruteAttackCAME12bit307] = "CAME 307MHz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 433MHz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 868MHz",
|
||||
[SubBruteAttackNICE12bit433] = "NICE 433MHz",
|
||||
[SubBruteAttackNICE12bit868] = "NICE 868MHz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Cham 300MHz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Cham 315MHz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Cham 390MHz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 300MHz",
|
||||
[SubBruteAttackLinear10bit310] = "Linear 310MHz",
|
||||
[SubBruteAttackLoadFile] = "Existing",
|
||||
[SubBruteAttackTotalCount] = "Total Count",
|
||||
};
|
||||
|
||||
@@ -307,19 +307,15 @@ SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* instance, SubBrute
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
break;
|
||||
case SubBruteAttackChamberlain9bit300:
|
||||
instance->frequency = 300000000;
|
||||
instance->bit = 9;
|
||||
string_set_str(instance->protocol_name, protocol_cham_code);
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
break;
|
||||
case SubBruteAttackChamberlain9bit315:
|
||||
instance->frequency = 315000000;
|
||||
instance->bit = 9;
|
||||
string_set_str(instance->protocol_name, protocol_cham_code);
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
break;
|
||||
case SubBruteAttackChamberlain9bit390:
|
||||
instance->frequency = 390000000;
|
||||
if(type == SubBruteAttackChamberlain9bit300) {
|
||||
instance->frequency = 300000000;
|
||||
} else if(type == SubBruteAttackChamberlain9bit315) {
|
||||
instance->frequency = 315000000;
|
||||
} else /* ALWAYS TRUE if(type == SubBruteAttackChamberlain9bit390) */ {
|
||||
instance->frequency = 390000000;
|
||||
}
|
||||
instance->bit = 9;
|
||||
string_set_str(instance->protocol_name, protocol_cham_code);
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
@@ -353,10 +349,10 @@ SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* instance, SubBrute
|
||||
return SubBruteFileResultProtocolNotFound; // RETURN
|
||||
}
|
||||
|
||||
if(!furi_hal_subghz_is_tx_allowed(instance->frequency)) {
|
||||
/*if(!furi_hal_subghz_is_tx_allowed(instance->frequency)) {
|
||||
FURI_LOG_E(TAG, "Frequency invalid: %d", instance->frequency);
|
||||
return SubBruteFileResultMissingOrIncorrectFrequency; // RETURN
|
||||
}
|
||||
}*/
|
||||
|
||||
// For non-file types we didn't set SubGhzProtocolDecoderBase
|
||||
instance->receiver = subghz_receiver_alloc_init(instance->environment);
|
||||
|
||||
@@ -20,13 +20,13 @@ typedef enum {
|
||||
SubBruteAttackCAME12bit307,
|
||||
SubBruteAttackCAME12bit433,
|
||||
SubBruteAttackCAME12bit868,
|
||||
SubBruteAttackNICE12bit433,
|
||||
SubBruteAttackNICE12bit868,
|
||||
SubBruteAttackChamberlain9bit300,
|
||||
SubBruteAttackChamberlain9bit315,
|
||||
SubBruteAttackChamberlain9bit390,
|
||||
SubBruteAttackLinear10bit300,
|
||||
SubBruteAttackLinear10bit310,
|
||||
SubBruteAttackNICE12bit433,
|
||||
SubBruteAttackNICE12bit868,
|
||||
SubBruteAttackLoadFile,
|
||||
SubBruteAttackTotalCount,
|
||||
} SubBruteAttacks;
|
||||
|
||||
Reference in New Issue
Block a user