mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-08-03 01:16:07 -07:00
Merge pull request #607 from justcallmekoko/develop
Add new bluetooth features
This commit is contained in:
@@ -15,30 +15,56 @@ jobs:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install ESP32 Boards and Compile TestFile
|
||||
# - name: Install ESP32 Boards and Compile TestFile
|
||||
# uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
# with:
|
||||
# sketch-names: TestFile.ino
|
||||
# arduino-board-fqbn: esp32:esp32:esp32s2
|
||||
# platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.10/package_esp32_dev_index.json
|
||||
|
||||
- name: Install Arduino CLI
|
||||
run: |
|
||||
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
|
||||
echo "/home/runner/work/ESP32Marauder/ESP32Marauder/bin" >> $GITHUB_PATH
|
||||
export PATH=$PATH:/home/runner/work/ESP32Marauder/ESP32Marauder/bin
|
||||
arduino-cli version
|
||||
|
||||
- name: Install Arduino-ESP32 Core v2.0.11
|
||||
run: |
|
||||
arduino-cli core update-index
|
||||
arduino-cli core install esp32:esp32@2.0.11
|
||||
|
||||
- name: Verify Installed Cores
|
||||
run: arduino-cli core list
|
||||
|
||||
- name: Build TestFile with ESP32 v2.0.11
|
||||
uses: ArminJo/arduino-test-compile@v3.2.1
|
||||
with:
|
||||
sketch-names: TestFile.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.10/package_esp32_dev_index.json
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Verify Installed Cores Again
|
||||
run: arduino-cli core list
|
||||
|
||||
- name: Show Arduino dir structure
|
||||
run: |
|
||||
find /home/runner/.arduino15/packages/esp32/hardware/
|
||||
|
||||
- name: Pull arduino-esp32 v2.0.4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: espressif/arduino-esp32
|
||||
ref: 2.0.4
|
||||
path: 2.0.4arduino-esp32
|
||||
# - name: Pull arduino-esp32 v2.0.4
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# repository: espressif/arduino-esp32
|
||||
# ref: 2.0.4
|
||||
# path: 2.0.4arduino-esp32
|
||||
|
||||
- name: Pull arduino-esp32 v2.0.10
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: espressif/arduino-esp32
|
||||
ref: 2.0.10
|
||||
path: 2.0.10
|
||||
# - name: Pull arduino-esp32 v2.0.10
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# repository: espressif/arduino-esp32
|
||||
# ref: 2.0.10
|
||||
# path: 2.0.10
|
||||
|
||||
- name: Install AsyncTCP
|
||||
uses: actions/checkout@v2
|
||||
@@ -197,6 +223,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder Flipper bin
|
||||
run: |
|
||||
@@ -208,6 +236,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=enabled
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder Multi Board bin
|
||||
run: |
|
||||
@@ -237,6 +267,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename OG Marauder bin
|
||||
run: |
|
||||
@@ -281,6 +313,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename v6 Marauder bin
|
||||
run: |
|
||||
@@ -305,6 +339,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename v6 Marauder bin
|
||||
run: |
|
||||
@@ -331,6 +367,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder Kit bin
|
||||
run: |
|
||||
@@ -357,6 +395,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder Mini bin
|
||||
run: |
|
||||
@@ -381,6 +421,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder ESP32 LDDB bin
|
||||
run: |
|
||||
@@ -405,6 +447,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder for Marauder Dev Board Pro
|
||||
run: |
|
||||
@@ -434,6 +478,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:m5stick-c:PartitionScheme=min_spiffs
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder M5StickC bin
|
||||
run: |
|
||||
@@ -464,6 +510,8 @@ jobs:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=4M,PSRAM=enabled
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
arduino-platform: esp32:esp32@2.0.11
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.11/package_esp32_dev_index.json
|
||||
|
||||
- name: Rename Marauder Marauder Rev Feather
|
||||
run: |
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -3,12 +3,14 @@
|
||||
"active_layer": 44,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": false,
|
||||
"hidden_netclasses": [],
|
||||
"hidden_nets": [
|
||||
"+ext_3V3"
|
||||
],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"images": 0.6,
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"board": {
|
||||
"3dviewports": [],
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"board_outline_line_width": 0.09999999999999999,
|
||||
@@ -62,20 +63,26 @@
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "error",
|
||||
"connection_width": "warning",
|
||||
"copper_edge_clearance": "ignore",
|
||||
"copper_sliver": "warning",
|
||||
"courtyards_overlap": "ignore",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "error",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint": "error",
|
||||
"footprint_type_mismatch": "error",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"invalid_outline": "error",
|
||||
"isolated_copper": "warning",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"lib_footprint_issues": "warning",
|
||||
"lib_footprint_mismatch": "warning",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
@@ -85,9 +92,14 @@
|
||||
"padstack": "error",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_edge_clearance": "warning",
|
||||
"silk_over_copper": "ignore",
|
||||
"silk_overlap": "ignore",
|
||||
"skew_out_of_range": "error",
|
||||
"solder_mask_bridge": "error",
|
||||
"starved_thermal": "error",
|
||||
"text_height": "warning",
|
||||
"text_thickness": "warning",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "ignore",
|
||||
@@ -96,7 +108,6 @@
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zone_has_empty_net": "error",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
@@ -104,20 +115,65 @@
|
||||
"allow_microvias": false,
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.127,
|
||||
"min_connection": 0.0,
|
||||
"min_copper_edge_clearance": 0.19999999999999998,
|
||||
"min_hole_clearance": 0.254,
|
||||
"min_hole_to_hole": 0.5,
|
||||
"min_microvia_diameter": 0.19999999999999998,
|
||||
"min_microvia_drill": 0.09999999999999999,
|
||||
"min_resolved_spokes": 2,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_text_height": 0.7999999999999999,
|
||||
"min_text_thickness": 0.08,
|
||||
"min_through_hole_diameter": 0.19999999999999998,
|
||||
"min_track_width": 0.127,
|
||||
"min_via_annular_width": 0.049999999999999996,
|
||||
"min_via_diameter": 0.5,
|
||||
"solder_mask_clearance": 0.0,
|
||||
"solder_mask_min_width": 0.0,
|
||||
"solder_mask_to_copper_clearance": 0.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"teardrop_options": [
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 5,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_onpadsmd": true,
|
||||
"td_onroundshapesonly": false,
|
||||
"td_ontrackend": false,
|
||||
"td_onviapad": true
|
||||
}
|
||||
],
|
||||
"teardrop_parameters": [
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_round_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_rect_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_target_name": "td_track_end",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
}
|
||||
],
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.127,
|
||||
@@ -151,7 +207,8 @@
|
||||
"zones_allow_external_fillets": false,
|
||||
"zones_use_no_outline": true
|
||||
},
|
||||
"layer_presets": []
|
||||
"layer_presets": [],
|
||||
"viewports": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
@@ -335,18 +392,23 @@
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_label_syntax": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"conflicting_netclasses": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"endpoint_off_grid": "warning",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"missing_bidi_pin": "warning",
|
||||
"missing_input_pin": "warning",
|
||||
"missing_power_pin": "error",
|
||||
"missing_unit": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
@@ -356,6 +418,7 @@
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"simulation_model_issue": "ignore",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
@@ -373,7 +436,7 @@
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.127,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -387,10 +450,10 @@
|
||||
"track_width": 0.127,
|
||||
"via_diameter": 0.5,
|
||||
"via_drill": 0.3,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
},
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.127,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -399,18 +462,15 @@
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "GND",
|
||||
"nets": [
|
||||
"GND"
|
||||
],
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.2,
|
||||
"via_diameter": 0.5,
|
||||
"via_drill": 0.3,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
},
|
||||
{
|
||||
"bus_width": 12.0,
|
||||
"bus_width": 12,
|
||||
"clearance": 0.127,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
@@ -419,25 +479,45 @@
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Supply",
|
||||
"nets": [
|
||||
"+3V3",
|
||||
"+5V",
|
||||
"+LDO_3V3",
|
||||
"+ext_3V3",
|
||||
"+ext_5V"
|
||||
],
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.2,
|
||||
"via_diameter": 0.5,
|
||||
"via_drill": 0.3,
|
||||
"wire_width": 6.0
|
||||
"wire_width": 6
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 2
|
||||
"version": 3
|
||||
},
|
||||
"net_colors": null
|
||||
"net_colors": null,
|
||||
"netclass_assignments": null,
|
||||
"netclass_patterns": [
|
||||
{
|
||||
"netclass": "GND",
|
||||
"pattern": "GND"
|
||||
},
|
||||
{
|
||||
"netclass": "Supply",
|
||||
"pattern": "+3V3"
|
||||
},
|
||||
{
|
||||
"netclass": "Supply",
|
||||
"pattern": "+5V"
|
||||
},
|
||||
{
|
||||
"netclass": "Supply",
|
||||
"pattern": "+LDO_3V3"
|
||||
},
|
||||
{
|
||||
"netclass": "Supply",
|
||||
"pattern": "+ext_3V3"
|
||||
},
|
||||
{
|
||||
"netclass": "Supply",
|
||||
"pattern": "+ext_5V"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
@@ -453,6 +533,8 @@
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"drawing": {
|
||||
"dashed_lines_dash_length_ratio": 12.0,
|
||||
"dashed_lines_gap_length_ratio": 3.0,
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
@@ -484,7 +566,11 @@
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_adjust_passive_values": false,
|
||||
"spice_current_sheet_as_root": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"spice_model_current_sheet_as_root": true,
|
||||
"spice_save_all_currents": false,
|
||||
"spice_save_all_voltages": false,
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
|
||||
@@ -909,6 +909,18 @@ void CommandLine::runCommand(String input) {
|
||||
Serial.println("Bluetooth not supported");
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "flipper") {
|
||||
#ifdef HAS_BT
|
||||
Serial.println("Starting Flipper Spam attack. Stop with " + (String)STOPSCAN_CMD);
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.clearScreen();
|
||||
menu_function_obj.drawStatusBar();
|
||||
#endif
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
|
||||
#else
|
||||
Serial.println("Bluetooth not supported");
|
||||
#endif
|
||||
}
|
||||
else if (bt_type == "all") {
|
||||
#ifdef HAS_BT
|
||||
Serial.println("Starting BT Spam All attack. Stop with " + (String)STOPSCAN_CMD);
|
||||
|
||||
@@ -135,7 +135,7 @@ const char PROGMEM HELP_LOAD_CMD[] = "load -a/-s";
|
||||
|
||||
// Bluetooth sniff/scan
|
||||
const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt";
|
||||
const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t <apple/google/samsung/windows/all>";
|
||||
const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t <apple/google/samsung/windows/flipper/all>";
|
||||
//const char PROGMEM HELP_BT_SOUR_APPLE_CMD[] = "sourapple";
|
||||
//const char PROGMEM HELP_BT_SWIFTPAIR_SPAM_CMD[] = "swiftpair";
|
||||
//const char PROGMEM HELP_BT_SAMSUNG_SPAM_CMD[] = "samsungblespam";
|
||||
|
||||
@@ -32,7 +32,7 @@ void GpsInterface::begin() {
|
||||
|
||||
MicroNMEA::sendSentence(Serial2, "$PSTMSRR");
|
||||
|
||||
delay(3900);
|
||||
delay(1000);
|
||||
|
||||
if (Serial2.available()) {
|
||||
Serial.println("GPS Attached Successfully");
|
||||
|
||||
@@ -10,7 +10,7 @@ void LedInterface::RunSetup() {
|
||||
strip.begin();
|
||||
strip.setPixelColor(0, strip.Color(0, 0, 0));
|
||||
strip.show();
|
||||
delay(100);
|
||||
//delay(100);
|
||||
strip.setBrightness(50);
|
||||
strip.setPixelColor(0, strip.Color(0, 0, 0));
|
||||
strip.show();
|
||||
|
||||
@@ -585,11 +585,13 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS))
|
||||
@@ -649,11 +651,13 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
@@ -1256,6 +1260,9 @@ void MenuFunctions::RunSetup()
|
||||
// WiFi menu stuff
|
||||
wifiSnifferMenu.list = new LinkedList<MenuNode>();
|
||||
wifiAttackMenu.list = new LinkedList<MenuNode>();
|
||||
#ifdef HAS_GPS
|
||||
wardrivingMenu.list = new LinkedList<MenuNode>();
|
||||
#endif
|
||||
wifiGeneralMenu.list = new LinkedList<MenuNode>();
|
||||
wifiAPMenu.list = new LinkedList<MenuNode>();
|
||||
#ifndef HAS_ILI9341
|
||||
@@ -1321,6 +1328,7 @@ void MenuFunctions::RunSetup()
|
||||
#endif
|
||||
#ifdef HAS_GPS
|
||||
gpsInfoMenu.name = "GPS Data";
|
||||
wardrivingMenu.name = "Wardriving";
|
||||
#endif
|
||||
htmlMenu.name = "EP HTML List";
|
||||
#if (!defined(HAS_ILI9341) && defined(HAS_BUTTONS))
|
||||
@@ -1355,6 +1363,9 @@ void MenuFunctions::RunSetup()
|
||||
this->addNodes(&wifiMenu, text_table1[31], TFT_YELLOW, NULL, SNIFFERS, [this]() {
|
||||
this->changeMenu(&wifiSnifferMenu);
|
||||
});
|
||||
this->addNodes(&wifiMenu, "Wardriving", TFT_GREEN, NULL, BEACON_SNIFF, [this]() {
|
||||
this->changeMenu(&wardrivingMenu);
|
||||
});
|
||||
this->addNodes(&wifiMenu, text_table1[32], TFT_RED, NULL, ATTACKS, [this]() {
|
||||
this->changeMenu(&wifiAttackMenu);
|
||||
});
|
||||
@@ -1401,13 +1412,13 @@ void MenuFunctions::RunSetup()
|
||||
wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);
|
||||
});
|
||||
#endif
|
||||
#ifndef HAS_ILI9341
|
||||
this->addNodes(&wifiSnifferMenu, text_table1[47], TFT_RED, NULL, PWNAGOTCHI, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_RED);
|
||||
});
|
||||
#endif
|
||||
//#ifndef HAS_ILI9341
|
||||
this->addNodes(&wifiSnifferMenu, text_table1[47], TFT_RED, NULL, PWNAGOTCHI, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_RED);
|
||||
});
|
||||
//#endif
|
||||
this->addNodes(&wifiSnifferMenu, text_table1[49], TFT_MAGENTA, NULL, BEACON_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
@@ -1430,9 +1441,15 @@ void MenuFunctions::RunSetup()
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_SIG_STREN, TFT_CYAN);
|
||||
});
|
||||
#endif
|
||||
|
||||
// Build Wardriving menu
|
||||
wardrivingMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
|
||||
this->addNodes(&wardrivingMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
|
||||
this->changeMenu(wardrivingMenu.parentMenu);
|
||||
});
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
this->addNodes(&wifiSnifferMenu, "Wardrive", TFT_GREEN, NULL, BEACON_SNIFF, [this]() {
|
||||
this->addNodes(&wardrivingMenu, "Wardrive", TFT_GREEN, NULL, BEACON_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);
|
||||
@@ -1441,7 +1458,7 @@ void MenuFunctions::RunSetup()
|
||||
#endif
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
this->addNodes(&wifiSnifferMenu, "Station Wardrive", TFT_ORANGE, NULL, PROBE_SNIFF, [this]() {
|
||||
this->addNodes(&wardrivingMenu, "Station Wardrive", TFT_ORANGE, NULL, PROBE_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_STATION_WAR_DRIVE, TFT_ORANGE);
|
||||
@@ -1836,6 +1853,11 @@ void MenuFunctions::RunSetup()
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
|
||||
});
|
||||
this->addNodes(&bluetoothSnifferMenu, "Airtag Sniff", TFT_WHITE, NULL, BLUETOOTH_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
|
||||
});
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.getGpsModuleStatus()) {
|
||||
this->addNodes(&bluetoothSnifferMenu, "BT Wardrive", TFT_CYAN, NULL, BLUETOOTH_SNIFF, [this]() {
|
||||
@@ -1879,7 +1901,12 @@ void MenuFunctions::RunSetup()
|
||||
this->addNodes(&bluetoothAttackMenu, "Google BLE Spam", TFT_PURPLE, NULL, LANGUAGE, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_RED);
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_GOOGLE_SPAM, TFT_PURPLE);
|
||||
});
|
||||
this->addNodes(&bluetoothAttackMenu, "Flipper BLE Spam", TFT_ORANGE, NULL, LANGUAGE, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
|
||||
});
|
||||
this->addNodes(&bluetoothAttackMenu, "BLE Spam All", TFT_MAGENTA, NULL, DEAUTH_SNIFF, [this]() {
|
||||
display_obj.clearScreen();
|
||||
|
||||
@@ -146,6 +146,9 @@ class MenuFunctions
|
||||
// WiFi menu stuff
|
||||
Menu wifiSnifferMenu;
|
||||
Menu wifiAttackMenu;
|
||||
#ifdef HAS_GPS
|
||||
Menu wardrivingMenu;
|
||||
#endif
|
||||
Menu wifiGeneralMenu;
|
||||
Menu wifiAPMenu;
|
||||
#ifndef HAS_ILI9341
|
||||
|
||||
+261
-16
@@ -9,6 +9,7 @@ int num_eapol = 0;
|
||||
LinkedList<ssid>* ssids;
|
||||
LinkedList<AccessPoint>* access_points;
|
||||
LinkedList<Station>* stations;
|
||||
LinkedList<AirTag>* airtags;
|
||||
|
||||
extern "C" int ieee80211_raw_frame_sanity_check(int32_t arg, int32_t arg2, int32_t arg3){
|
||||
if (arg == 31337)
|
||||
@@ -126,6 +127,55 @@ extern "C" {
|
||||
AdvData.addData(std::string((char *)AdvData_Raw, 14));
|
||||
break;
|
||||
}
|
||||
case FlipperZero: {
|
||||
// Generate a random 5-letter name for the advertisement
|
||||
char Name[6]; // 5 characters + null terminator
|
||||
generateRandomName(Name, sizeof(Name));
|
||||
|
||||
uint8_t name_len = strlen(Name);
|
||||
|
||||
// Allocate space for the full Advertisement Data section based on the hex dump
|
||||
AdvData_Raw = new uint8_t[31]; // Adjusted to the specific length of the data in the dump
|
||||
|
||||
// Advertisement Data from the hex dump
|
||||
AdvData_Raw[i++] = 0x02; // Flags length
|
||||
AdvData_Raw[i++] = 0x01; // Flags type
|
||||
AdvData_Raw[i++] = 0x06; // Flags value
|
||||
|
||||
AdvData_Raw[i++] = 0x06; // Name length (5 + type)
|
||||
AdvData_Raw[i++] = 0x09; // Complete Local Name type
|
||||
|
||||
// Add the randomized 5-letter name
|
||||
memcpy(&AdvData_Raw[i], Name, name_len);
|
||||
i += name_len;
|
||||
|
||||
AdvData_Raw[i++] = 0x03; // Incomplete List of 16-bit Service UUIDs length
|
||||
AdvData_Raw[i++] = 0x02; // Incomplete List of 16-bit Service UUIDs type
|
||||
AdvData_Raw[i++] = 0x80 + (rand() % 3) + 1; // Service UUID (part of hex dump)
|
||||
AdvData_Raw[i++] = 0x30;
|
||||
|
||||
AdvData_Raw[i++] = 0x02; // TX Power level length
|
||||
AdvData_Raw[i++] = 0x0A; // TX Power level type
|
||||
AdvData_Raw[i++] = 0x00; // TX Power level value
|
||||
|
||||
// Manufacturer specific data based on your hex dump
|
||||
AdvData_Raw[i++] = 0x05; // Length of Manufacturer Specific Data section
|
||||
AdvData_Raw[i++] = 0xFF; // Manufacturer Specific Data type
|
||||
AdvData_Raw[i++] = 0xBA; // LSB of Manufacturer ID (Flipper Zero: 0x0FBA)
|
||||
AdvData_Raw[i++] = 0x0F; // MSB of Manufacturer ID
|
||||
|
||||
AdvData_Raw[i++] = 0x4C; // Example data (remaining as in your dump)
|
||||
AdvData_Raw[i++] = 0x75;
|
||||
AdvData_Raw[i++] = 0x67;
|
||||
AdvData_Raw[i++] = 0x26;
|
||||
AdvData_Raw[i++] = 0xE1;
|
||||
AdvData_Raw[i++] = 0x80;
|
||||
|
||||
// Add the constructed Advertisement Data to the BLE advertisement
|
||||
AdvData.addData(std::string((char *)AdvData_Raw, i));
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Serial.println("Please Provide a Company Type");
|
||||
break;
|
||||
@@ -139,9 +189,9 @@ extern "C" {
|
||||
//// https://github.com/Spooks4576
|
||||
|
||||
|
||||
class bluetoothScanAllCallback: public BLEAdvertisedDeviceCallbacks {
|
||||
class bluetoothScanAllCallback: public NimBLEAdvertisedDeviceCallbacks {
|
||||
|
||||
void onResult(BLEAdvertisedDevice *advertisedDevice) {
|
||||
void onResult(NimBLEAdvertisedDevice *advertisedDevice) {
|
||||
|
||||
extern WiFiScan wifi_scan_obj;
|
||||
|
||||
@@ -153,7 +203,66 @@ extern "C" {
|
||||
|
||||
String display_string = "";
|
||||
|
||||
if (wifi_scan_obj.currentScanMode == BT_SCAN_ALL) {
|
||||
if (wifi_scan_obj.currentScanMode == BT_SCAN_AIRTAG) {
|
||||
uint8_t* payLoad = advertisedDevice->getPayload();
|
||||
size_t len = advertisedDevice->getPayloadLength();
|
||||
|
||||
bool match = false;
|
||||
for (int i = 0; i <= len - 4; i++) {
|
||||
if (payLoad[i] == 0x1E && payLoad[i+1] == 0xFF && payLoad[i+2] == 0x4C && payLoad[i+3] == 0x00) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
if (payLoad[i] == 0x4C && payLoad[i+1] == 0x00 && payLoad[i+2] == 0x12 && payLoad[i+3] == 0x19) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
String mac = advertisedDevice->getAddress().toString().c_str();
|
||||
mac.toUpperCase();
|
||||
|
||||
for (int i = 0; i < airtags->size(); i++) {
|
||||
if (mac == airtags->get(i).mac)
|
||||
return;
|
||||
}
|
||||
|
||||
int rssi = advertisedDevice->getRSSI();
|
||||
Serial.print("RSSI: ");
|
||||
Serial.print(rssi);
|
||||
Serial.print(" MAC: ");
|
||||
Serial.println(mac);
|
||||
Serial.print("Len: ");
|
||||
Serial.print(len);
|
||||
Serial.print(" Payload: ");
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
Serial.printf("%02X ", payLoad[i]);
|
||||
}
|
||||
Serial.println("\n");
|
||||
|
||||
AirTag airtag;
|
||||
airtag.mac = mac;
|
||||
airtag.payload.assign(payLoad, payLoad + len);
|
||||
|
||||
airtags->add(airtag);
|
||||
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
//display_string.concat("RSSI: ");
|
||||
display_string.concat((String)rssi);
|
||||
display_string.concat(" MAC: ");
|
||||
display_string.concat(mac);
|
||||
uint8_t temp_len = display_string.length();
|
||||
for (uint8_t i = 0; i < 40 - temp_len; i++)
|
||||
{
|
||||
display_string.concat(" ");
|
||||
}
|
||||
display_obj.display_buffer->add(display_string);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (wifi_scan_obj.currentScanMode == BT_SCAN_ALL) {
|
||||
if (buf >= 0)
|
||||
{
|
||||
display_string.concat(text_table4[0]);
|
||||
@@ -322,6 +431,7 @@ void WiFiScan::RunSetup() {
|
||||
ssids = new LinkedList<ssid>();
|
||||
access_points = new LinkedList<AccessPoint>();
|
||||
stations = new LinkedList<Station>();
|
||||
airtags = new LinkedList<AirTag>();
|
||||
|
||||
#ifdef HAS_BT
|
||||
watch_models = new WatchModel[26] {
|
||||
@@ -392,6 +502,14 @@ int WiFiScan::clearAPs() {
|
||||
return num_cleared;
|
||||
}
|
||||
|
||||
int WiFiScan::clearAirtags() {
|
||||
int num_cleared = airtags->size();
|
||||
while (airtags->size() > 0)
|
||||
airtags->remove(0);
|
||||
Serial.println("airtags: " + (String)airtags->size());
|
||||
return num_cleared;
|
||||
}
|
||||
|
||||
int WiFiScan::clearSSIDs() {
|
||||
int num_cleared = ssids->size();
|
||||
ssids->clear();
|
||||
@@ -565,7 +683,7 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
this->startWiFiAttacks(scan_mode, color, text_table4[47]);
|
||||
else if (scan_mode == WIFI_ATTACK_AP_SPAM)
|
||||
this->startWiFiAttacks(scan_mode, color, " AP Beacon Spam ");
|
||||
else if (scan_mode == BT_SCAN_ALL) {
|
||||
else if ((scan_mode == BT_SCAN_ALL) || (BT_SCAN_AIRTAG)){
|
||||
#ifdef HAS_BT
|
||||
RunBluetoothScan(scan_mode, color);
|
||||
#endif
|
||||
@@ -578,7 +696,8 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
|
||||
else if ((scan_mode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(scan_mode == BT_ATTACK_SPAM_ALL) ||
|
||||
(scan_mode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(scan_mode == BT_ATTACK_GOOGLE_SPAM)) {
|
||||
(scan_mode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(scan_mode == BT_ATTACK_FLIPPER_SPAM)) {
|
||||
#ifdef HAS_BT
|
||||
RunSwiftpairSpam(scan_mode, color);
|
||||
#endif
|
||||
@@ -759,11 +878,13 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
|
||||
|
||||
else if ((currentScanMode == BT_SCAN_ALL) ||
|
||||
(currentScanMode == BT_SCAN_AIRTAG) ||
|
||||
(currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
|
||||
(currentScanMode == BT_SCAN_WAR_DRIVE) ||
|
||||
(currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
|
||||
(currentScanMode == BT_SCAN_SKIMMERS))
|
||||
@@ -1867,7 +1988,7 @@ void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color)
|
||||
esp_wifi_start();
|
||||
esp_wifi_set_promiscuous(true);
|
||||
esp_wifi_set_promiscuous_filter(&filt);
|
||||
esp_wifi_set_promiscuous_rx_cb(&pwnSnifferCallback);
|
||||
esp_wifi_set_promiscuous_rx_cb(&beaconSnifferCallback);
|
||||
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
this->wifi_initialized = true;
|
||||
initTime = millis();
|
||||
@@ -1890,6 +2011,19 @@ void WiFiScan::executeSourApple() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void WiFiScan::generateRandomName(char *name, size_t length) {
|
||||
static const char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
// Generate the first character as uppercase
|
||||
name[0] = 'A' + (rand() % 26);
|
||||
|
||||
// Generate the remaining characters as lowercase
|
||||
for (size_t i = 1; i < length - 1; ++i) {
|
||||
name[i] = alphabet[rand() % (sizeof(alphabet) - 1)];
|
||||
}
|
||||
name[length - 1] = '\0'; // Null-terminate the string
|
||||
}
|
||||
|
||||
const char* WiFiScan::generateRandomName() {
|
||||
const char* charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
int len = rand() % 10 + 1; // Generate a random length between 1 and 10
|
||||
@@ -2321,6 +2455,8 @@ void WiFiScan::RunSwiftpairSpam(uint8_t scan_mode, uint16_t color) {
|
||||
display_obj.tft.drawCentreString("BLE Spam Samsung",120,16,2);
|
||||
else if (scan_mode == BT_ATTACK_GOOGLE_SPAM)
|
||||
display_obj.tft.drawCentreString("BLE Spam Google",120,16,2);
|
||||
else if (scan_mode == BT_ATTACK_FLIPPER_SPAM)
|
||||
display_obj.tft.drawCentreString("BLE Spam Flipper", 120, 16, 2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
@@ -2345,7 +2481,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
}
|
||||
NimBLEDevice::init("");
|
||||
pBLEScan = NimBLEDevice::getScan(); //create new scan
|
||||
if (scan_mode == BT_SCAN_ALL)
|
||||
if ((scan_mode == BT_SCAN_ALL) || (BT_SCAN_AIRTAG))
|
||||
{
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
@@ -2355,13 +2491,21 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
#ifdef HAS_ILI9341
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[41],120,16,2);
|
||||
if (scan_mode == BT_SCAN_ALL)
|
||||
display_obj.tft.drawCentreString(text_table4[41],120,16,2);
|
||||
else if (scan_mode == BT_SCAN_AIRTAG)
|
||||
display_obj.tft.drawCentreString("Airtag Sniff",120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), false);
|
||||
if (scan_mode == BT_SCAN_ALL)
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), false);
|
||||
else if (scan_mode == BT_SCAN_AIRTAG) {
|
||||
this->clearAirtags();
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanAllCallback(), true);
|
||||
}
|
||||
}
|
||||
else if ((scan_mode == BT_SCAN_WAR_DRIVE) || (scan_mode == BT_SCAN_WAR_DRIVE_CONT)) {
|
||||
#ifdef HAS_GPS
|
||||
@@ -2420,8 +2564,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
pBLEScan->setAdvertisedDeviceCallbacks(new bluetoothScanSkimmersCallback(), false);
|
||||
}
|
||||
pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster
|
||||
pBLEScan->setInterval(97);
|
||||
pBLEScan->setWindow(37); // less or equal setInterval value
|
||||
pBLEScan->setInterval(100);
|
||||
pBLEScan->setWindow(99); // less or equal setInterval value
|
||||
pBLEScan->setMaxResults(0);
|
||||
pBLEScan->start(0, scanCompleteCB, false);
|
||||
Serial.println("Started BLE Scan");
|
||||
@@ -2841,6 +2985,77 @@ void WiFiScan::apSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
}
|
||||
}
|
||||
|
||||
String WiFiScan::processPwnagotchiBeacon(const uint8_t* frame, int length) {
|
||||
// Approximate the start of JSON payload within the beacon frame
|
||||
int jsonStartIndex = 36; // Adjust based on actual frame structure if necessary
|
||||
int jsonEndIndex = length;
|
||||
|
||||
// Locate the actual JSON boundaries by finding '{' and '}'
|
||||
while (jsonStartIndex < length && frame[jsonStartIndex] != '{') jsonStartIndex++;
|
||||
while (jsonEndIndex > jsonStartIndex && frame[jsonEndIndex - 1] != '}') jsonEndIndex--;
|
||||
|
||||
if (jsonStartIndex >= jsonEndIndex) {
|
||||
Serial.println("JSON payload not found.");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Extract JSON substring from frame directly
|
||||
String jsonString = String((char*)frame + jsonStartIndex, jsonEndIndex - jsonStartIndex);
|
||||
|
||||
// Estimate an appropriate JSON document size based on payload length
|
||||
size_t jsonCapacity = jsonString.length() * 1.5; // Adding buffer for ArduinoJson needs
|
||||
|
||||
// Check if we have enough memory before creating StaticJsonDocument
|
||||
if (jsonCapacity > ESP.getFreeHeap()) {
|
||||
Serial.println("Insufficient memory to parse JSON.");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Parse JSON payload using ArduinoJson library
|
||||
StaticJsonDocument<2048> doc;
|
||||
DeserializationError error = deserializeJson(doc, jsonString);
|
||||
|
||||
if (error) {
|
||||
Serial.print("Failed to parse JSON: ");
|
||||
Serial.println(error.c_str());
|
||||
return "";
|
||||
}
|
||||
|
||||
// Check for Pwnagotchi keys "name" and "pwnd_tot"
|
||||
if (doc.containsKey("name") && doc.containsKey("pwnd_tot")) {
|
||||
const char* name = doc["name"];
|
||||
const char* ver = doc["version"];
|
||||
int pwnd_tot = doc["pwnd_tot"];
|
||||
bool deauth = doc["policy"]["deauth"];
|
||||
int uptime = doc["uptime"];
|
||||
|
||||
// Print and return the Pwnagotchi name and pwnd_tot
|
||||
Serial.print("Pwnagotchi Name: ");
|
||||
Serial.println(name);
|
||||
Serial.print("Pwnd Totals: ");
|
||||
Serial.println(pwnd_tot);
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
|
||||
display_obj.display_buffer->add(String("Pwnagotchi: ") + name + ", ");
|
||||
display_obj.display_buffer->add(" Pwnd: " + String(pwnd_tot) + ", ");
|
||||
display_obj.display_buffer->add(" Uptime: " + String(uptime) + ", ");
|
||||
if (deauth)
|
||||
display_obj.display_buffer->add(" Deauth: true, ");
|
||||
else
|
||||
display_obj.display_buffer->add(" Deauth: false, ");
|
||||
|
||||
display_obj.display_buffer->add(String(" Ver: ") + ver + " ");
|
||||
#endif
|
||||
|
||||
return String("Pwnagotchi: ") + name + ", \nPwnd: " + String(pwnd_tot) + ", \nVer: " + ver;
|
||||
} else {
|
||||
Serial.println("Not a Pwnagotchi frame.");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WiFiScan::beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
{
|
||||
extern WiFiScan wifi_scan_obj;
|
||||
@@ -2871,11 +3086,34 @@ void WiFiScan::beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type
|
||||
#else
|
||||
int buff = 0;
|
||||
#endif
|
||||
|
||||
uint8_t target_mac[6] = {0xde, 0xad, 0xbe, 0xef, 0xde, 0xad};
|
||||
|
||||
// It is a beacon
|
||||
if ((snifferPacket->payload[0] == 0x80) && (buff == 0))
|
||||
{
|
||||
bool mac_match = true;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (snifferPacket->payload[10 + i] != target_mac[i]) {
|
||||
mac_match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If MAC matches, call processPwnagotchiBeacon with frame data
|
||||
if (mac_match) {
|
||||
Serial.println("Pwnagotchi beacon detected!");
|
||||
wifi_scan_obj.processPwnagotchiBeacon(snifferPacket->payload, len);
|
||||
return;
|
||||
}
|
||||
|
||||
if (wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) {
|
||||
buffer_obj.append(snifferPacket, len);
|
||||
return;
|
||||
}
|
||||
|
||||
// Do signal strength stuff first
|
||||
if (wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) {
|
||||
else if (wifi_scan_obj.currentScanMode == WIFI_SCAN_SIG_STREN) {
|
||||
bool found = false;
|
||||
uint8_t targ_index = 0;
|
||||
AccessPoint targ_ap;
|
||||
@@ -2927,6 +3165,7 @@ void WiFiScan::beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type
|
||||
char addr[] = "00:00:00:00:00:00";
|
||||
getMAC(addr, snifferPacket->payload, 10);
|
||||
Serial.print(addr);
|
||||
Serial.print(" ESSID Len: " + (String)snifferPacket->payload[37]);
|
||||
Serial.print(" ESSID: ");
|
||||
if (snifferPacket->payload[37] <= 0)
|
||||
display_string.concat(addr);
|
||||
@@ -2948,12 +3187,12 @@ void WiFiScan::beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type
|
||||
|
||||
Serial.print(" ");
|
||||
|
||||
if (display_obj.display_buffer->size() == 0)
|
||||
{
|
||||
//if (display_obj.display_buffer->size() == 0)
|
||||
//{
|
||||
display_obj.loading = true;
|
||||
display_obj.display_buffer->add(display_string);
|
||||
display_obj.loading = false;
|
||||
}
|
||||
//}
|
||||
#endif
|
||||
|
||||
Serial.println();
|
||||
@@ -4666,7 +4905,8 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
(currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(currentScanMode == BT_ATTACK_SPAM_ALL) ||
|
||||
(currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_GOOGLE_SPAM)) {
|
||||
(currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_FLIPPER_SPAM)) {
|
||||
#ifdef HAS_BT
|
||||
if (currentTime - initTime >= 1000) {
|
||||
initTime = millis();
|
||||
@@ -4693,10 +4933,15 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
if ((currentScanMode == BT_ATTACK_SWIFTPAIR_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_SPAM_ALL))
|
||||
this->executeSwiftpairSpam(Microsoft);
|
||||
//this->executeSwiftpairSpam(FlipperZero);
|
||||
|
||||
if ((currentScanMode == BT_ATTACK_SOUR_APPLE) ||
|
||||
(currentScanMode == BT_ATTACK_SPAM_ALL))
|
||||
this->executeSourApple();
|
||||
|
||||
if ((currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
|
||||
(currentScanMode == BT_ATTACK_SPAM_ALL))
|
||||
this->executeSwiftpairSpam(FlipperZero);
|
||||
#endif
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_WAR_DRIVE) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#ifdef HAS_BT
|
||||
#include <NimBLEDevice.h>
|
||||
@@ -92,6 +93,8 @@
|
||||
#define BT_ATTACK_SAMSUNG_SPAM 39
|
||||
#define WIFI_SCAN_GPS_NMEA 40
|
||||
#define BT_ATTACK_GOOGLE_SPAM 41
|
||||
#define BT_ATTACK_FLIPPER_SPAM 42
|
||||
#define BT_SCAN_AIRTAG 43
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
@@ -152,6 +155,11 @@ struct Station {
|
||||
bool selected;
|
||||
};
|
||||
|
||||
struct AirTag {
|
||||
String mac; // MAC address of the AirTag
|
||||
std::vector<uint8_t> payload; // Payload data
|
||||
};
|
||||
|
||||
class WiFiScan
|
||||
{
|
||||
private:
|
||||
@@ -262,7 +270,8 @@ class WiFiScan
|
||||
Microsoft,
|
||||
Apple,
|
||||
Samsung,
|
||||
Google
|
||||
Google,
|
||||
FlipperZero
|
||||
};
|
||||
|
||||
#ifdef HAS_BT
|
||||
@@ -294,6 +303,8 @@ class WiFiScan
|
||||
void executeSwiftpairSpam(EBLEPayloadType type);
|
||||
void startWardriverWiFi();
|
||||
void generateRandomMac(uint8_t* mac);
|
||||
void generateRandomName(char *name, size_t length);
|
||||
String processPwnagotchiBeacon(const uint8_t* frame, int length);
|
||||
|
||||
void startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_string);
|
||||
|
||||
@@ -368,6 +379,7 @@ class WiFiScan
|
||||
void RunSetup();
|
||||
int clearSSIDs();
|
||||
int clearAPs();
|
||||
int clearAirtags();
|
||||
int clearStations();
|
||||
bool addSSID(String essid);
|
||||
int generateSSIDs(int count = 20);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
//// BOARD TARGETS
|
||||
//#define MARAUDER_M5STICKC
|
||||
//#define MARAUDER_MINI
|
||||
#define MARAUDER_MINI
|
||||
//#define MARAUDER_V4
|
||||
//#define MARAUDER_V6
|
||||
//#define MARAUDER_V6_1
|
||||
@@ -21,7 +21,7 @@
|
||||
//#define MARAUDER_REV_FEATHER
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.0.0"
|
||||
#define MARAUDER_VERSION "v1.1.0"
|
||||
|
||||
//// HARDWARE NAMES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
|
||||
@@ -212,7 +212,7 @@ void setup()
|
||||
backlightOn(); // Need this
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
delay(2000);
|
||||
//delay(2000);
|
||||
|
||||
// Do some stealth mode stuff
|
||||
#ifdef HAS_BUTTONS
|
||||
@@ -225,44 +225,49 @@ void setup()
|
||||
}
|
||||
#endif
|
||||
|
||||
display_obj.clearScreen();
|
||||
//display_obj.clearScreen();
|
||||
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
//display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
|
||||
display_obj.tft.println(text_table0[0]);
|
||||
//display_obj.tft.println(text_table0[0]);
|
||||
|
||||
delay(2000);
|
||||
//delay(2000);
|
||||
|
||||
display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
|
||||
//display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
|
||||
|
||||
display_obj.tft.println(text_table0[1]);
|
||||
//display_obj.tft.println(text_table0[1]);
|
||||
#endif
|
||||
|
||||
settings_obj.begin();
|
||||
|
||||
wifi_scan_obj.RunSetup();
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[2]));
|
||||
#endif
|
||||
//#ifdef HAS_SCREEN
|
||||
// display_obj.tft.println(F(text_table0[2]));
|
||||
//#endif
|
||||
|
||||
buffer_obj = Buffer();
|
||||
#if defined(HAS_SD)
|
||||
// Do some SD stuff
|
||||
if(sd_obj.initSD()) {
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[3]));
|
||||
//display_obj.tft.println(F(text_table0[3]));
|
||||
#endif
|
||||
} else {
|
||||
Serial.println(F("SD Card NOT Supported"));
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
|
||||
display_obj.tft.println(F(text_table0[4]));
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
//display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
|
||||
//display_obj.tft.println(F(text_table0[4]));
|
||||
//display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.tft.drawCentreString("Initializing...", TFT_WIDTH/2, TFT_HEIGHT * 0.82, 1);
|
||||
#endif
|
||||
|
||||
evil_portal_obj.setup();
|
||||
|
||||
#ifdef HAS_BATTERY
|
||||
@@ -270,11 +275,11 @@ void setup()
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[5]));
|
||||
//display_obj.tft.println(F(text_table0[5]));
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[6]));
|
||||
//display_obj.tft.println(F(text_table0[6]));
|
||||
#endif
|
||||
|
||||
#ifdef HAS_BATTERY
|
||||
@@ -293,27 +298,27 @@ void setup()
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[7]));
|
||||
//display_obj.tft.println(F(text_table0[7]));
|
||||
|
||||
delay(500);
|
||||
//delay(500);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_GPS
|
||||
gps_obj.begin();
|
||||
#ifdef HAS_SCREEN
|
||||
if (gps_obj.getGpsModuleStatus())
|
||||
display_obj.tft.println("GPS Module connected");
|
||||
else
|
||||
display_obj.tft.println("GPS Module NOT connected");
|
||||
#endif
|
||||
//#ifdef HAS_SCREEN
|
||||
//if (gps_obj.getGpsModuleStatus())
|
||||
//display_obj.tft.println("GPS Module connected");
|
||||
//else
|
||||
//display_obj.tft.println("GPS Module NOT connected");
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.println(F(text_table0[8]));
|
||||
//display_obj.tft.println(F(text_table0[8]));
|
||||
|
||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
|
||||
delay(2000);
|
||||
//delay(2000);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user