This commit is contained in:
Willy-JL
2023-05-31 18:49:42 +01:00
parent 92ee646b10
commit 499049dc46
18 changed files with 137 additions and 105 deletions

View File

@@ -9,5 +9,5 @@ App(
order=2,
fap_icon="wifi_10px.png",
fap_category="GPIO",
fap_description="ESP32-CAM version of Marauder. Includes all functionality from the original plus some options to trigger the camera and flashlight. [Unplug the USB cable to test with Mayhem]"
fap_description="ESP32-CAM version of Marauder. Includes all functionality from the original plus some options to trigger the camera and flashlight. [Unplug the USB cable to test with Mayhem]",
)

View File

@@ -82,7 +82,8 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
}
// If it is a sniff function, open the pcap file for recording
if(app->ok_to_save_pcaps && strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0) {
if(app->ok_to_save_pcaps &&
strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0) {
app->is_writing_pcap = true;
wifi_marauder_create_pcap_file(app);
}

View File

@@ -112,18 +112,23 @@ void wifi_marauder_scene_log_viewer_on_enter(void* context) {
app->open_log_file_page = 0;
app->open_log_file_num_pages = 0;
bool saved_logs_exist = false;
if (!app->has_saved_logs_this_session && furi_string_empty(app->text_box_store)) {
if(!app->has_saved_logs_this_session && furi_string_empty(app->text_box_store)) {
// no commands sent yet this session, find last saved log
if (storage_dir_open(app->log_file, MARAUDER_APP_FOLDER_LOGS)) {
if(storage_dir_open(app->log_file, MARAUDER_APP_FOLDER_LOGS)) {
char name[70];
char lastname[70];
while (storage_dir_read(app->log_file, NULL, name, sizeof(name))) {
while(storage_dir_read(app->log_file, NULL, name, sizeof(name))) {
// keep reading directory until last file is reached
strlcpy(lastname, name, sizeof(lastname));
saved_logs_exist = true;
}
if (saved_logs_exist) {
snprintf(app->log_file_path, sizeof(app->log_file_path), "%s/%s", MARAUDER_APP_FOLDER_LOGS, lastname);
if(saved_logs_exist) {
snprintf(
app->log_file_path,
sizeof(app->log_file_path),
"%s/%s",
MARAUDER_APP_FOLDER_LOGS,
lastname);
}
}
storage_dir_close(app->log_file);

View File

@@ -111,7 +111,7 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
TOGGLE_ARGS,
FOCUS_CONSOLE_END,
NO_TIP},
{"Camera",
{"Camera",
{"photo", "flashlight"},
2,
{"photo", "flashlight"},

View File

@@ -163,9 +163,8 @@ int32_t wifi_marauder_app(void* p) {
furi_delay_ms(200);
furi_hal_power_enable_external_3_3v();
furi_hal_power_enable_otg();
for(int i=0;i<2;i++)
{
furi_delay_ms(500);
for(int i = 0; i < 2; i++) {
furi_delay_ms(500);
furi_hal_uart_tx(FuriHalUartIdUSART1, (uint8_t[1]){'w'}, 1);
}
furi_delay_ms(1);