Enable serial PCAP with CLI option

This commit is contained in:
Willy-JL
2023-12-31 19:54:55 +01:00
parent bddc7e1d9d
commit 558fe18d66
6 changed files with 7 additions and 66 deletions

View File

@@ -205,27 +205,6 @@ jobs:
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
- name: Configure SD Serial for Flipper Zero SD Serial
run: |
pwd
sed -i 's/^ \/\/#define WRITE_PACKETS_SERIAL/ #define WRITE_PACKETS_SERIAL/' esp32_marauder/configs.h
- name: Build Marauder SD Serial for Flipper Zero WiFi Dev Board
uses: ArminJo/arduino-test-compile@v3.2.1
with:
sketch-names: esp32_marauder.ino
arduino-board-fqbn: esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled
extra-arduino-cli-args: "--warnings none"
- name: Rename Marauder Flipper SD Serial bin
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper_sd_serial.bin
- name: Remove SD Serial
run: |
pwd
sed -i 's/^ #define WRITE_PACKETS_SERIAL/ \/\/#define WRITE_PACKETS_SERIAL/' esp32_marauder/configs.h
- name: Build Marauder for Flipper Zero Multi Board
uses: ArminJo/arduino-test-compile@v3.2.1
with:
@@ -464,13 +443,6 @@ jobs:
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
retention-days: 5
- name: 'Upload Flipper SD Serial Artifact'
uses: actions/upload-artifact@v3
with:
name: esp32_marauder.flipper_sd_serial.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper_sd_serial.bin
retention-days: 5
- name: 'Upload MultiboardS3 Artifact'
uses: actions/upload-artifact@v3
with:
@@ -558,18 +530,6 @@ jobs:
asset_content_type: application/bin
if: github.event_name != 'pull_request'
- name: Upload Flipper SD Serial Asset
id: upload-flipper-sd-serial-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper_sd_serial.bin
asset_name: esp32_marauder.flipper_sd_serial.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'
- name: Upload MultiboardS3 Asset
id: upload-multiboardS3-release-asset
uses: actions/upload-release-asset@v1

View File

