|
|
@@ -8,7 +8,7 @@ char* _wifi_marauder_get_prefix_from_cmd(const char* command) {
|
|
|
return prefix;
|
|
|
}
|
|
|
|
|
|
-bool _wifi_marauder_is_save_pcaps_enabled(WifiMarauderApp* app) {
|
|
|
+bool _wifi_marauder_is_saving_enabled(WifiMarauderApp* app) {
|
|
|
// If it is a script that contains a sniff function
|
|
|
if(app->script != NULL) {
|
|
|
if(app->script->save_pcap == WifiMarauderScriptBooleanFalse) {
|
|
|
@@ -32,9 +32,12 @@ bool _wifi_marauder_is_save_pcaps_enabled(WifiMarauderApp* app) {
|
|
|
if(!app->ok_to_save_pcaps) {
|
|
|
return false;
|
|
|
}
|
|
|
- // If it is a sniff function
|
|
|
+ // If it is a sniff/wardrive/btwardrive/evilportal function
|
|
|
return app->is_command && app->selected_tx_string &&
|
|
|
- strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0;
|
|
|
+ (strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0 ||
|
|
|
+ strncmp("wardrive", app->selected_tx_string, strlen("wardrive")) == 0 ||
|
|
|
+ strncmp("btwardrive", app->selected_tx_string, strlen("btwardrive")) == 0 ||
|
|
|
+ strncmp("evilportal", app->selected_tx_string, strlen("evilportal")) == 0);
|
|
|
}
|
|
|
|
|
|
void wifi_marauder_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, void* context) {
|
|
|
@@ -140,13 +143,21 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // If it is a sniff function or script, open the pcap file for recording
|
|
|
- if(_wifi_marauder_is_save_pcaps_enabled(app)) {
|
|
|
- if(sequential_file_open(
|
|
|
- app->storage, app->capture_file, MARAUDER_APP_FOLDER_PCAPS, prefix, "pcap")) {
|
|
|
+ // If it is a sniff/wardrive/btwardrive/evilportal function or script, open the capture file for recording
|
|
|
+ if(_wifi_marauder_is_saving_enabled(app)) {
|
|
|
+ const char* folder = NULL;
|
|
|
+ const char* extension = NULL;
|
|
|
+ if(strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0) {
|
|
|
+ folder = MARAUDER_APP_FOLDER_PCAPS;
|
|
|
+ extension = "pcap";
|
|
|
+ } else {
|
|
|
+ folder = MARAUDER_APP_FOLDER_DUMPS;
|
|
|
+ extension = "txt";
|
|
|
+ }
|
|
|
+ if(sequential_file_open(app->storage, app->capture_file, folder, prefix, extension)) {
|
|
|
app->is_writing_pcap = true;
|
|
|
} else {
|
|
|
- dialog_message_show_storage_error(app->dialogs, "Cannot open pcap file");
|
|
|
+ dialog_message_show_storage_error(app->dialogs, "Cannot open capture file");
|
|
|
}
|
|
|
}
|
|
|
|