mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-24 05:34:45 -07:00
marauder upd
This commit is contained in:
@@ -34,7 +34,7 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
|
|||||||
app->text_box_store_strlen = 0;
|
app->text_box_store_strlen = 0;
|
||||||
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
||||||
const char* help_msg =
|
const char* help_msg =
|
||||||
"Marauder companion v0.2.1\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
"Marauder companion v0.2.2\nFor app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
||||||
furi_string_cat_str(app->text_box_store, help_msg);
|
furi_string_cat_str(app->text_box_store, help_msg);
|
||||||
app->text_box_store_strlen += strlen(help_msg);
|
app->text_box_store_strlen += strlen(help_msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,15 +60,7 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
|
|||||||
{"Sniff",
|
{"Sniff",
|
||||||
{"beacon", "deauth", "esp", "pmkid", "probe", "pwn", "raw", "bt", "skim"},
|
{"beacon", "deauth", "esp", "pmkid", "probe", "pwn", "raw", "bt", "skim"},
|
||||||
9,
|
9,
|
||||||
{"sniffbeacon",
|
{"sniffbeacon", "sniffdeauth", "sniffesp", "sniffpmkid", "sniffprobe", "sniffpwn", "sniffraw", "sniffbt", "sniffskim"},
|
||||||
"sniffdeauth",
|
|
||||||
"sniffesp",
|
|
||||||
"sniffpmkid",
|
|
||||||
"sniffprobe",
|
|
||||||
"sniffpwn",
|
|
||||||
"sniffraw",
|
|
||||||
"sniffbt",
|
|
||||||
"sniffskim"},
|
|
||||||
NO_ARGS,
|
NO_ARGS,
|
||||||
FOCUS_CONSOLE_END,
|
FOCUS_CONSOLE_END,
|
||||||
SHOW_STOPSCAN_TIP},
|
SHOW_STOPSCAN_TIP},
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ void wifi_marauder_uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context)
|
|||||||
static int32_t uart_worker(void* context) {
|
static int32_t uart_worker(void* context) {
|
||||||
WifiMarauderUart* uart = (void*)context;
|
WifiMarauderUart* uart = (void*)context;
|
||||||
|
|
||||||
uart->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
uint32_t events =
|
uint32_t events =
|
||||||
furi_thread_flags_wait(WORKER_ALL_RX_EVENTS, FuriFlagWaitAny, FuriWaitForever);
|
furi_thread_flags_wait(WORKER_ALL_RX_EVENTS, FuriFlagWaitAny, FuriWaitForever);
|
||||||
@@ -65,18 +63,19 @@ void wifi_marauder_uart_tx(uint8_t* data, size_t len) {
|
|||||||
WifiMarauderUart* wifi_marauder_uart_init(WifiMarauderApp* app) {
|
WifiMarauderUart* wifi_marauder_uart_init(WifiMarauderApp* app) {
|
||||||
WifiMarauderUart* uart = malloc(sizeof(WifiMarauderUart));
|
WifiMarauderUart* uart = malloc(sizeof(WifiMarauderUart));
|
||||||
|
|
||||||
furi_hal_console_disable();
|
|
||||||
furi_hal_uart_set_br(UART_CH, BAUDRATE);
|
|
||||||
furi_hal_uart_set_irq_cb(UART_CH, wifi_marauder_uart_on_irq_cb, uart);
|
|
||||||
|
|
||||||
uart->app = app;
|
uart->app = app;
|
||||||
|
uart->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
|
||||||
uart->rx_thread = furi_thread_alloc();
|
uart->rx_thread = furi_thread_alloc();
|
||||||
furi_thread_set_name(uart->rx_thread, "WifiMarauderUartRxThread");
|
furi_thread_set_name(uart->rx_thread, "WifiMarauderUartRxThread");
|
||||||
furi_thread_set_stack_size(uart->rx_thread, 1024);
|
furi_thread_set_stack_size(uart->rx_thread, 1024);
|
||||||
furi_thread_set_context(uart->rx_thread, uart);
|
furi_thread_set_context(uart->rx_thread, uart);
|
||||||
furi_thread_set_callback(uart->rx_thread, uart_worker);
|
furi_thread_set_callback(uart->rx_thread, uart_worker);
|
||||||
|
|
||||||
furi_thread_start(uart->rx_thread);
|
furi_thread_start(uart->rx_thread);
|
||||||
|
|
||||||
|
furi_hal_console_disable();
|
||||||
|
furi_hal_uart_set_br(UART_CH, BAUDRATE);
|
||||||
|
furi_hal_uart_set_irq_cb(UART_CH, wifi_marauder_uart_on_irq_cb, uart);
|
||||||
|
|
||||||
return uart;
|
return uart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user