@@ -9,9 +9,6 @@ void CommandLine::RunSetup() {
Serial.println(F("\n\n--------------------------------\n"));
Serial.println(F(" ESP32 Marauder \n"));
Serial.println(" " + version_number + "\n");
#ifdef WRITE_PACKETS_SERIAL
Serial.println(F(" >> Serial \n"));
#endif
Serial.println(F(" By: justcallmekoko\n"));
Serial.println(F("--------------------------------\n\n"));
@@ -508,6 +505,9 @@ void CommandLine::runCommand(String input) {
//// WiFi/Bluetooth Scan/Attack commands
if (!wifi_scan_obj.scanning()) {
// Dump pcap/log to serial too, valid for all scan/attack commands
wifi_scan_obj.save_serial = this->argSearch(&cmd_args, "-serial") != -1;
// Signal strength scan
if (cmd_args.get(0) == SIGSTREN_CMD) {
Serial.println("Starting Signal Strength Scan. Stop with " + (String)STOPSCAN_CMD);

View File

@@ -937,12 +937,7 @@ void WiFiScan::startPcap(String file_name) {
sd_obj.supported ? &SD :
#endif
NULL,
// TODO: make commandline options
#ifdef WRITE_PACKETS_SERIAL
true
#else
false
#endif
save_serial // Set with commandline options
);
}
@@ -953,12 +948,7 @@ void WiFiScan::startLog(String file_name) {
sd_obj.supported ? &SD :
#endif
NULL,
// TODO: make commandline options
#ifdef WRITE_PACKETS_SERIAL
true
#else
false
#endif
save_serial // Set with commandline options
);
}
@@ -1394,11 +1384,6 @@ void WiFiScan::RunInfo()
display_obj.tft.println(text_table4[27] + free_ram);
#endif
#ifdef WRITE_PACKETS_SERIAL
#ifdef HAS_SCREEN
display_obj.tft.println(text_table4[48]);
#endif
#endif
#if defined(HAS_SD)
if (sd_obj.supported) {
#ifdef HAS_SCREEN

View File

@@ -390,6 +390,7 @@ class WiFiScan
void StopScan(uint8_t scan_mode);
const char* generateRandomName();
bool save_serial = false;
void startPcap(String file_name);
void startLog(String file_name);

View File

@@ -6,10 +6,6 @@
#define POLISH_POTATO
//Indicates that it must redirect the stream with the captured packets to serial (1)
//If not defined, will write packages to SD card if supported
//#define WRITE_PACKETS_SERIAL
//// BOARD TARGETS
//#define MARAUDER_M5STICKC
//#define MARAUDER_MINI

View File

@@ -179,13 +179,12 @@ PROGMEM const char text4_44[] = " AP Scan ";
PROGMEM const char text4_45[] = "Clearing Stations...";
PROGMEM const char text4_46[] = "Stations Cleared: ";
PROGMEM const char text4_47[] = "Targeted Deauth";
PROGMEM const char text4_48[] = "Using serial to transmit packets";
//Making tables
PROGMEM const char *text_table0[] = {text0_0,text0_1, text0_2, text0_3, text0_4, text0_5, text0_6, text0_7, text0_8};
PROGMEM const char *text_table1[] = {text1_0,text1_1,text1_2,text1_3,text1_4,text1_5,text1_6,text1_7,text1_8,text1_9,text1_10,text1_11,text1_12,text1_13,text1_14,text1_15,text1_16,text1_17,text1_18,text1_19,text1_20,text1_21,text1_22,text1_23,text1_24,text1_25,text1_26,text1_27,text1_28,text1_29,text1_30,text1_31,text1_32,text1_33,text1_34,text1_35,text1_36,text1_37,text1_38,text1_39,text1_40,text1_41,text1_42,text1_43,text1_44,text1_45,text1_46,text1_47,text1_48,text1_49,text1_50,text1_51,text1_52,text1_53,text1_54,text1_55,text1_56,text1_57,text1_58,text1_59,text1_60,text1_61,text1_62};
PROGMEM const char *text_table2[] = {text2_0,text2_1,text2_2,text2_3,text2_4,text2_5,text2_6,text2_7,text2_8,text2_9,text2_10,text2_11,text2_12,text2_13,text2_14};
PROGMEM const char *text_table3[] = {text3_0,text3_1,text3_2,text3_3,text3_4,text3_5};
PROGMEM const char *text_table4[] = {text4_0,text4_1,text4_2,text4_3,text4_4,text4_5,text4_6,text4_7,text1_54,text4_9,text4_10,text4_11,text4_12,text4_13,text4_14,text4_15,text4_16,text4_17,text4_18,text4_19,text4_20,text4_21,text4_22,text4_23,text4_24,text4_25,text4_26,text4_27,text4_28,text4_29,text4_30,text4_31,text4_32,text4_33,text4_34,text4_35,text4_36,text4_37,text4_38,text4_39,text4_40,text4_41,text4_42,text4_43,text4_44,text4_45,text4_46,text4_47, text4_48};
PROGMEM const char *text_table4[] = {text4_0,text4_1,text4_2,text4_3,text4_4,text4_5,text4_6,text4_7,text1_54,text4_9,text4_10,text4_11,text4_12,text4_13,text4_14,text4_15,text4_16,text4_17,text4_18,text4_19,text4_20,text4_21,text4_22,text4_23,text4_24,text4_25,text4_26,text4_27,text4_28,text4_29,text4_30,text4_31,text4_32,text4_33,text4_34,text4_35,text4_36,text4_37,text4_38,text4_39,text4_40,text4_41,text4_42,text4_43,text4_44,text4_45,text4_46,text4_47};
#endif