Skip to content

Commit

Permalink
v1.1.7
Browse files Browse the repository at this point in the history
- added null checks before freeing resources
- remove unused commands from menu.c and cleaned up command details
- initialise uart in esp connection check if needed
  • Loading branch information
jaylikesbunda committed Nov 28, 2024
1 parent 9afb341 commit c1629c7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog


## v1.1.7
- added null checks before freeing resources
- remove unused commands from menu.c and cleaned up command details
- initialise uart in esp connection check if needed

## v1.1.6
- sync files more frequently
Expand Down
10 changes: 10 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ int32_t ghost_esp_app(void* p) {
// Initialize UART in background
state->uart_context = uart_init(state);

// Check if ESP is connected, if not, try to initialize it
if(!uart_is_esp_connected(state->uart_context)) {
FURI_LOG_W("Ghost_ESP", "ESP not connected, trying to initialize...");
if(uart_init(state) != NULL) {
FURI_LOG_I("Ghost_ESP", "ESP initialized successfully");
} else {
FURI_LOG_E("Ghost_ESP", "Failed to initialize ESP");
}
}

// Set up and run GUI
Gui* gui = furi_record_open("gui");
if(gui && state->view_dispatcher) {
Expand Down
50 changes: 16 additions & 34 deletions src/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,31 +282,14 @@ static const MenuCommand wifi_commands[] = {
.confirm_text = NULL,
.details_header = "Raw Packet Capture",
.details_text = "Captures all WiFi\n"
"traffic in range.\n"
"Saves as PCAP.\n"
"Range: ~50-100m\n",
},
{
.label = "Sniff PMKID",
.command = "capture -eapol\n",
.capture_prefix = "pmkid_capture",
.file_ext = "pcap",
.folder = GHOST_ESP_APP_FOLDER_PCAPS,
.needs_input = false,
.input_text = NULL,
.needs_confirmation = false,
.confirm_header = NULL,
.confirm_text = NULL,
.details_header = "PMKID Capture",
.details_text = "Captures PMKID and\n"
"EAPOL handshakes.\n"
"Saves as PCAP.\n"
"traffic to a PCAP file\n"
"for later analysis.\n"
"Range: ~50-100m\n",
},
{
.label = "Sniff Probes",
.command = "capture -probe\n",
.capture_prefix = "probes_capture",
.command = "capture -p\n",
.capture_prefix = "probe_capture",
.file_ext = "pcap",
.folder = GHOST_ESP_APP_FOLDER_PCAPS,
.needs_input = false,
Expand All @@ -315,9 +298,9 @@ static const MenuCommand wifi_commands[] = {
.confirm_header = NULL,
.confirm_text = NULL,
.details_header = "Probe Capture",
.details_text = "Captures probe\n"
"requests from clients.\n"
"Saves to PCAP file.\n"
.details_text = "Captures probe requests\n"
"from client devices to\n"
"a PCAP file.\n"
"Range: ~50-100m\n",
},
{
Expand All @@ -332,9 +315,9 @@ static const MenuCommand wifi_commands[] = {
.confirm_header = NULL,
.confirm_text = NULL,
.details_header = "WPS Capture",
.details_text = "Captures WPS data\n"
"exchanges & beacons.\n"
"Saves to PCAP file.\n"
.details_text = "Captures WPS traffic\n"
"to a PCAP file for\n"
"later analysis.\n"
"Range: ~50-100m\n",
},
{
Expand Down Expand Up @@ -533,9 +516,9 @@ static const MenuCommand ble_commands[] = {
"- Last seen time\n",
},
{
.label = "Sniff Bluetooth",
.command = "blescan -r\n",
.capture_prefix = "btscan",
.label = "Sniff BLE",
.command = "blescan -s\n",
.capture_prefix = "ble_capture",
.file_ext = "pcap",
.folder = GHOST_ESP_APP_FOLDER_PCAPS,
.needs_input = false,
Expand All @@ -544,10 +527,9 @@ static const MenuCommand ble_commands[] = {
.confirm_header = NULL,
.confirm_text = NULL,
.details_header = "BLE Sniffer",
.details_text = "Captures Bluetooth LE\n"
"packets & adv data.\n"
"Saves to PCAP file.\n"
"Range: ~50m\n",
.details_text = "Captures Bluetooth Low\n"
"Energy traffic.\n"
"Range: ~10-30m\n",
},
{
.label = "Stop BLE Scan",
Expand Down
2 changes: 1 addition & 1 deletion src/settings_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ bool settings_custom_event_callback(void* context, uint32_t event_id) {
"Updated by: Jay Candel\n"
"Built with <3";

confirmation_view_set_header(app_state->confirmation_view, "Ghost ESP v1.1.6");
confirmation_view_set_header(app_state->confirmation_view, "Ghost ESP v1.1.7");
confirmation_view_set_text(app_state->confirmation_view, info_text);

// Save current view before switching
Expand Down

0 comments on commit c1629c7

Please sign in to comment.