#pragma once #include #include #include #include #include "m-string.h" #include #include #include #include #include #include #include #define TAG "SUBBRUTE" typedef enum { NoneScene, SceneSelectFile, SceneSelectField, SceneAttack, SceneEntryPoint } SubBruteScene; typedef enum { SubBruteAttackLoadFile, SubBruteAttackCAME12bit433, SubBruteAttackCAME12bit868, SubBruteAttackChamberlain9bit315, SubBruteAttackChamberlain9bit390, SubBruteAttackLinear10bit300, SubBruteAttackLinear10bit310, SubBruteAttackNICE12bit433, SubBruteAttackNICE12bit868, } SubBruteAttacks; typedef enum { EventTypeTick, EventTypeKey, } EventType; typedef struct { EventType evt_type; InputKey key; InputType input_type; } SubBruteEvent; // STRUCTS typedef struct { // Application stuff bool is_running; bool is_attacking; SubBruteScene current_scene; SubBruteScene previous_scene; NotificationApp* notify; // SubGhz Stuff FlipperFormat* flipper_format; SubGhzEnvironment* environment; SubGhzTransmitter* transmitter; SubGhzReceiver* receiver; SubGhzProtocolDecoderBase* decoder_result; string_t preset; Stream* stream; string_t protocol; uint32_t frequency; uint32_t repeat; uint32_t bit; string_t key; uint32_t te; // Context Stuff DialogsApp* dialogs; string_t file_path; string_t file_path_tmp; string_t notification_msg; uint8_t key_index; uint64_t payload; string_t candidate; uint8_t str_index; string_t flipper_format_string; SubBruteAttacks attack; //Menu stuff uint8_t menu_index; // RAW stuff string_t subbrute_raw_one; string_t subbrute_raw_zero; string_t subbrute_raw_stop; } SubBruteState;