From 9b20b2871b574a582701ba0c3ca6de88463f1187 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Wed, 26 Oct 2022 17:41:25 -0400 Subject: [PATCH] Revert "Deauther Upd" This reverts commit f8f9993a41f665b8974f24fe9f394e3a48f0a8fa. --- .../plugins/wifi_deauther/application.fam | 4 ++-- .../wifi_deauther_scene_console_output.c | 20 +++++++++---------- .../plugins/wifi_deauther/wifi_deauther_app.c | 8 ++++---- .../wifi_deauther/wifi_deauther_app_i.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/applications/plugins/wifi_deauther/application.fam b/applications/plugins/wifi_deauther/application.fam index 80724181e..71dd45079 100644 --- a/applications/plugins/wifi_deauther/application.fam +++ b/applications/plugins/wifi_deauther/application.fam @@ -1,6 +1,6 @@ App( - appid="ESP8266_Wifi_Deauther_V2", - name="[ESP8266] WiFi (Deauther) V2", + appid="ESP8266_Wifi_Deauther", + name="[ESP8266] WiFi (Deauther)", apptype=FlipperAppType.EXTERNAL, entry_point="wifi_deauther_app", cdefines=["APP_WIFI_deauther"], diff --git a/applications/plugins/wifi_deauther/scenes/wifi_deauther_scene_console_output.c b/applications/plugins/wifi_deauther/scenes/wifi_deauther_scene_console_output.c index 52ddb80b2..19d3ef813 100644 --- a/applications/plugins/wifi_deauther/scenes/wifi_deauther_scene_console_output.c +++ b/applications/plugins/wifi_deauther/scenes/wifi_deauther_scene_console_output.c @@ -7,13 +7,13 @@ void wifi_deauther_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, vo // If text box store gets too big, then truncate it app->text_box_store_strlen += len; if(app->text_box_store_strlen >= WIFI_deauther_TEXT_BOX_STORE_SIZE - 1) { - string_right(app->text_box_store, app->text_box_store_strlen / 2); - app->text_box_store_strlen = string_size(app->text_box_store); + furi_string_right(app->text_box_store, app->text_box_store_strlen / 2); + app->text_box_store_strlen = furi_string_size(app->text_box_store); } // Null-terminate buf and append to text box store buf[len] = '\0'; - string_cat_printf(app->text_box_store, "%s", buf); + furi_string_cat_printf(app->text_box_store, "%s", buf); view_dispatcher_send_custom_event(app->view_dispatcher, WifideautherEventRefreshConsoleOutput); } @@ -30,22 +30,22 @@ void wifi_deauther_scene_console_output_on_enter(void* context) { text_box_set_focus(text_box, TextBoxFocusEnd); } if(app->is_command) { - string_reset(app->text_box_store); + furi_string_reset(app->text_box_store); app->text_box_store_strlen = 0; if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) { const char* help_msg = - "For app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)/B4 was here\n"; - string_cat_str(app->text_box_store, help_msg); + "For app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n"; + furi_string_cat_str(app->text_box_store, help_msg); app->text_box_store_strlen += strlen(help_msg); } if(app->show_stopscan_tip) { - const char* help_msg = "Press BACK button to stop your scan\n"; - string_cat_str(app->text_box_store, help_msg); + const char* help_msg = "Press BACK to send stopscan\n"; + furi_string_cat_str(app->text_box_store, help_msg); app->text_box_store_strlen += strlen(help_msg); } } else { // "View Log" menu action - text_box_set_text(app->text_box, string_get_cstr(app->text_box_store)); + text_box_set_text(app->text_box, furi_string_get_cstr(app->text_box_store)); } scene_manager_set_scene_state(app->scene_manager, WifideautherSceneConsoleOutput, 0); @@ -69,7 +69,7 @@ bool wifi_deauther_scene_console_output_on_event(void* context, SceneManagerEven bool consumed = false; if(event.type == SceneManagerEventTypeCustom) { - text_box_set_text(app->text_box, string_get_cstr(app->text_box_store)); + text_box_set_text(app->text_box, furi_string_get_cstr(app->text_box_store)); consumed = true; } else if(event.type == SceneManagerEventTypeTick) { consumed = true; diff --git a/applications/plugins/wifi_deauther/wifi_deauther_app.c b/applications/plugins/wifi_deauther/wifi_deauther_app.c index d02e515d9..28fb28d88 100644 --- a/applications/plugins/wifi_deauther/wifi_deauther_app.c +++ b/applications/plugins/wifi_deauther/wifi_deauther_app.c @@ -54,8 +54,8 @@ WifideautherApp* wifi_deauther_app_alloc() { app->text_box = text_box_alloc(); view_dispatcher_add_view( app->view_dispatcher, WifideautherAppViewConsoleOutput, text_box_get_view(app->text_box)); - string_init(app->text_box_store); - string_reserve(app->text_box_store, WIFI_deauther_TEXT_BOX_STORE_SIZE); + app->text_box_store = furi_string_alloc(); + furi_string_reserve(app->text_box_store, WIFI_deauther_TEXT_BOX_STORE_SIZE); app->text_input = text_input_alloc(); view_dispatcher_add_view( @@ -74,7 +74,7 @@ void wifi_deauther_app_free(WifideautherApp* app) { view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewConsoleOutput); view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewTextInput); text_box_free(app->text_box); - string_clear(app->text_box_store); + furi_string_free(app->text_box_store); text_input_free(app->text_input); // View dispatcher @@ -84,7 +84,7 @@ void wifi_deauther_app_free(WifideautherApp* app) { wifi_deauther_uart_free(app->uart); // Close records - furi_record_close(RECORD_GUI); // GET PWNED + furi_record_close(RECORD_GUI); free(app); } diff --git a/applications/plugins/wifi_deauther/wifi_deauther_app_i.h b/applications/plugins/wifi_deauther/wifi_deauther_app_i.h index 20b0d4de6..bab52f385 100644 --- a/applications/plugins/wifi_deauther/wifi_deauther_app_i.h +++ b/applications/plugins/wifi_deauther/wifi_deauther_app_i.h @@ -23,7 +23,7 @@ struct WifideautherApp { SceneManager* scene_manager; char text_input_store[WIFI_deauther_TEXT_INPUT_STORE_SIZE + 1]; - string_t text_box_store; + FuriString* text_box_store; size_t text_box_store_strlen; TextBox* text_box; TextInput* text_input;