Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
140451b47c | ||
|
|
6490a12b30 | ||
|
|
1a4136137d | ||
|
|
e79db36906 | ||
|
|
d9d25b0010 | ||
|
|
8a18e55bb7 | ||
|
|
1c86a71704 | ||
|
|
f7db1ea401 | ||
|
|
bdc209d489 | ||
|
|
cc891457ce | ||
|
|
6c3a0d30b7 | ||
|
|
12182af21c | ||
|
|
c9c6bbf971 | ||
|
|
7391a05c8a | ||
|
|
dd6f800b48 | ||
|
|
6f2c2862f6 | ||
|
|
fa4d3bf3e2 | ||
|
|
bf9baee37b | ||
|
|
1612ac4bf0 | ||
|
|
418a8ebf41 | ||
|
|
1e1f6f6b19 | ||
|
|
35b10ac9be | ||
|
|
10d5767ffa | ||
|
|
269e848a16 | ||
|
|
3ab8432443 | ||
|
|
9e07722292 | ||
|
|
5e5313a008 | ||
|
|
3ce996d9e2 | ||
|
|
96957a2cc1 | ||
|
|
ca4048983f | ||
|
|
a2fa6759a8 | ||
|
|
40e11b71f0 | ||
|
|
56acee78e4 | ||
|
|
470371adc1 | ||
|
|
fc5d27b4b6 | ||
|
|
9709bc3d3a | ||
|
|
9dbf0d4a69 | ||
|
|
2039e517af | ||
|
|
41d287c538 | ||
|
|
9ed469d914 | ||
|
|
7abc67242b | ||
|
|
7a8cf2aa50 | ||
|
|
40a4b5f22b | ||
|
|
e1de245ab5 | ||
|
|
5b1f11ef56 | ||
|
|
1897819939 | ||
|
|
80cc78e4a6 | ||
|
|
08b26c97e7 | ||
|
|
668cc1c720 | ||
|
|
452ff43210 | ||
|
|
5b24257fb8 | ||
|
|
eccbaae3a0 | ||
|
|
31393ad572 | ||
|
|
bace9ecf06 | ||
|
|
eb492c4cb7 | ||
|
|
1f980fe8b3 | ||
|
|
5d6e4ca808 | ||
|
|
c32dc08c18 | ||
|
|
df4f3b8102 | ||
|
|
1317276556 | ||
|
|
c0ec1c789e | ||
|
|
730a95de6d | ||
|
|
c871b1b2ab | ||
|
|
e8e1686918 | ||
|
|
8916178526 | ||
|
|
0a9f4edc94 | ||
|
|
c8dcda421d | ||
|
|
ed9a0ec659 | ||
|
|
07424baf64 | ||
|
|
48e0d08477 | ||
|
|
d7cdbbfd8d | ||
|
|
4435aec8d0 | ||
|
|
0a1e044b9a | ||
|
|
d8795de398 | ||
|
|
6ef37f65dc | ||
|
|
5509197b7b | ||
|
|
4aad42907a | ||
|
|
6eac839d72 | ||
|
|
83eb3e9371 | ||
|
|
e7e314b840 | ||
|
|
871ce80947 | ||
|
|
44a4e39c6f | ||
|
|
13271c29b9 | ||
|
|
f929dff7c5 | ||
|
|
9e3f85dd51 | ||
|
|
4a460db4f4 | ||
|
|
329529bbad | ||
|
|
dc39961eb0 | ||
|
|
4b58ed71c7 |
91
.travis.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
sudo: required
|
||||
|
||||
language: python
|
||||
python: 3.6
|
||||
|
||||
env:
|
||||
global:
|
||||
# The Arduino IDE will be installed at APPLICATION_FOLDER/arduino
|
||||
- APPLICATION_FOLDER="${HOME}/arduino-ide"
|
||||
- SKETCHBOOK_FOLDER="${HOME}/arduino-sketchbook"
|
||||
|
||||
before_install:
|
||||
|
||||
# TODO: undo
|
||||
# remove submodules, we don't want those to be actually tested for compliance
|
||||
- git submodule status | rm -Rf `cut -d ' ' -f 3`
|
||||
|
||||
# Formatting checks:
|
||||
# Check for files starting with a blank line
|
||||
- find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'head -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at start of $0."; false; fi'
|
||||
# Check for tabs
|
||||
- find . -path './.git' -prune -or -type f \( ! -iname ".gitmodules" \) -exec grep --with-filename --line-number --binary-files=without-match --regexp=$'\t' '{}' \; -exec echo 'Tab found.' \; -exec false '{}' +
|
||||
# Check for trailing whitespace
|
||||
- find . -path './.git' -prune -or -type f -exec grep --with-filename --line-number --binary-files=without-match --regexp='[[:blank:]]$' '{}' \; -exec echo 'Trailing whitespace found.' \; -exec false '{}' +
|
||||
# Check for non-Unix line endings
|
||||
- find . -path './.git' -prune -or -type f -exec grep --files-with-matches --binary-files=without-match --regexp=$'\r$' '{}' \; -exec echo 'Non-Unix EOL detected.' \; -exec false '{}' +
|
||||
# Check for blank lines at end of files
|
||||
- find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'tail -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at end of $0."; false; fi'
|
||||
# Check for files that don't end in a newline (https://stackoverflow.com/a/25686825)
|
||||
- find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
|
||||
|
||||
- git clone https://github.com/per1234/arduino-ci-script.git "${HOME}/scripts/arduino-ci-script"
|
||||
- cd "${HOME}/scripts/arduino-ci-script"
|
||||
# Get new tags from the remote
|
||||
- git fetch --tags
|
||||
# Checkout the latest tag
|
||||
- git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
- source "${HOME}/scripts/arduino-ci-script/arduino-ci-script.sh"
|
||||
|
||||
#- set_script_verbosity 1
|
||||
#- set_verbose_output_during_compilation "true"
|
||||
|
||||
# Check for library issues that don't affect compilation
|
||||
- set_library_testing "true"
|
||||
|
||||
- set_application_folder "$APPLICATION_FOLDER"
|
||||
- set_sketchbook_folder "$SKETCHBOOK_FOLDER"
|
||||
|
||||
- install_ide '("1.8.0" "1.8.9" "newest")'
|
||||
|
||||
# Install the library from the repository
|
||||
- install_library
|
||||
- install_library "M5Stack"
|
||||
- install_library 'https://github.com/bblanchon/ArduinoJson.git' # "ArduinoJSON"
|
||||
|
||||
- ls ${TRAVIS_BUILD_DIR} -la
|
||||
- ls ${TRAVIS_BUILD_DIR}/examples/M5Stack-SD-Menu/ -la
|
||||
- ls $SKETCHBOOK_FOLDER -la
|
||||
- ls $SKETCHBOOK_FOLDER/libraries -la
|
||||
- pwd
|
||||
# what the fsck is wrong install_package() ??
|
||||
- install_package "esp32:esp32" "https://dl.espressif.com/dl/package_esp32_index.json" # # esp32:esp32:m5stack-core-esp32
|
||||
#- /home/travis/arduino-ide/arduino-1.8.10/arduino --pref "compiler.warning_level=none" --save-prefs &>/dev/null
|
||||
#- /home/travis/arduino-ide/arduino-1.8.10/arduino --pref "build.warn_data_percentage=75" --save-prefs &>/dev/null
|
||||
#- /home/travis/arduino-ide/arduino-1.8.10/arduino --pref "boardsmanager.additional.urls=https://dl.espressif.com/dl/package_esp32_index.json" --save-prefs &>/dev/null
|
||||
#- /home/travis/arduino-ide/arduino-1.8.10/arduino --install-boards esp32:esp32 &>/dev/null
|
||||
- pip install pyserial
|
||||
|
||||
script:
|
||||
# Compile all example sketches included with the library
|
||||
# build_sketch arguments: sketch name, fqbn, allow failure, IDE version/list/range
|
||||
- check_library_manager_compliance "$TRAVIS_BUILD_DIR"
|
||||
- build_sketch "${TRAVIS_BUILD_DIR}/examples/M5Stack-SD-Menu/M5Stack-SD-Menu.ino" "esp32:esp32:m5stack-core-esp32:FlashFreq=80,UploadSpeed=921600" "false" "newest"
|
||||
|
||||
after_script:
|
||||
# Commit a report of the job results to the CI-reports repository
|
||||
- USER_NAME="$(echo "$TRAVIS_REPO_SLUG" | cut -d'/' -f 1)"
|
||||
- REPOSITORY_NAME="$(echo "$TRAVIS_REPO_SLUG" | cut -d'/' -f 2)"
|
||||
- publish_report_to_repository "$REPORT_GITHUB_TOKEN" "https://github.com/${USER_NAME}/CI-reports.git" "$REPOSITORY_NAME" "build_$(printf "%05d\n" "${TRAVIS_BUILD_NUMBER}")" "false"
|
||||
# Print a tab separated report of all sketch verification results to the log
|
||||
- display_report
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
webhooks:
|
||||
urls:
|
||||
- https://www.travisbuddy.com/
|
||||
on_success: never
|
||||
on_failure: always
|
||||
BIN
3Dfiles/ESP32 Marauder V6 Backplate_external.stl
Normal file
BIN
3Dfiles/ESP32 Marauder V6 Backplate_internal.stl
Normal file
BIN
3Dfiles/ESP32_Marauder_Enclosure_body_3_antenna_sd.stl
Normal file
|
Can't render this file because it contains an unexpected character in line 11 and column 76.
|
139
README.md
@@ -1,10 +1,25 @@
|
||||
# ESP32 Marauder v0.3.2
|
||||
<!---[](https://github.com/justcallmekoko/ESP32Marauder/blob/master/LICENSE)--->
|
||||
<!---[](https://gitter.im/justcallmekoko/ESP32Marauder)--->
|
||||
<!---[](https://travis-ci.com/justcallmekoko/ESP32Marauder)--->
|
||||
<!---Shields/Badges https://shields.io/--->
|
||||
|
||||
# ESP32 Marauder v0.6.8
|
||||
<p align="center"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/marauder3L.jpg?raw=true" width="300"></p>
|
||||
<p align="center">
|
||||
<b>A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32</b>
|
||||
<br><br>
|
||||
<a href="https://github.com/justcallmekoko/ESP32Marauder/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
<a href="https://gitter.im/justcallmekoko/ESP32Marauder"><img alt="Gitter" src="https://badges.gitter.im/justcallmekoko/ESP32Marauder.png"/></a>
|
||||
<a href="https://github.com/justcallmekoko/ESP32Marauder/releases/latest"><img src="https://img.shields.io/github/downloads/justcallmekoko/ESP32Marauder/total" alt="Downloads"/></a>
|
||||
<br>
|
||||
<a href="https://twitter.com/intent/follow?screen_name=jcmkyoutube"><img src="https://img.shields.io/twitter/follow/jcmkyoutube?style=social&logo=twitter" alt="Twitter"></a>
|
||||
<a href="https://www.instagram.com/just.call.me.koko"><img src="https://img.shields.io/badge/Follow%20Me-Instagram-orange" alt="Instagram"/></a>
|
||||
<br><br>
|
||||
<a href="https://www.tindie.com/products/justcallmekoko/esp32-marauder/"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>
|
||||
</p>
|
||||
|
||||
[](http://hits.dwyl.io/justcallmekoko/badges)
|
||||
|
||||
# Table Of Condensation
|
||||
- [About](#about)
|
||||
- [YouTube](#youtube)
|
||||
@@ -14,14 +29,18 @@
|
||||
- [Hardware](#hardware)
|
||||
- [Connections](#connections)
|
||||
- [Flashing Firmware](#flashing-firmware)
|
||||
- [Using Arduino IDE](#setting-up-arduino-ide)
|
||||
- [Using Arduino IDE](#using-arduino-ide)
|
||||
- [Updating Firmware](#updating-firmware)
|
||||
- [Web Update](#web-update)
|
||||
- [SD Update](#sd-update)
|
||||
- [Enclosure](#enclosure)
|
||||
- [Under Development](#under-development)
|
||||
- [Special Thanks](#special-thanks)
|
||||
- [For Sale Soon](#for-sale-soon)
|
||||
- [For Sale Now](#for-sale-now)
|
||||
|
||||
# About
|
||||
Sometimes you just gotta do what you gotta do. Am I right, ladies?
|
||||
The ESP32 Marauder is a suite of WiFi/Bluetooth offensive and defensive tools created for the ESP32 and was originally inspired by [Spacehuhn's](https://github.com/Spacehuhn) [esp8266_deauther](https://github.com/Spacehuhn/esp8366_deauther) project. The tool itself serves as a portable device used to test and analyze WiFi and Bluetooth devices. Use this tool and its firmware with caution as the use of some of its capabilities without explicit consent from the target owner is unlawful in most countries. For more information about this project and how it's assembled, follow the video link below.
|
||||
The ESP32 Marauder is a suite of WiFi/Bluetooth offensive and defensive tools created for the ESP32 and was originally inspired by [Spacehuhn's](https://github.com/Spacehuhn) [esp8266_deauther](https://github.com/Spacehuhn/esp8366_deauther) project. The tool itself serves as a portable device used to test and analyze WiFi and Bluetooth devices. Use this tool and its firmware with caution as the use of some of its capabilities without explicit consent from the target owner is unlawful in most countries. For more information about this project and how it's assembled, follow the video link below. Track features and issues [here](https://github.com/justcallmekoko/ESP32Marauder/issues). Check out [#esp32marauder](https://www.instagram.com/explore/tags/esp32marauder/) on Instagram.
|
||||
**Note:** Because of espressif's ESP32-IDF, the ESP32 included with Marauder is incapable of transmitting deauthentication frames.
|
||||
|
||||
### YouTube
|
||||
@@ -39,14 +58,14 @@ You can check out the marauder article written [here](https://www.hackster.io/ne
|
||||
- Bluetooth Sniffer: Sniff bluetooth devices within range
|
||||
- Detect Card Skimmers: Detect bluetooth enabled credit card skimmers
|
||||
- Packet Monitor: Show WiFi packet density on a given channel using a time bar graph
|
||||
- Deauthentication Packet Sniffer: Detect deauthentication packets sent on all channels
|
||||
- EAPOL/PMKID Scan: Capture EAPOL/PMKID frames
|
||||
- Deauth Sniff: Detect deauthentication packets sent on all channels
|
||||
- Draw: Just doodle on the screen or whatever
|
||||
|
||||
### Developing
|
||||
- Emulate Bluetooth: Emulate a bluetooth device with a specific name
|
||||
- OTA Firmware Update: Update Marauder firmware over the air with .bin file
|
||||
- Update Firmware: Update Marauder firmware over the air via web interface or with SD card
|
||||
- Save PCAP files to SD card
|
||||
|
||||
# Do It Yourself
|
||||
<p align="center"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/diy.png?raw=true" width="800"></p>
|
||||
|
||||
## Hardware
|
||||
This project requires the following hardware in order to work:
|
||||
@@ -58,22 +77,23 @@ This project requires the following hardware in order to work:
|
||||
### Connections
|
||||
Make the following connections between your 2.8" TFT Screen and your ESP32 board. You may need to refer to a pinout sheet specific to the ESP32 dev board you have chosen. For more infomation about this circuit, please refer to [this schematic](https://github.com/justcallmekoko/ESP32Marauder/blob/master/schematics/Schematic_ESP32-Marauder-2_ESP32-Marauder-2-Schematic_20191007113616_png.png)
|
||||
|
||||
| 2.8" TFT | ESP32 |
|
||||
| -------- | ------ |
|
||||
| VCC | VCC |
|
||||
| GND | GND |
|
||||
| CS | GPIO17 |
|
||||
| RESET | GPIO5 |
|
||||
| D/C | GPIO16 |
|
||||
| MOSI | GPIO23 |
|
||||
| SCK | GPIO18 |
|
||||
| LED | GPIO32 |
|
||||
| MISO | GPIO19 |
|
||||
| T_CLK | GPIO18 |
|
||||
| T_CS | GPIO21 |
|
||||
| T_DI | GPIO23 |
|
||||
| T_DO | GPIO19 |
|
||||
| T_IRQ | N/C |
|
||||
| SD Card | 2.8" TFT | ESP32 |
|
||||
| ------- | -------- | ------ |
|
||||
| | VCC | VCC |
|
||||
| | GND | GND |
|
||||
| | CS | GPIO17 |
|
||||
| | RESET | GPIO5 |
|
||||
| | D/C | GPIO16 |
|
||||
| SD_MOSI | MOSI | GPIO23 |
|
||||
| SD_SCK | SCK | GPIO18 |
|
||||
| | LED | GPIO32 |
|
||||
| SD_MISO | MISO | GPIO19 |
|
||||
| | T_CLK | GPIO18 |
|
||||
| | T_CS | GPIO21 |
|
||||
| | T_DI | GPIO23 |
|
||||
| | T_DO | GPIO19 |
|
||||
| | T_IRQ | |
|
||||
| SD_CS | | GPIO12 |
|
||||
|
||||
## Flashing Firmware
|
||||
### Using Arduino IDE
|
||||
@@ -82,21 +102,72 @@ Make the following connections between your 2.8" TFT Screen and your ESP32 board
|
||||
3. Add the following URL to `Additional Boards Manager URLs:`
|
||||
- https://dl.espressif.com/dl/package_esp32_index.json
|
||||
4. Go to `Tools`>`Board`>`Boards Manager`, search for `esp32` and install `esp32 by Espressif Systems`
|
||||
6. Install Spacehuhn's [SimpleList](https://github.com/spacehuhn/SimpleList) library in your Arduino IDE
|
||||
5. Install Spacehuhn's [SimpleList](https://github.com/spacehuhn/SimpleList) library in your Arduino IDE
|
||||
- Download the SimpleList repo
|
||||
- In the Arduino IDE, go to `Sketch`>`Include Library`>`Add .ZIP Library...` and add the SimpleList-master.zip you just downloaded
|
||||
7. Install Bodmer's [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library in your Arduino IDE
|
||||
<!---6. Install Bodmer's [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library in your Arduino IDE--->
|
||||
6. Install my fork of Bodmer's [TFT_eSPI](https://github.com/justcallmekoko/TFT_eSPI) library in your Arduino IDE
|
||||
- Download the TFT_eSPI repo
|
||||
- In the Arduino IDE, go to `Sketch`>`Include Library`>`Add .ZIP Library...` and add the TFT-eSPI-master.zip you just downloaded
|
||||
- Make the following modifications shown in [this issue](https://github.com/justcallmekoko/ESP32Marauder/issues/2#issuecomment-555695918) to the TFT_eSPI library you just installed
|
||||
8. Follow [these instructions](https://github.com/me-no-dev/arduino-esp32fs-plugin) for installing ESP32 Spiffs Tool
|
||||
9. Install the [CH340 Drivers](https://github.com/justcallmekoko/ESP32Marauder/blob/master/Drivers/CH34x_Install_Windows_v3_4.EXE)
|
||||
10. Download or clone this repository
|
||||
11. Open `esp32_marauder.ino`
|
||||
12. Plug your ESP32 into a USB port and select the COM port under `Tools`>`Port`
|
||||
7. Follow [these instructions](https://github.com/me-no-dev/arduino-esp32fs-plugin) for installing ESP32 Spiffs Tool
|
||||
8. Install the [CH340 Drivers](https://github.com/justcallmekoko/ESP32Marauder/blob/master/Drivers/CH34x_Install_Windows_v3_4.EXE)
|
||||
9. Download or clone this repository
|
||||
10. Open `esp32_marauder.ino`
|
||||
11. Plug your ESP32 into a USB port and select the COM port under `Tools`>`Port`
|
||||
12. Select `LOLIN D32` under `Tools`>`Boards`
|
||||
13. Click `ESP32 Sketch Data Upload` and wait for the SPIFFS upload to finish
|
||||
14. Click the upload button
|
||||
|
||||
<p align="center">
|
||||
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/m5stack.jpg?raw=true" height="300">
|
||||
<img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/odroid_marauder.jpg?raw=true" height="300">
|
||||
</p>
|
||||
|
||||
## Updating Firmware
|
||||
There are multiple options available to update the Marauder firmware. If you have already built the project from this repo, you can just pull the latest commit and flash the firmware using the Arduino IDE (see [here](#using-arduino-ide)).
|
||||
If you own an ESP32 Marauder (v0.4.0 or later) and have not build the project, you can follow [these instructions](#web-update) for installing the latest update over the air via Marauder's web interface or [these instructions](#sd-update) for installing the latest update using an SD Card.
|
||||
|
||||
### Web Update
|
||||
1. Download the [latest release](https://github.com/justcallmekoko/ESP32Marauder/releases/latest) of the Marauder firmware
|
||||
2. With Marauder powered on, navigate to `Device`>`Update Firmware`>`Web Update`
|
||||
- Marauder will display details on screen about the status of the update
|
||||
3. Connect to the MarauderOTA WiFi network from your computer
|
||||
- password: justcallmekoko
|
||||
4. On your web browser, navigate to `http://192.168.4.1`
|
||||
5. Enter the username and password
|
||||
- Username: admin
|
||||
- Password: admin
|
||||
6. Click the `Browse` button and select the .bin file you downloaded from the releases
|
||||
7. Click `Update`
|
||||
- Marauder will automatically reboot once the update has been applied
|
||||
|
||||
### SD Update
|
||||
*Using a Samsung MicroSD card will cause Marauder not to boot*
|
||||
1. Download the [latest release](https://github.com/justcallmekoko/ESP32Marauder/releases/latest) of the Marauder firmware
|
||||
2. Copy the bin file you downloaded to the root of an SD card
|
||||
3. Rename the bin file on the SD card to `update.bin`
|
||||
4. With Marauder powered off, insert the SD card into Marauder
|
||||
5. Power Marauder on and navigate to `Device`>`Update Firmware`>`SD Update`
|
||||
6. Click `Yes` to confirm the update
|
||||
- Marauder will automatically reboot once the update has been applied
|
||||
|
||||
## Enclosure
|
||||
The ESP32 Marauder sold on Tindie comes with its own 3D printed enclosure. If you want to replace the enclosure that came with yours or you want to try to fit your own hardware in an enclosure and have access to a 3D printer, you can download the STL files [here](https://github.com/justcallmekoko/ESP32Marauder/tree/master/3Dfiles) or from [Thingiverse](https://www.thingiverse.com/thing:4146626).
|
||||
|
||||
Instructions from Thingiverse
|
||||
Components of the project:
|
||||
- ESP32 Marauder
|
||||
- 4 M2.5x10 Hex screws
|
||||
- Enclosure face plate
|
||||
- Enclosure body
|
||||
|
||||
How to do the thing:
|
||||
1. Print both the face plate and the body
|
||||
2. Mount the face plate onto the screen of the Marauder by putting the pegs through the holes on the screen PCB
|
||||
3. Lower the Marauder into the body of the enclosure and ensure the battery sits within the trench in the center of the body
|
||||
4. Fasten the face plate to the body using 4 M2.5x10 hex screws.
|
||||
- The top of the screws should be flush with the surface of the face plate
|
||||
|
||||
# Under Development
|
||||
Currently the ESP32 Marauder has limited firmware capabilities. Most of the work so far has been put into designing the hardware. New firmware features will be added over time and will eventually reach a point where this project will be a fully capable hacking machine.
|
||||
@@ -104,10 +175,10 @@ Currently the ESP32 Marauder has limited firmware capabilities. Most of the work
|
||||
# Special Thanks
|
||||
- [Spacehuhn](https://github.com/spacehuhn) for an easy to use linked list library [SimpleList](https://github.com/spacehuhn/SimpleList)
|
||||
- Also a well designed menu structure. I adapted it to the TFT GUI because it worked perfectly
|
||||
- Also...providing the buffer class used to save pcap files to an SD card
|
||||
- [Ivanseidel](https://github.com/ivanseidel) for providing a thread safe [LinkedList](https://github.com/ivanseidel/LinkedList) library
|
||||
- [Bodmer](https://github.com/Bodmer) for a comprehensive TFT touch screen library [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI)
|
||||
- [HyderHasnain](https://github.com/hyderhasnain) for an adaptable [line graph](https://github.com/hyderhasnain/arduino_touchscreen_controller/blob/master/Code/AccelGraph_Original.ino) to be used as the packet monitor
|
||||
|
||||
# For Sale Now
|
||||
You can buy the ESP32 Marauder using [this link](https://www.tindie.com/products/justcallmekoko/esp32-marauder/)
|
||||
|
||||
<a href="https://www.tindie.com/stores/justcallmekoko/?ref=offsite_badges&utm_source=sellers_justcallmekoko&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>
|
||||
|
||||
@@ -250,10 +250,10 @@
|
||||
// The RPi typically only works at 20MHz maximum.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
#define SPI_FREQUENCY 5000000
|
||||
//define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
//#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
|
||||
246
esp32_marauder/Assets.h
Normal file
43
esp32_marauder/BatteryInterface.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "BatteryInterface.h"
|
||||
|
||||
BatteryInterface::BatteryInterface() {
|
||||
|
||||
}
|
||||
|
||||
void BatteryInterface::main(uint32_t currentTime) {
|
||||
if (currentTime != 0) {
|
||||
if (currentTime - initTime >= 3000) {
|
||||
//Serial.println("Checking Battery Level");
|
||||
this->initTime = millis();
|
||||
int8_t new_level = this->getBatteryLevel();
|
||||
//this->battery_level = this->getBatteryLevel();
|
||||
if (this->battery_level != new_level) {
|
||||
Serial.println("Battery Level changed: " + (String)new_level);
|
||||
this->battery_level = new_level;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BatteryInterface::RunSetup() {
|
||||
Wire.begin(I2C_SDA, I2C_SCL);
|
||||
this->initTime = millis();
|
||||
}
|
||||
|
||||
int8_t BatteryInterface::getBatteryLevel() {
|
||||
Wire.beginTransmission(IP5306_ADDR);
|
||||
Wire.write(0x78);
|
||||
if (Wire.endTransmission(false) == 0 &&
|
||||
Wire.requestFrom(0x75, 1)) {
|
||||
this->i2c_supported = true;
|
||||
switch (Wire.read() & 0xF0) {
|
||||
case 0xE0: return 25;
|
||||
case 0xC0: return 50;
|
||||
case 0x80: return 75;
|
||||
case 0x00: return 100;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
this->i2c_supported = false;
|
||||
return -1;
|
||||
}
|
||||
28
esp32_marauder/BatteryInterface.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef BatteryInterface_h
|
||||
#define BatteryInterface_h
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
#define I2C_SDA 33
|
||||
#define I2C_SCL 22
|
||||
#define IP5306_ADDR 0x75
|
||||
|
||||
class BatteryInterface {
|
||||
private:
|
||||
uint32_t initTime = 0;
|
||||
|
||||
public:
|
||||
int8_t battery_level = 0;
|
||||
int8_t old_level = 0;
|
||||
bool i2c_supported = false;
|
||||
|
||||
BatteryInterface();
|
||||
|
||||
void RunSetup();
|
||||
void main(uint32_t currentTime);
|
||||
int8_t getBatteryLevel();
|
||||
};
|
||||
|
||||
#endif
|
||||
202
esp32_marauder/Buffer.cpp
Normal file
@@ -0,0 +1,202 @@
|
||||
#include "Buffer.h"
|
||||
|
||||
Buffer::Buffer(){
|
||||
bufA = (uint8_t*)malloc(BUF_SIZE);
|
||||
bufB = (uint8_t*)malloc(BUF_SIZE);
|
||||
}
|
||||
|
||||
void Buffer::open(fs::FS* fs, String fn){
|
||||
int i=0;
|
||||
do{
|
||||
fileName = "/"+fn+"_"+(String)i+".pcap";
|
||||
i++;
|
||||
} while(fs->exists(fileName));
|
||||
|
||||
Serial.println(fileName);
|
||||
|
||||
file = fs->open(fileName, FILE_WRITE);
|
||||
file.close();
|
||||
|
||||
bufSizeA = 0;
|
||||
bufSizeB = 0;
|
||||
|
||||
writing = true;
|
||||
|
||||
write(uint32_t(0xa1b2c3d4)); // magic number
|
||||
write(uint16_t(2)); // major version number
|
||||
write(uint16_t(4)); // minor version number
|
||||
write(int32_t(0)); // GMT to local correction
|
||||
write(uint32_t(0)); // accuracy of timestamps
|
||||
write(uint32_t(SNAP_LEN)); // max length of captured packets, in octets
|
||||
write(uint32_t(105)); // data link type
|
||||
|
||||
//useSD = true;
|
||||
}
|
||||
|
||||
void Buffer::close(fs::FS* fs){
|
||||
if(!writing) return;
|
||||
forceSave(fs);
|
||||
writing = false;
|
||||
Serial.println("file closed");
|
||||
}
|
||||
|
||||
void Buffer::addPacket(uint8_t* buf, uint32_t len){
|
||||
|
||||
// buffer is full -> drop packet
|
||||
if((useA && bufSizeA + len >= BUF_SIZE && bufSizeB > 0) || (!useA && bufSizeB + len >= BUF_SIZE && bufSizeA > 0)){
|
||||
//Serial.print(";");
|
||||
return;
|
||||
}
|
||||
|
||||
if(useA && bufSizeA + len + 16 >= BUF_SIZE && bufSizeB == 0){
|
||||
useA = false;
|
||||
//Serial.println("\nswitched to buffer B");
|
||||
}
|
||||
else if(!useA && bufSizeB + len + 16 >= BUF_SIZE && bufSizeA == 0){
|
||||
useA = true;
|
||||
//Serial.println("\nswitched to buffer A");
|
||||
}
|
||||
|
||||
uint32_t microSeconds = micros(); // e.g. 45200400 => 45s 200ms 400us
|
||||
uint32_t seconds = (microSeconds/1000)/1000; // e.g. 45200400/1000/1000 = 45200 / 1000 = 45s
|
||||
|
||||
microSeconds -= seconds*1000*1000; // e.g. 45200400 - 45*1000*1000 = 45200400 - 45000000 = 400us (because we only need the offset)
|
||||
|
||||
write(seconds); // ts_sec
|
||||
write(microSeconds); // ts_usec
|
||||
write(len); // incl_len
|
||||
write(len); // orig_len
|
||||
|
||||
write(buf, len); // packet payload
|
||||
}
|
||||
|
||||
void Buffer::write(int32_t n){
|
||||
uint8_t buf[4];
|
||||
buf[0] = n;
|
||||
buf[1] = n >> 8;
|
||||
buf[2] = n >> 16;
|
||||
buf[3] = n >> 24;
|
||||
write(buf,4);
|
||||
}
|
||||
|
||||
void Buffer::write(uint32_t n){
|
||||
uint8_t buf[4];
|
||||
buf[0] = n;
|
||||
buf[1] = n >> 8;
|
||||
buf[2] = n >> 16;
|
||||
buf[3] = n >> 24;
|
||||
write(buf,4);
|
||||
}
|
||||
|
||||
void Buffer::write(uint16_t n){
|
||||
uint8_t buf[2];
|
||||
buf[0] = n;
|
||||
buf[1] = n >> 8;
|
||||
write(buf,2);
|
||||
}
|
||||
|
||||
void Buffer::write(uint8_t* buf, uint32_t len){
|
||||
if(!writing) return;
|
||||
|
||||
if(useA){
|
||||
memcpy(&bufA[bufSizeA], buf, len);
|
||||
bufSizeA += len;
|
||||
}else{
|
||||
memcpy(&bufB[bufSizeB], buf, len);
|
||||
bufSizeB += len;
|
||||
}
|
||||
}
|
||||
|
||||
void Buffer::save(fs::FS* fs){
|
||||
if(saving) return; // makes sure the function isn't called simultaneously on different cores
|
||||
|
||||
// buffers are already emptied, therefor saving is unecessary
|
||||
if((useA && bufSizeB == 0) || (!useA && bufSizeA == 0)){
|
||||
//Serial.printf("useA: %s, bufA %u, bufB %u\n",useA ? "true" : "false",bufSizeA,bufSizeB); // for debug porpuses
|
||||
return;
|
||||
}
|
||||
|
||||
//Serial.println("saving file");
|
||||
|
||||
uint32_t startTime = millis();
|
||||
uint32_t finishTime;
|
||||
|
||||
file = fs->open(fileName, FILE_APPEND);
|
||||
if (!file) {
|
||||
Serial.println("Failed to open file '"+fileName+"'");
|
||||
//useSD = false;
|
||||
return;
|
||||
}
|
||||
|
||||
saving = true;
|
||||
|
||||
uint32_t len;
|
||||
|
||||
if(useA){
|
||||
file.write(bufB, bufSizeB);
|
||||
len = bufSizeB;
|
||||
bufSizeB = 0;
|
||||
}
|
||||
else{
|
||||
file.write(bufA, bufSizeA);
|
||||
len = bufSizeA;
|
||||
bufSizeA = 0;
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
finishTime = millis() - startTime;
|
||||
|
||||
//Serial.printf("\n%u bytes written for %u ms\n", len, finishTime);
|
||||
|
||||
saving = false;
|
||||
|
||||
}
|
||||
|
||||
void Buffer::forceSave(fs::FS* fs){
|
||||
uint32_t len = bufSizeA + bufSizeB;
|
||||
if(len == 0) return;
|
||||
|
||||
file = fs->open(fileName, FILE_APPEND);
|
||||
if (!file) {
|
||||
Serial.println("Failed to open file '"+fileName+"'");
|
||||
//useSD = false;
|
||||
return;
|
||||
}
|
||||
|
||||
saving = true;
|
||||
writing = false;
|
||||
|
||||
if(useA){
|
||||
|
||||
if(bufSizeB > 0){
|
||||
file.write(bufB, bufSizeB);
|
||||
bufSizeB = 0;
|
||||
}
|
||||
|
||||
if(bufSizeA > 0){
|
||||
file.write(bufA, bufSizeA);
|
||||
bufSizeA = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(bufSizeA > 0){
|
||||
file.write(bufA, bufSizeA);
|
||||
bufSizeA = 0;
|
||||
}
|
||||
|
||||
if(bufSizeB > 0){
|
||||
file.write(bufB, bufSizeB);
|
||||
bufSizeB = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
//Serial.printf("saved %u bytes\n",len);
|
||||
|
||||
saving = false;
|
||||
writing = true;
|
||||
}
|
||||
41
esp32_marauder/Buffer.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef Buffer_h
|
||||
#define Buffer_h
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "FS.h"
|
||||
//#include "SD_MMC.h"
|
||||
|
||||
#define BUF_SIZE 3 * 1024 // Had to reduce buffer size to save RAM. GG @spacehuhn
|
||||
#define SNAP_LEN 2324 // max len of each recieved packet
|
||||
|
||||
//extern bool useSD;
|
||||
|
||||
class Buffer {
|
||||
public:
|
||||
Buffer();
|
||||
void open(fs::FS* fs, String fn = "");
|
||||
void close(fs::FS* fs);
|
||||
void addPacket(uint8_t* buf, uint32_t len);
|
||||
void save(fs::FS* fs);
|
||||
void forceSave(fs::FS* fs);
|
||||
private:
|
||||
void write(int32_t n);
|
||||
void write(uint32_t n);
|
||||
void write(uint16_t n);
|
||||
void write(uint8_t* buf, uint32_t len);
|
||||
|
||||
uint8_t* bufA;
|
||||
uint8_t* bufB;
|
||||
|
||||
uint32_t bufSizeA = 0;
|
||||
uint32_t bufSizeB = 0;
|
||||
|
||||
bool writing = false; // acceppting writes to buffer
|
||||
bool useA = true; // writing to bufA or bufB
|
||||
bool saving = false; // currently saving onto the SD card
|
||||
|
||||
String fileName = "/0.pcap";
|
||||
File file;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -7,6 +7,10 @@ Big thanks to bodmer for having great TFT and JPEG libraries
|
||||
https://github.com/bodmer
|
||||
*/
|
||||
|
||||
//PROGMEM lv_obj_t * slider_label;
|
||||
//PROGMEM lv_obj_t * ta1;
|
||||
//PROGMEM lv_obj_t * ta2;
|
||||
|
||||
Display::Display()
|
||||
{
|
||||
}
|
||||
@@ -17,7 +21,7 @@ void Display::RunSetup()
|
||||
run_setup = false;
|
||||
|
||||
// Need to declare new
|
||||
display_buffer = new SimpleList<String>();
|
||||
display_buffer = new LinkedList<String>();
|
||||
|
||||
tft.init();
|
||||
tft.setRotation(0); // Portrait
|
||||
@@ -27,12 +31,23 @@ void Display::RunSetup()
|
||||
|
||||
// Calibration data
|
||||
//uint16_t calData[5] = { 390, 3516, 253, 3520, 7 }; tft.setRotation(1); // Portrait
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait
|
||||
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
tft.setTouch(calData);
|
||||
|
||||
//tft.fillScreen(TFT_BLACK);
|
||||
clearScreen();
|
||||
|
||||
Serial.println("SPI_FREQUENCY: " + (String)SPI_FREQUENCY);
|
||||
Serial.println("SPI_READ_FREQUENCY: " + (String)SPI_READ_FREQUENCY);
|
||||
Serial.println("SPI_TOUCH_FREQUENCY: " + (String)SPI_TOUCH_FREQUENCY);
|
||||
|
||||
|
||||
// Initialize file system
|
||||
// This should probably have its own class
|
||||
@@ -53,6 +68,75 @@ void Display::RunSetup()
|
||||
delay(5000);
|
||||
}
|
||||
|
||||
/* Interrupt driven periodic handler */
|
||||
/*
|
||||
void Display::lv_tick_handler()
|
||||
{
|
||||
lv_tick_inc(LVGL_TICK_PERIOD);
|
||||
}*/
|
||||
|
||||
/* Display flushing */
|
||||
/*void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
|
||||
{
|
||||
extern Display display_obj;
|
||||
uint16_t c;
|
||||
|
||||
display_obj.tft.startWrite();
|
||||
display_obj.tft.setAddrWindow(area->x1, area->y1, (area->x2 - area->x1 + 1), (area->y2 - area->y1 + 1));
|
||||
for (int y = area->y1; y <= area->y2; y++) {
|
||||
for (int x = area->x1; x <= area->x2; x++) {
|
||||
c = color_p->full;
|
||||
display_obj.tft.writeColor(c, 1);
|
||||
color_p++;
|
||||
}
|
||||
}
|
||||
display_obj.tft.endWrite();
|
||||
lv_disp_flush_ready(disp);
|
||||
}*/
|
||||
|
||||
/*
|
||||
bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data)
|
||||
{
|
||||
extern Display display_obj;
|
||||
|
||||
uint16_t touchX, touchY;
|
||||
|
||||
bool touched = display_obj.tft.getTouch(&touchX, &touchY, 600);
|
||||
|
||||
if(!touched)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(touchX>WIDTH_1 || touchY > HEIGHT_1)
|
||||
{
|
||||
Serial.println("Y or y outside of expected parameters..");
|
||||
Serial.print("y:");
|
||||
Serial.print(touchX);
|
||||
Serial.print(" x:");
|
||||
Serial.print(touchY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
data->state = touched ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
|
||||
|
||||
//if(data->state == LV_INDEV_STATE_PR) touchpad_get_xy(&last_x, &last_y);
|
||||
|
||||
data->point.x = touchX;
|
||||
data->point.y = touchY;
|
||||
|
||||
Serial.print("Data x");
|
||||
Serial.println(touchX);
|
||||
|
||||
Serial.print("Data y");
|
||||
Serial.println(touchY);
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}*/
|
||||
|
||||
void Display::tftDrawGraphObjects(byte x_scale)
|
||||
{
|
||||
//draw the graph objects
|
||||
@@ -66,6 +150,13 @@ void Display::tftDrawGraphObjects(byte x_scale)
|
||||
tft.setCursor(3, 228); tft.print("0"); // "-" at bottom of y axis
|
||||
}
|
||||
|
||||
void Display::tftDrawEapolColorKey()
|
||||
{
|
||||
//Display color key
|
||||
tft.setTextSize(1); tft.setTextColor(TFT_WHITE);
|
||||
tft.fillRect(14, 0, 15, 8, TFT_CYAN); tft.setCursor(30, 0); tft.print(" - EAPOL");
|
||||
}
|
||||
|
||||
void Display::tftDrawColorKey()
|
||||
{
|
||||
//Display color key
|
||||
@@ -101,6 +192,9 @@ void Display::tftDrawXScaleButtons(byte x_scale)
|
||||
"+",
|
||||
2);
|
||||
|
||||
key[0].setLabelDatum(1, 5, MC_DATUM);
|
||||
key[1].setLabelDatum(1, 5, MC_DATUM);
|
||||
|
||||
key[0].drawButton();
|
||||
key[1].drawButton();
|
||||
}
|
||||
@@ -131,6 +225,9 @@ void Display::tftDrawYScaleButtons(byte y_scale)
|
||||
"+",
|
||||
2);
|
||||
|
||||
key[2].setLabelDatum(1, 5, MC_DATUM);
|
||||
key[3].setLabelDatum(1, 5, MC_DATUM);
|
||||
|
||||
key[2].drawButton();
|
||||
key[3].drawButton();
|
||||
}
|
||||
@@ -161,6 +258,9 @@ void Display::tftDrawChannelScaleButtons(int set_channel)
|
||||
"+",
|
||||
2);
|
||||
|
||||
key[4].setLabelDatum(1, 5, MC_DATUM);
|
||||
key[5].setLabelDatum(1, 5, MC_DATUM);
|
||||
|
||||
key[4].drawButton();
|
||||
key[5].drawButton();
|
||||
}
|
||||
@@ -181,13 +281,15 @@ void Display::tftDrawExitScaleButtons()
|
||||
"X",
|
||||
2);
|
||||
|
||||
key[6].setLabelDatum(1, 5, MC_DATUM);
|
||||
|
||||
key[6].drawButton();
|
||||
}
|
||||
|
||||
void Display::twoPartDisplay(String center_text)
|
||||
{
|
||||
tft.setTextColor(TFT_BLACK, TFT_YELLOW);
|
||||
tft.fillRect(0,16,240,144, TFT_YELLOW);
|
||||
tft.fillRect(0,16,HEIGHT_1,144, TFT_YELLOW);
|
||||
//tft.drawCentreString(center_text,120,82,1);
|
||||
tft.setTextWrap(true);
|
||||
tft.setFreeFont(NULL);
|
||||
@@ -202,8 +304,8 @@ void Display::twoPartDisplay(String center_text)
|
||||
void Display::touchToExit()
|
||||
{
|
||||
tft.setTextColor(TFT_BLACK, TFT_LIGHTGREY);
|
||||
tft.fillRect(0,16,240,16, TFT_LIGHTGREY);
|
||||
tft.drawCentreString("Touch screen to exit",120,16,2);
|
||||
tft.fillRect(0,32,HEIGHT_1,16, TFT_LIGHTGREY);
|
||||
tft.drawCentreString("Touch screen to exit",120,32,2);
|
||||
}
|
||||
|
||||
|
||||
@@ -230,6 +332,7 @@ void Display::displayBuffer(bool do_clear)
|
||||
delay(print_delay_1);
|
||||
yDraw = scroll_line(TFT_RED);
|
||||
tft.setCursor(xPos, yDraw);
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
tft.print(display_buffer->shift());
|
||||
printing = false;
|
||||
delay(print_delay_2);
|
||||
@@ -307,7 +410,10 @@ int Display::scroll_line(uint32_t color) {
|
||||
|
||||
// Function to setup hardware scroll for TFT screen
|
||||
void Display::setupScrollArea(uint16_t tfa, uint16_t bfa) {
|
||||
Serial.println("setupScrollAread()");
|
||||
Serial.println("setupScrollArea()");
|
||||
Serial.println(" tfa: " + (String)tfa);
|
||||
Serial.println(" bfa: " + (String)bfa);
|
||||
Serial.println("yStart: " + (String)this->yStart);
|
||||
tft.writecommand(ILI9341_VSCRDEF); // Vertical scroll definition
|
||||
tft.writedata(tfa >> 8); // Top Fixed Area line count
|
||||
tft.writedata(tfa);
|
||||
@@ -617,12 +723,12 @@ void Display::updateBanner(String msg)
|
||||
|
||||
this->buildBanner(msg, current_banner_pos);
|
||||
|
||||
this->img.pushSprite(0, 0);
|
||||
this->img.pushSprite(0, STATUS_BAR_WIDTH);
|
||||
|
||||
current_banner_pos--;
|
||||
|
||||
if (current_banner_pos <= 0)
|
||||
current_banner_pos = SCREEN_WIDTH;
|
||||
current_banner_pos = SCREEN_WIDTH + 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -653,8 +759,111 @@ void Display::buildBanner(String msg, int xpos)
|
||||
img.print(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
void Display::initLVGL() {
|
||||
tick.attach_ms(LVGL_TICK_PERIOD, lv_tick_handler);
|
||||
|
||||
lv_init();
|
||||
|
||||
lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10);
|
||||
|
||||
lv_disp_drv_t disp_drv;
|
||||
lv_disp_drv_init(&disp_drv);
|
||||
disp_drv.hor_res = WIDTH_1;
|
||||
disp_drv.ver_res = HEIGHT_1;
|
||||
disp_drv.flush_cb = my_disp_flush;
|
||||
disp_drv.buffer = &disp_buf;
|
||||
lv_disp_drv_register(&disp_drv);
|
||||
|
||||
lv_indev_drv_t indev_drv;
|
||||
lv_indev_drv_init(&indev_drv);
|
||||
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
||||
indev_drv.read_cb = my_touchpad_read;
|
||||
lv_indev_drv_register(&indev_drv);
|
||||
}*/
|
||||
|
||||
/*
|
||||
void Display::deinitLVGL() {
|
||||
lv_deinit();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void Display::joinWiFiGFX(){
|
||||
|
||||
// Create one text area
|
||||
ta1 = lv_textarea_create(lv_scr_act(), NULL);
|
||||
lv_textarea_set_one_line(ta1, true);
|
||||
lv_obj_set_width(ta1, LV_HOR_RES / 2 - 20);
|
||||
lv_obj_set_pos(ta1, 5, 20);
|
||||
//lv_ta_set_cursor_type(ta, LV_CURSOR_BLOCK);
|
||||
lv_textarea_set_text(ta1, "");
|
||||
lv_obj_set_event_cb(ta1, ta_event_cb);
|
||||
|
||||
// Create first label
|
||||
lv_obj_t * ssid_label = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_label_set_text(ssid_label, "SSID:");
|
||||
lv_obj_align(ssid_label, ta1, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
|
||||
|
||||
// Create second text area
|
||||
ta2 = lv_textarea_create(lv_scr_act(), ta1);
|
||||
lv_textarea_set_pwd_mode(ta2, true);
|
||||
lv_textarea_set_pwd_show_time(ta2, 1000);
|
||||
lv_textarea_set_cursor_hidden(ta2, true);
|
||||
lv_obj_align(ta2, NULL, LV_ALIGN_IN_TOP_RIGHT, -5, 20);
|
||||
|
||||
// Create second label
|
||||
lv_obj_t * pw_label = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_label_set_text(pw_label, "Password:");
|
||||
lv_obj_align(pw_label, ta2, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
|
||||
|
||||
// Create a keyboard and apply the styles
|
||||
kb = lv_keyboard_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_size(kb, LV_HOR_RES, LV_VER_RES / 2);
|
||||
lv_obj_set_event_cb(kb, keyboard_event_cb);
|
||||
|
||||
// Focus it on one of the text areas to start
|
||||
lv_keyboard_set_textarea(kb, ta1);
|
||||
lv_keyboard_set_cursor_manage(kb, true);
|
||||
|
||||
}*/
|
||||
|
||||
/*
|
||||
void keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event){
|
||||
lv_keyboard_def_event_cb(kb, event);
|
||||
if(event == LV_EVENT_APPLY){
|
||||
printf("LV_EVENT_APPLY\n");
|
||||
//String ta1_text = lv_textarea_get_text(lv_keyboard_get_textarea(kb));
|
||||
String ta1_text = lv_textarea_get_text(ta1);
|
||||
String ta2_text = lv_textarea_get_text(ta2);
|
||||
Serial.println(ta1_text);
|
||||
Serial.println(ta2_text);
|
||||
//joinWiFi(ta1_text, ta2_text);
|
||||
}else if(event == LV_EVENT_CANCEL){
|
||||
printf("LV_EVENT_CANCEL\n");
|
||||
lv_textarea_set_text(lv_keyboard_get_textarea(kb), "");
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
void ta_event_cb(lv_obj_t * ta, lv_event_t event)
|
||||
{
|
||||
if(event == LV_EVENT_CLICKED) {
|
||||
if(kb != NULL)
|
||||
lv_keyboard_set_textarea(kb, ta);
|
||||
}
|
||||
|
||||
//else if(event == LV_EVENT_INSERT) {
|
||||
// const char * str = lv_event_get_data();
|
||||
// if(str[0] == '\n') {
|
||||
// printf("Ready\n");
|
||||
// }
|
||||
//}
|
||||
}*/
|
||||
|
||||
void Display::main()
|
||||
{
|
||||
//lv_task_handler();
|
||||
return;
|
||||
}
|
||||
// End SPIFFS_functions
|
||||
|
||||
@@ -5,14 +5,18 @@
|
||||
#include <FS.h>
|
||||
#include <functional>
|
||||
#include <JPEGDecoder.h>
|
||||
#include <SimpleList.h>
|
||||
//#include <SimpleList.h>
|
||||
#include <LinkedList.h>
|
||||
#include <SPI.h>
|
||||
//#include <lvgl.h>
|
||||
#include <Ticker.h>
|
||||
#include "SPIFFS.h"
|
||||
#include "Assets.h"
|
||||
|
||||
#include <TFT_eSPI.h>
|
||||
//#include "Free_Fonts.h"
|
||||
|
||||
//#include "icons.h"
|
||||
|
||||
#define TFT_SHIELD
|
||||
//#define TFT_DIY
|
||||
|
||||
#define SCREEN_WIDTH 240
|
||||
#define SCREEN_HEIGHT 320
|
||||
@@ -21,7 +25,7 @@
|
||||
#define STANDARD_FONT_CHAR_LIMIT 40 // number of characters on a single line with normal font
|
||||
#define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
|
||||
#define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
|
||||
#define TOP_FIXED_AREA 16 // Number of lines in top fixed area (lines counted from top of screen)
|
||||
#define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
|
||||
#define YMAX 320 // Bottom of screen area
|
||||
#define minimum(a,b) (((a) < (b)) ? (a) : (b))
|
||||
//#define MENU_FONT NULL
|
||||
@@ -30,7 +34,22 @@
|
||||
//#define MENU_FONT &FreeSans9pt7b
|
||||
//#define MENU_FONT &FreeSansBold9pt7b
|
||||
#define BUTTON_ARRAY_LEN 7
|
||||
#define STATUS_BAR_WIDTH 16
|
||||
//#define LVGL_TICK_PERIOD 6
|
||||
|
||||
#define STATUSBAR_COLOR 0x4A49
|
||||
|
||||
//PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
|
||||
//PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
|
||||
|
||||
//PROGMEM static lv_disp_buf_t disp_buf;
|
||||
//PROGMEM static lv_color_t buf[LV_HOR_RES_MAX * 10];
|
||||
|
||||
//PROGMEM static void ta_event_cb(lv_obj_t * ta, lv_event_t event);
|
||||
//PROGMEM static void keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
|
||||
|
||||
// lvgl stuff
|
||||
//PROGMEM static lv_obj_t *kb;
|
||||
|
||||
class Display
|
||||
{
|
||||
@@ -48,20 +67,22 @@ class Display
|
||||
//void addNodes(Menu* menu, String name, Menu* child, std::function<void()> callable);
|
||||
//void changeMenu(Menu* menu);
|
||||
//void showMenuList(Menu* menu, int layer);
|
||||
//static void lv_tick_handler();
|
||||
|
||||
public:
|
||||
Display();
|
||||
Ticker tick;
|
||||
TFT_eSPI tft = TFT_eSPI();
|
||||
TFT_eSprite img = TFT_eSprite(&tft);
|
||||
TFT_eSPI_Button key[BUTTON_ARRAY_LEN];
|
||||
String version_number = "v0.4.0";
|
||||
String version_number = "v0.6.8";
|
||||
|
||||
bool printing = false;
|
||||
bool loading = false;
|
||||
bool tteBar = false;
|
||||
bool draw_tft = false;
|
||||
|
||||
int TOP_FIXED_AREA_2 = 32;
|
||||
int TOP_FIXED_AREA_2 = 48;
|
||||
int print_delay_1, print_delay_2 = 10;
|
||||
int current_banner_pos = SCREEN_WIDTH;
|
||||
|
||||
@@ -71,7 +92,7 @@ class Display
|
||||
//Menu wifiMenu;
|
||||
//Menu bluetoothMenu;
|
||||
|
||||
SimpleList<String>* display_buffer;
|
||||
LinkedList<String>* display_buffer;
|
||||
|
||||
// The initial y coordinate of the top of the bottom text line
|
||||
uint16_t yDraw = YMAX - BOT_FIXED_AREA - TEXT_HEIGHT;
|
||||
@@ -80,16 +101,20 @@ class Display
|
||||
uint16_t xPos = 0;
|
||||
|
||||
// The initial y coordinate of the top of the scrolling area
|
||||
uint16_t yStart = TOP_FIXED_AREA;
|
||||
uint16_t yStart = TOP_FIXED_AREA_2;
|
||||
// yArea must be a integral multiple of TEXT_HEIGHT
|
||||
uint16_t yArea = YMAX - TOP_FIXED_AREA - BOT_FIXED_AREA;
|
||||
uint16_t yArea = YMAX - TOP_FIXED_AREA_2 - BOT_FIXED_AREA;
|
||||
|
||||
// We have to blank the top line each time the display is scrolled, but this takes up to 13 milliseconds
|
||||
// for a full width line, meanwhile the serial buffer may be filling... and overflowing
|
||||
// We can speed up scrolling of short text lines by just blanking the character we drew
|
||||
int blank[19]; // We keep all the strings pixel lengths to optimise the speed of the top line blanking
|
||||
|
||||
//void initLVGL();
|
||||
//void deinitLVGL();
|
||||
//void joinWiFiGFX();
|
||||
void tftDrawGraphObjects(byte x_scale);
|
||||
void tftDrawEapolColorKey();
|
||||
void tftDrawColorKey();
|
||||
void tftDrawXScaleButtons(byte x_scale);
|
||||
void tftDrawYScaleButtons(byte y_scale);
|
||||
|
||||
42
esp32_marauder/LedInterface.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#include "LedInterface.h"
|
||||
|
||||
LedInterface::LedInterface() {
|
||||
|
||||
}
|
||||
|
||||
void LedInterface::RunSetup() {
|
||||
Serial.println("Setting neopixel to black...");
|
||||
strip.setBrightness(0);
|
||||
strip.begin();
|
||||
strip.setPixelColor(0, strip.Color(0, 0, 0));
|
||||
strip.show();
|
||||
delay(100);
|
||||
strip.setBrightness(50);
|
||||
strip.setPixelColor(0, strip.Color(0, 0, 0));
|
||||
strip.show();
|
||||
this->initTime = millis();
|
||||
}
|
||||
|
||||
void LedInterface::main(uint32_t currentTime) {
|
||||
strip.setPixelColor(0, this->Wheel((0 * 256 / 100 + this->wheel_pos) % 256));
|
||||
strip.show();
|
||||
|
||||
this->current_fade_itter++;
|
||||
|
||||
this->wheel_pos = this->wheel_pos - this->wheel_speed;
|
||||
if (this->wheel_pos < 0)
|
||||
this->wheel_pos = 255;
|
||||
};
|
||||
|
||||
uint32_t LedInterface::Wheel(byte WheelPos) {
|
||||
WheelPos = 255 - WheelPos;
|
||||
if(WheelPos < 85) {
|
||||
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
|
||||
}
|
||||
if(WheelPos < 170) {
|
||||
WheelPos -= 85;
|
||||
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
|
||||
}
|
||||
WheelPos -= 170;
|
||||
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
|
||||
}
|
||||
31
esp32_marauder/LedInterface.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef LedInterface_h
|
||||
#define LedInterface_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
|
||||
#define PIN 25
|
||||
#define Pixels 1
|
||||
|
||||
extern Adafruit_NeoPixel strip;
|
||||
|
||||
class LedInterface {
|
||||
|
||||
private:
|
||||
uint32_t initTime = 0;
|
||||
|
||||
int current_fade_itter = 1;
|
||||
int wheel_pos = 255;
|
||||
int wheel_speed = 1; // lower = slower
|
||||
|
||||
uint32_t Wheel(byte WheelPos);
|
||||
|
||||
public:
|
||||
LedInterface();
|
||||
|
||||
void RunSetup();
|
||||
void main(uint32_t currentTime);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,126 +1,36 @@
|
||||
#include "MenuFunctions.h"
|
||||
//#include "icons.h"
|
||||
|
||||
PROGMEM const unsigned char menu_icons[][66] = {
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x37, 0xFF, 0xFF, 0x3A, // Attack: 0
|
||||
0xFF, 0xFF, 0x39, 0xFF, 0xBF, 0x3C, 0xFF, 0x7F, 0x3E, 0xFF, 0x2F, 0x3F,
|
||||
0xFF, 0x9F, 0x3F, 0xFF, 0xCB, 0x3F, 0xFF, 0xE7, 0x3F, 0xCF, 0xF2, 0x3F,
|
||||
0xDF, 0xF9, 0x3F, 0xBF, 0xFC, 0x3F, 0x3F, 0xFF, 0x3F, 0x7F, 0xFE, 0x3F,
|
||||
0xDF, 0xF9, 0x3F, 0xCF, 0xFB, 0x3F, 0xE7, 0xFF, 0x3F, 0xF3, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xBF, 0xDD, 0x3E, 0xDF, 0xBE, 0x3D, 0x5F, 0x6B, 0x3D, 0x5F, 0x5D, 0x3D, // Beacon sniff: 1
|
||||
0x5F, 0x55, 0x3D, 0xFF, 0xF7, 0x3F, 0xFF, 0xF7, 0x3F, 0xFF, 0xEB, 0x3F,
|
||||
0xFF, 0xEB, 0x3F, 0xFF, 0xEB, 0x3F, 0xFF, 0xDD, 0x3F, 0xFF, 0xD5, 0x3F,
|
||||
0xFF, 0xC9, 0x3F, 0xFF, 0xDD, 0x3F, 0xFF, 0xC9, 0x3F, 0xFF, 0xB6, 0x3F,
|
||||
0xFF, 0xAA, 0x3F, 0xFF, 0x9C, 0x3F, 0xFF, 0xAA, 0x3F, 0x7F, 0x77, 0x3F,
|
||||
0x7F, 0x49, 0x3F, 0x7F, 0x3E, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFB, 0x3F, // Bluetooth: 2
|
||||
0xFF, 0xF3, 0x3F, 0xFF, 0xEB, 0x3F, 0xFF, 0xDB, 0x3F, 0x7F, 0xBB, 0x3F,
|
||||
0xFF, 0xDA, 0x3F, 0xFF, 0xE9, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F,
|
||||
0xFF, 0xE9, 0x3F, 0xFF, 0xDA, 0x3F, 0x7F, 0xBB, 0x3F, 0xFF, 0xDB, 0x3F,
|
||||
0xFF, 0xEB, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xFB, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xCF, 0xFB, 0x3F, // Bluetooth Sniff: 3
|
||||
0xF7, 0xF9, 0x3F, 0xDB, 0xFA, 0x3F, 0x6B, 0xFB, 0x3F, 0xAB, 0xDB, 0x3F,
|
||||
0x6B, 0xEB, 0x3F, 0xDB, 0xF2, 0x3F, 0xF7, 0x79, 0x3E, 0xCF, 0xF3, 0x3D,
|
||||
0xFF, 0x69, 0x3B, 0xFF, 0xDA, 0x3A, 0x7F, 0xBB, 0x3A, 0xFF, 0xDB, 0x3A,
|
||||
0xFF, 0x6B, 0x3B, 0xFF, 0xF3, 0x3D, 0xFF, 0x7B, 0x3E, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xE1, 0x3F, 0x7F, 0x80, 0x3F, // Deauth sniff: 4
|
||||
0x3F, 0x00, 0x3F, 0x1F, 0x00, 0x3E, 0x1F, 0x00, 0x3E, 0x1F, 0x00, 0x3E,
|
||||
0x1F, 0x00, 0x3E, 0x9F, 0x73, 0x3E, 0xDF, 0xF3, 0x3E, 0x9F, 0x65, 0x3E,
|
||||
0x1F, 0x0C, 0x3E, 0x3F, 0x0C, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x25, 0x3F,
|
||||
0x7F, 0x8C, 0x3F, 0x7F, 0x80, 0x3F, 0xFF, 0xC0, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3D, 0xFF, 0xFF, 0x38, // Draw: 5
|
||||
0xFF, 0x7F, 0x3D, 0xFF, 0xBF, 0x3E, 0xFF, 0x5F, 0x3F, 0xFF, 0xAF, 0x3F,
|
||||
0xFF, 0xD7, 0x3F, 0xFF, 0xEB, 0x3F, 0xFF, 0xF5, 0x3F, 0xFF, 0xFA, 0x3F,
|
||||
0x7F, 0xFD, 0x3F, 0xBF, 0xFE, 0x3F, 0x3F, 0xFF, 0x3F, 0xDF, 0xFF, 0x3F,
|
||||
0x1F, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xBF, 0x3F, // Packet monitor: 6
|
||||
0xFF, 0xBF, 0x3F, 0xFF, 0xBF, 0x3F, 0xFF, 0xBF, 0x3F, 0xFF, 0x5E, 0x3F,
|
||||
0xFF, 0x5E, 0x3F, 0x7F, 0x5D, 0x3F, 0x20, 0xED, 0x00, 0xAF, 0xEB, 0x3F,
|
||||
0xDF, 0xEB, 0x3F, 0xDF, 0xEB, 0x3F, 0xFF, 0xF7, 0x3F, 0xFF, 0xF7, 0x3F,
|
||||
0xFF, 0xF7, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xDB, 0x3F, 0xFF, 0xED, 0x3F, 0xFF, 0xB5, 0x3F, 0xFF, 0xD5, 0x3F, // Probe sniff: 7
|
||||
0xFF, 0x55, 0x3E, 0xFF, 0xF5, 0x3D, 0xFF, 0xED, 0x3D, 0xFF, 0x7B, 0x3E,
|
||||
0xFF, 0xBF, 0x3F, 0xFF, 0xCF, 0x3F, 0xFF, 0xD7, 0x3F, 0xFF, 0xEB, 0x3F,
|
||||
0xFF, 0xF5, 0x3F, 0xFF, 0xF8, 0x3F, 0x7F, 0xFC, 0x3F, 0x3F, 0xFE, 0x3F,
|
||||
0x1F, 0xFF, 0x3F, 0x8F, 0xFF, 0x3F, 0xCF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xC0, 0x3F, 0x3F, 0x3F, 0x3F, 0xDF, 0xFF, 0x3E, // Scanners: 8
|
||||
0xEF, 0xEF, 0x3D, 0xF7, 0xFF, 0x39, 0xFB, 0xE1, 0x36, 0xDB, 0x5E, 0x37,
|
||||
0x7D, 0xBF, 0x2F, 0xBD, 0x5E, 0x2F, 0xBD, 0x63, 0x2F, 0xBD, 0x73, 0x2F,
|
||||
0xBD, 0x7F, 0x2F, 0x7D, 0xBF, 0x2F, 0xFB, 0xDE, 0x37, 0xFB, 0xE1, 0x37,
|
||||
0xF7, 0xFF, 0x3B, 0xEF, 0xFF, 0x3D, 0xDF, 0xFF, 0x3E, 0x3F, 0x3F, 0x3F,
|
||||
0xFF, 0xC0, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x1F, 0x60, 0x3F, 0x0F, 0xC0, 0x3E, // CC Skimmers: 9
|
||||
0xEF, 0xDF, 0x3C, 0xEF, 0xDF, 0x38, 0xEF, 0xDF, 0x3A, 0xEF, 0xDF, 0x39,
|
||||
0xEF, 0xDF, 0x3B, 0xEF, 0xDF, 0x3B, 0x0F, 0xC0, 0x3B, 0x0F, 0x80, 0x3B,
|
||||
0x0F, 0x40, 0x3B, 0x0F, 0x40, 0x3B, 0x0F, 0x40, 0x3B, 0x0F, 0x40, 0x3B,
|
||||
0x0F, 0xC0, 0x3C, 0x0F, 0xC0, 0x3F, 0x07, 0x80, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFB, 0x3F, 0xFF, 0xFB, 0x3F, // Sniffers: 10
|
||||
0xFF, 0xF3, 0x3F, 0xFF, 0xE7, 0x3F, 0xFF, 0xCF, 0x3F, 0xFF, 0x3F, 0x3F,
|
||||
0xFF, 0x7F, 0x3E, 0xFF, 0xFF, 0x3C, 0xFF, 0xFF, 0x3D, 0xFF, 0xFF, 0x39,
|
||||
0xFF, 0xFF, 0x3B, 0x3F, 0xF8, 0x3B, 0x9F, 0xFB, 0x3B, 0xDF, 0xFF, 0x39,
|
||||
0x5F, 0xFC, 0x3C, 0x3F, 0x03, 0x3E, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, // WiFi: 11
|
||||
0x7F, 0x80, 0x3F, 0x9F, 0x7F, 0x3E, 0xE7, 0xFF, 0x39, 0xFB, 0xFF, 0x37,
|
||||
0xFF, 0xC0, 0x3F, 0x1F, 0x3F, 0x3E, 0xEF, 0xFF, 0x3D, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xE1, 0x3F, 0x7F, 0x9E, 0x3F, 0xBF, 0x7F, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0x2F, 0xE2, 0x25, 0x92, 0x3F, 0x37, 0xFD, 0x7E, 0x3B, 0x97, 0xE6, 0x04, // Beacon spam: 12
|
||||
0x7B, 0xFF, 0x3D, 0xCB, 0x55, 0x23, 0x3C, 0xFF, 0x3F, 0xF1, 0xBF, 0x29,
|
||||
0xDF, 0xFF, 0x13, 0xF4, 0xF3, 0x0E, 0xD9, 0xED, 0x1B, 0xF4, 0xED, 0x3F,
|
||||
0xF5, 0xF3, 0x12, 0xDB, 0xFF, 0x2A, 0x66, 0xBF, 0x39, 0x99, 0xFF, 0x13,
|
||||
0x61, 0x5A, 0x1D, 0x0D, 0x77, 0x19, 0xD2, 0xBA, 0x23, 0xAF, 0x45, 0x35,
|
||||
0x6F, 0x99, 0x36, 0x2C, 0xD6, 0x2A},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0x87, 0x3F, 0xFF, 0x03, 0x3F, // Rick roll: 13
|
||||
0xFF, 0x13, 0x3F, 0xFF, 0x7B, 0x3F, 0xFF, 0x7B, 0x3E, 0xFF, 0x79, 0x3E,
|
||||
0xFF, 0x7D, 0x3E, 0xFF, 0x3C, 0x3F, 0xFF, 0x8E, 0x3F, 0x7F, 0xE0, 0x3F,
|
||||
0x3F, 0xF3, 0x3F, 0xBF, 0xE7, 0x3F, 0x9F, 0xCF, 0x3F, 0xCF, 0x9F, 0x3B,
|
||||
0xE7, 0x3F, 0x38, 0xC7, 0xFF, 0x3E, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xEF, 0x3F, 0xFF, 0xDF, 0x3F, 0xFF, 0xA0, 0x3F, // reboot: 14
|
||||
0x3F, 0x9F, 0x3F, 0xDF, 0xE7, 0x3F, 0xEF, 0xFB, 0x3E, 0xEF, 0xFF, 0x3E,
|
||||
0xF7, 0xFF, 0x3D, 0xF7, 0xFF, 0x3D, 0xF7, 0xFF, 0x3D, 0xF7, 0xFF, 0x3D,
|
||||
0xF7, 0xFF, 0x3D, 0xEF, 0xFF, 0x3E, 0xEF, 0xFB, 0x3E, 0xFF, 0x7C, 0x3F,
|
||||
0x3F, 0x9F, 0x3F, 0xBF, 0xE0, 0x3F, 0x7F, 0xFF, 0x3F, 0xFF, 0xFE, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFB, 0x3F, 0xFF, 0xF5, 0x3F, // General apps: 15
|
||||
0xFF, 0xEA, 0x3F, 0x7F, 0xDB, 0x3F, 0xBF, 0xBB, 0x3F, 0xDF, 0x7B, 0x3F,
|
||||
0xEF, 0xFB, 0x3E, 0xCF, 0x7B, 0x3E, 0xAF, 0xB5, 0x3E, 0x6F, 0xEF, 0x3E,
|
||||
0xEF, 0xDE, 0x3E, 0xAF, 0xB5, 0x3E, 0xCF, 0x7B, 0x3E, 0xDF, 0x7B, 0x3F,
|
||||
0xBF, 0xBB, 0x3F, 0x7F, 0xDB, 0x3F, 0xFF, 0xEA, 0x3F, 0xFF, 0xF1, 0x3F,
|
||||
0xFF, 0xFB, 0x3F, 0xFF, 0xFF, 0x3F},
|
||||
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xE0, 0x3F, 0x3F, 0x80, 0x3F, // Update: 16
|
||||
0x1F, 0x00, 0x3F, 0x0F, 0x00, 0x3E, 0x07, 0x00, 0x3C, 0x07, 0x08, 0x3C,
|
||||
0x03, 0x18, 0x38, 0x03, 0x38, 0x38, 0xC3, 0x7F, 0x38, 0xC3, 0x7F, 0x38,
|
||||
0x03, 0x38, 0x38, 0x03, 0x18, 0x38, 0x07, 0x08, 0x3C, 0x07, 0x00, 0x3C,
|
||||
0x0F, 0x00, 0x3E, 0x1F, 0x00, 0x3F, 0x3F, 0x80, 0x3F, 0xFF, 0xE0, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}};
|
||||
extern const unsigned char menu_icons[][66];
|
||||
|
||||
MenuFunctions::MenuFunctions()
|
||||
{
|
||||
}
|
||||
|
||||
// Function to check menu input
|
||||
void MenuFunctions::main()
|
||||
void MenuFunctions::main(uint32_t currentTime)
|
||||
{
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
|
||||
(wifi_scan_obj.currentScanMode == OTA_UPDATE)) {
|
||||
(wifi_scan_obj.currentScanMode == OTA_UPDATE) ||
|
||||
(wifi_scan_obj.currentScanMode == SHOW_INFO)) {
|
||||
if (wifi_scan_obj.orient_display) {
|
||||
this->orientDisplay();
|
||||
wifi_scan_obj.orient_display = false;
|
||||
}
|
||||
//if ((display_obj.current_banner_pos <= 0) || (display_obj.current_banner_pos == SCREEN_WIDTH))
|
||||
//{
|
||||
// this->drawStatusBar();
|
||||
//}
|
||||
display_obj.updateBanner(current_menu->name);
|
||||
}
|
||||
|
||||
if (currentTime != 0) {
|
||||
if (currentTime - initTime >= 100) {
|
||||
this->initTime = millis();
|
||||
this->updateStatusBar();
|
||||
}
|
||||
}
|
||||
|
||||
//this->displayCurrentMenu();
|
||||
|
||||
boolean pressed = false;
|
||||
@@ -132,6 +42,7 @@ void MenuFunctions::main()
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_RICK_ROLL))
|
||||
display_obj.displayBuffer();
|
||||
//Serial.println(wifi_scan_obj.freeRAM());
|
||||
|
||||
|
||||
// Pressed will be set true is there is a valid touch on the screen
|
||||
@@ -151,12 +62,16 @@ void MenuFunctions::main()
|
||||
|
||||
|
||||
// This is if there are scans/attacks going on
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) && (pressed) && (wifi_scan_obj.currentScanMode != OTA_UPDATE))
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
|
||||
(pressed) &&
|
||||
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
|
||||
(wifi_scan_obj.currentScanMode != SHOW_INFO))
|
||||
{
|
||||
// Stop the current scan
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ST) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
|
||||
@@ -198,15 +113,42 @@ void MenuFunctions::main()
|
||||
for (uint8_t b = 0; b < current_menu->list->size(); b++) {
|
||||
display_obj.tft.setFreeFont(MENU_FONT);
|
||||
if (display_obj.key[b].justPressed()) {
|
||||
display_obj.key[b].drawButton2(current_menu->list->get(b).name, true); // draw invert
|
||||
//display_obj.key[b].drawButton2(current_menu->list->get(b).name, true); // draw invert
|
||||
//display_obj.key[b].drawButton(ML_DATUM, BUTTON_PADDING, current_menu->list->get(b).name, true);
|
||||
display_obj.key[b].drawButton(true, current_menu->list->get(b).name);
|
||||
if (current_menu->list->get(b).name != "Back")
|
||||
display_obj.tft.drawXBitmap(0,
|
||||
KEY_Y + b * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
|
||||
menu_icons[current_menu->list->get(b).icon],
|
||||
ICON_W,
|
||||
ICON_H,
|
||||
current_menu->list->get(b).color,
|
||||
TFT_BLACK);
|
||||
}
|
||||
//else if (pressed)
|
||||
// display_obj.key[b].drawButton(false, current_menu->list->get(b).name);
|
||||
|
||||
// If button was just release, execute the button's function
|
||||
if (display_obj.key[b].justReleased())
|
||||
if ((display_obj.key[b].justReleased()) && (!pressed))
|
||||
{
|
||||
display_obj.key[b].drawButton2(current_menu->list->get(b).name); // draw normal
|
||||
//display_obj.key[b].drawButton2(current_menu->list->get(b).name); // draw normal
|
||||
//display_obj.key[b].drawButton(ML_DATUM, BUTTON_PADDING, current_menu->list->get(b).name);
|
||||
display_obj.key[b].drawButton(false, current_menu->list->get(b).name);
|
||||
current_menu->list->get(b).callable();
|
||||
}
|
||||
// This
|
||||
else if ((display_obj.key[b].justReleased()) && (pressed)) {
|
||||
display_obj.key[b].drawButton(false, current_menu->list->get(b).name);
|
||||
if (current_menu->list->get(b).name != "Back")
|
||||
display_obj.tft.drawXBitmap(0,
|
||||
KEY_Y + b * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
|
||||
menu_icons[current_menu->list->get(b).icon],
|
||||
ICON_W,
|
||||
ICON_H,
|
||||
TFT_BLACK,
|
||||
current_menu->list->get(b).color);
|
||||
}
|
||||
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
}
|
||||
}
|
||||
@@ -214,6 +156,160 @@ void MenuFunctions::main()
|
||||
y = -1;
|
||||
}
|
||||
|
||||
void MenuFunctions::updateStatusBar()
|
||||
{
|
||||
uint16_t the_color;
|
||||
|
||||
// Draw temp info
|
||||
if (temp_obj.current_temp < 70)
|
||||
the_color = TFT_GREEN;
|
||||
else if ((temp_obj.current_temp >= 70) && (temp_obj.current_temp < 80))
|
||||
the_color = TFT_YELLOW;
|
||||
else if ((temp_obj.current_temp >= 80) && (temp_obj.current_temp < 90))
|
||||
the_color = TFT_ORANGE;
|
||||
else if ((temp_obj.current_temp >= 90) && (temp_obj.current_temp < 100))
|
||||
the_color = TFT_RED;
|
||||
else
|
||||
the_color = TFT_MAROON;
|
||||
|
||||
display_obj.tft.setTextColor(the_color, STATUSBAR_COLOR);
|
||||
if (temp_obj.current_temp != temp_obj.old_temp) {
|
||||
temp_obj.old_temp = temp_obj.current_temp;
|
||||
display_obj.tft.fillRect(0, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString((String)temp_obj.current_temp + " C", 4, 0, 2);
|
||||
}
|
||||
display_obj.tft.setTextColor(TFT_WHITE, STATUSBAR_COLOR);
|
||||
|
||||
// WiFi Channel Stuff
|
||||
if (wifi_scan_obj.set_channel != wifi_scan_obj.old_channel) {
|
||||
wifi_scan_obj.old_channel = wifi_scan_obj.set_channel;
|
||||
display_obj.tft.fillRect(50, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString("CH: " + (String)wifi_scan_obj.set_channel, 50, 0, 2);
|
||||
}
|
||||
|
||||
// RAM Stuff
|
||||
wifi_scan_obj.freeRAM();
|
||||
if (wifi_scan_obj.free_ram != wifi_scan_obj.old_free_ram) {
|
||||
wifi_scan_obj.old_free_ram = wifi_scan_obj.free_ram;
|
||||
display_obj.tft.fillRect(100, 0, 60, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString((String)wifi_scan_obj.free_ram + "B", 100, 0, 2);
|
||||
}
|
||||
|
||||
// Draw battery info
|
||||
if (battery_obj.i2c_supported)
|
||||
{
|
||||
if ((String)battery_obj.battery_level != "25")
|
||||
the_color = TFT_GREEN;
|
||||
else
|
||||
the_color = TFT_RED;
|
||||
|
||||
if (battery_obj.battery_level != battery_obj.old_level) {
|
||||
battery_obj.old_level = battery_obj.battery_level;
|
||||
display_obj.tft.fillRect(204, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(186,
|
||||
0,
|
||||
menu_icons[STATUS_BAT],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
the_color);
|
||||
display_obj.tft.drawString((String)battery_obj.battery_level + "%", 204, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw SD info
|
||||
if (sd_obj.supported)
|
||||
the_color = TFT_GREEN;
|
||||
else
|
||||
the_color = TFT_RED;
|
||||
|
||||
display_obj.tft.drawXBitmap(170,
|
||||
0,
|
||||
menu_icons[STATUS_SD],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
the_color);
|
||||
//display_obj.tft.print((String)battery_obj.battery_level + "%");
|
||||
}
|
||||
|
||||
void MenuFunctions::drawStatusBar()
|
||||
{
|
||||
display_obj.tft.fillRect(0, 0, 240, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
//display_obj.tft.fillRect(0, STATUS_BAR_WIDTH + 1, 240, 1, TFT_DARKGREY);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, STATUSBAR_COLOR);
|
||||
//display_obj.tft.setTextSize(2);
|
||||
|
||||
uint16_t the_color;
|
||||
|
||||
// Draw temp info
|
||||
if (temp_obj.current_temp < 70)
|
||||
the_color = TFT_GREEN;
|
||||
else if ((temp_obj.current_temp >= 70) && (temp_obj.current_temp < 80))
|
||||
the_color = TFT_YELLOW;
|
||||
else if ((temp_obj.current_temp >= 80) && (temp_obj.current_temp < 90))
|
||||
the_color = TFT_ORANGE;
|
||||
else if ((temp_obj.current_temp >= 90) && (temp_obj.current_temp < 100))
|
||||
the_color = TFT_RED;
|
||||
else
|
||||
the_color = TFT_MAROON;
|
||||
|
||||
display_obj.tft.setTextColor(the_color, STATUSBAR_COLOR);
|
||||
temp_obj.old_temp = temp_obj.current_temp;
|
||||
display_obj.tft.fillRect(0, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString((String)temp_obj.current_temp + " C", 4, 0, 2);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, STATUSBAR_COLOR);
|
||||
|
||||
|
||||
// WiFi Channel Stuff
|
||||
wifi_scan_obj.old_channel = wifi_scan_obj.set_channel;
|
||||
display_obj.tft.fillRect(50, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString("CH: " + (String)wifi_scan_obj.set_channel, 50, 0, 2);
|
||||
|
||||
// RAM Stuff
|
||||
wifi_scan_obj.freeRAM();
|
||||
wifi_scan_obj.old_free_ram = wifi_scan_obj.free_ram;
|
||||
display_obj.tft.fillRect(100, 0, 60, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.drawString((String)wifi_scan_obj.free_ram + "B", 100, 0, 2);
|
||||
|
||||
// Draw battery info
|
||||
if (battery_obj.i2c_supported)
|
||||
{
|
||||
if ((String)battery_obj.battery_level != "25")
|
||||
the_color = TFT_GREEN;
|
||||
else
|
||||
the_color = TFT_RED;
|
||||
|
||||
battery_obj.old_level = battery_obj.battery_level;
|
||||
display_obj.tft.fillRect(204, 0, SCREEN_WIDTH, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
|
||||
display_obj.tft.setCursor(0, 1);
|
||||
display_obj.tft.drawXBitmap(186,
|
||||
0,
|
||||
menu_icons[STATUS_BAT],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
the_color);
|
||||
display_obj.tft.drawString((String)battery_obj.battery_level + "%", 204, 0, 2);
|
||||
}
|
||||
|
||||
// Draw SD info
|
||||
if (sd_obj.supported)
|
||||
the_color = TFT_GREEN;
|
||||
else
|
||||
the_color = TFT_RED;
|
||||
|
||||
display_obj.tft.drawXBitmap(170,
|
||||
0,
|
||||
menu_icons[STATUS_SD],
|
||||
16,
|
||||
16,
|
||||
STATUSBAR_COLOR,
|
||||
the_color);
|
||||
//display_obj.tft.print((String)battery_obj.battery_level + "%");
|
||||
}
|
||||
|
||||
void MenuFunctions::orientDisplay()
|
||||
{
|
||||
display_obj.tft.init();
|
||||
@@ -222,7 +318,16 @@ void MenuFunctions::orientDisplay()
|
||||
|
||||
display_obj.tft.setCursor(0, 0);
|
||||
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait
|
||||
//uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait
|
||||
//uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 275, 3494, 361, 3528, 4 }; // tft.setRotation(0); // Portrait with TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 339, 3470, 237, 3438, 2 }; // tft.setRotation(0); // Portrait with DIY TFT
|
||||
Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
|
||||
display_obj.tft.setTouch(calData);
|
||||
|
||||
@@ -236,28 +341,40 @@ void MenuFunctions::orientDisplay()
|
||||
void MenuFunctions::RunSetup()
|
||||
{
|
||||
// root menu stuff
|
||||
mainMenu.list = new SimpleList<MenuNode>(); // Get list in first menu ready
|
||||
mainMenu.list = new LinkedList<MenuNode>(); // Get list in first menu ready
|
||||
|
||||
// Main menu stuff
|
||||
wifiMenu.list = new SimpleList<MenuNode>(); // Get list in second menu ready
|
||||
bluetoothMenu.list = new SimpleList<MenuNode>(); // Get list in third menu ready
|
||||
generalMenu.list = new SimpleList<MenuNode>();
|
||||
updateMenu.list = new SimpleList<MenuNode>();
|
||||
wifiMenu.list = new LinkedList<MenuNode>(); // Get list in second menu ready
|
||||
bluetoothMenu.list = new LinkedList<MenuNode>(); // Get list in third menu ready
|
||||
generalMenu.list = new LinkedList<MenuNode>();
|
||||
deviceMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
// Device menu stuff
|
||||
failedUpdateMenu.list = new LinkedList<MenuNode>();
|
||||
whichUpdateMenu.list = new LinkedList<MenuNode>();
|
||||
confirmMenu.list = new LinkedList<MenuNode>();
|
||||
updateMenu.list = new LinkedList<MenuNode>();
|
||||
infoMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
// WiFi menu stuff
|
||||
wifiSnifferMenu.list = new SimpleList<MenuNode>();
|
||||
wifiScannerMenu.list = new SimpleList<MenuNode>();
|
||||
wifiAttackMenu.list = new SimpleList<MenuNode>();
|
||||
wifiSnifferMenu.list = new LinkedList<MenuNode>();
|
||||
wifiScannerMenu.list = new LinkedList<MenuNode>();
|
||||
wifiAttackMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
// Bluetooth menu stuff
|
||||
bluetoothSnifferMenu.list = new SimpleList<MenuNode>();
|
||||
bluetoothScannerMenu.list = new SimpleList<MenuNode>();
|
||||
bluetoothSnifferMenu.list = new LinkedList<MenuNode>();
|
||||
bluetoothScannerMenu.list = new LinkedList<MenuNode>();
|
||||
|
||||
// Work menu names
|
||||
mainMenu.name = " ESP32 Marauder ";
|
||||
wifiMenu.name = " WiFi ";
|
||||
deviceMenu.name = " Device ";
|
||||
generalMenu.name = " General Apps ";
|
||||
failedUpdateMenu.name = " Updating... ";
|
||||
whichUpdateMenu.name = "Select Method ";
|
||||
confirmMenu.name = " Confirm Update ";
|
||||
updateMenu.name = " Update Firmware ";
|
||||
infoMenu.name = " Device Info ";
|
||||
bluetoothMenu.name = " Bluetooth ";
|
||||
wifiSnifferMenu.name = " WiFi Sniffers ";
|
||||
wifiScannerMenu.name = " WiFi Scanners";
|
||||
@@ -270,7 +387,7 @@ void MenuFunctions::RunSetup()
|
||||
addNodes(&mainMenu, "WiFi", TFT_GREEN, NULL, WIFI, [this](){changeMenu(&wifiMenu);});
|
||||
addNodes(&mainMenu, "Bluetooth", TFT_CYAN, NULL, BLUETOOTH, [this](){changeMenu(&bluetoothMenu);});
|
||||
addNodes(&mainMenu, "General Apps", TFT_MAGENTA, NULL, GENERAL_APPS, [this](){changeMenu(&generalMenu);});
|
||||
addNodes(&mainMenu, "Update Firmware", TFT_ORANGE, NULL, UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&updateMenu); web_obj.setupOTAupdate();});
|
||||
addNodes(&mainMenu, "Device", TFT_BLUE, NULL, DEVICE, [this](){changeMenu(&deviceMenu);});
|
||||
addNodes(&mainMenu, "Reboot", TFT_LIGHTGREY, NULL, REBOOT, [](){ESP.restart();});
|
||||
|
||||
// Build WiFi Menu
|
||||
@@ -283,20 +400,23 @@ void MenuFunctions::RunSetup()
|
||||
// Build WiFi sniffer Menu
|
||||
wifiSnifferMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
|
||||
addNodes(&wifiSnifferMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(wifiSnifferMenu.parentMenu);});
|
||||
addNodes(&wifiSnifferMenu, "Probe Request Sniff", TFT_CYAN, NULL, PROBE_SNIFF, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_PROBE, TFT_CYAN);});
|
||||
addNodes(&wifiSnifferMenu, "Beacon Sniff", TFT_MAGENTA, NULL, BEACON_SNIFF, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_AP, TFT_MAGENTA);});
|
||||
addNodes(&wifiSnifferMenu, "Deauth Sniff", TFT_RED, NULL, DEAUTH_SNIFF, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_DEAUTH, TFT_RED);});
|
||||
addNodes(&wifiSnifferMenu, "Probe Request Sniff", TFT_CYAN, NULL, PROBE_SNIFF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_PROBE, TFT_CYAN);});
|
||||
addNodes(&wifiSnifferMenu, "Beacon Sniff", TFT_MAGENTA, NULL, BEACON_SNIFF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_AP, TFT_MAGENTA);});
|
||||
addNodes(&wifiSnifferMenu, "Deauth Sniff", TFT_RED, NULL, DEAUTH_SNIFF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_DEAUTH, TFT_RED);});
|
||||
|
||||
// Build WiFi scanner Menu
|
||||
wifiScannerMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
|
||||
addNodes(&wifiScannerMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(wifiScannerMenu.parentMenu);});
|
||||
addNodes(&wifiScannerMenu, "Packet Monitor", TFT_BLUE, NULL, PACKET_MONITOR, [this](){wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);});
|
||||
addNodes(&wifiScannerMenu, "EAPOL/PMKID Scan", TFT_VIOLET, NULL, EAPOL, [this](){wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);});
|
||||
addNodes(&wifiScannerMenu, "Detect Pwnagotchi", TFT_RED, NULL, PWNAGOTCHI, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_RED);});
|
||||
addNodes(&wifiScannerMenu, "Detect Espressif", TFT_ORANGE, NULL, ESPRESSIF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_ESPRESSIF, TFT_ORANGE);});
|
||||
|
||||
// Build WiFi attack menu
|
||||
wifiAttackMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
|
||||
addNodes(&wifiAttackMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(wifiAttackMenu.parentMenu);});
|
||||
addNodes(&wifiAttackMenu, "Beacon Spam Random", TFT_ORANGE, NULL, BEACON_SPAM, [this](){wifi_scan_obj.StartScan(WIFI_ATTACK_BEACON_SPAM, TFT_ORANGE);});
|
||||
addNodes(&wifiAttackMenu, "Rick Roll Beacon", TFT_YELLOW, NULL, RICK_ROLL, [this](){wifi_scan_obj.StartScan(WIFI_ATTACK_RICK_ROLL, TFT_YELLOW);});
|
||||
addNodes(&wifiAttackMenu, "Beacon Spam Random", TFT_ORANGE, NULL, BEACON_SPAM, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_ATTACK_BEACON_SPAM, TFT_ORANGE);});
|
||||
addNodes(&wifiAttackMenu, "Rick Roll Beacon", TFT_YELLOW, NULL, RICK_ROLL, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_ATTACK_RICK_ROLL, TFT_YELLOW);});
|
||||
|
||||
// Build Bluetooth Menu
|
||||
bluetoothMenu.parentMenu = &mainMenu; // Second Menu is third menu parent
|
||||
@@ -307,23 +427,55 @@ void MenuFunctions::RunSetup()
|
||||
// Build bluetooth sniffer Menu
|
||||
bluetoothSnifferMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
|
||||
addNodes(&bluetoothSnifferMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(bluetoothSnifferMenu.parentMenu);});
|
||||
addNodes(&bluetoothSnifferMenu, "Bluetooth Sniffer", TFT_GREEN, NULL, BLUETOOTH_SNIFF, [this](){wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);});
|
||||
addNodes(&bluetoothSnifferMenu, "Bluetooth Sniffer", TFT_GREEN, NULL, BLUETOOTH_SNIFF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);});
|
||||
|
||||
// Build bluetooth scanner Menu
|
||||
bluetoothScannerMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
|
||||
addNodes(&bluetoothScannerMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(bluetoothScannerMenu.parentMenu);});
|
||||
addNodes(&bluetoothScannerMenu, "Detect Card Skimmers", TFT_MAGENTA, NULL, CC_SKIMMERS, [this](){wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);});
|
||||
addNodes(&bluetoothScannerMenu, "Detect Card Skimmers", TFT_MAGENTA, NULL, CC_SKIMMERS, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);});
|
||||
|
||||
// General apps menu
|
||||
generalMenu.parentMenu = &mainMenu;
|
||||
addNodes(&generalMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){display_obj.draw_tft = false; changeMenu(generalMenu.parentMenu);});
|
||||
addNodes(&generalMenu, "Draw", TFT_WHITE, NULL, DRAW, [this](){display_obj.clearScreen(); display_obj.draw_tft = true;});
|
||||
|
||||
updateMenu.parentMenu = &mainMenu;
|
||||
addNodes(&updateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF; changeMenu(updateMenu.parentMenu); WiFi.softAPdisconnect(true);});
|
||||
// Device menu
|
||||
deviceMenu.parentMenu = &mainMenu;
|
||||
addNodes(&deviceMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(deviceMenu.parentMenu);});
|
||||
//addNodes(&deviceMenu, "Update Firmware", TFT_ORANGE, NULL, UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&updateMenu); web_obj.setupOTAupdate();});
|
||||
addNodes(&deviceMenu, "Update Firmware", TFT_ORANGE, NULL, UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&whichUpdateMenu);});
|
||||
addNodes(&deviceMenu, "Device Info", TFT_WHITE, NULL, DEVICE_INFO, [this](){wifi_scan_obj.currentScanMode = SHOW_INFO; changeMenu(&infoMenu); wifi_scan_obj.RunInfo();});
|
||||
//addNodes(&deviceMenu, "Join WiFi", TFT_YELLOW, NULL, SNIFFERS, [this](){display_obj.clearScreen(); wifi_scan_obj.currentScanMode = LV_JOIN_WIFI; wifi_scan_obj.StartScan(LV_JOIN_WIFI, TFT_YELLOW);});
|
||||
|
||||
// Select update
|
||||
whichUpdateMenu.parentMenu = &deviceMenu;
|
||||
addNodes(&whichUpdateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(whichUpdateMenu.parentMenu);});
|
||||
addNodes(&whichUpdateMenu, "Web Update", TFT_GREEN, NULL, WEB_UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&updateMenu); web_obj.setupOTAupdate();});
|
||||
if (sd_obj.supported) addNodes(&whichUpdateMenu, "SD Update", TFT_MAGENTA, NULL, SD_UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&confirmMenu);});
|
||||
|
||||
// Confirm SD update menu
|
||||
confirmMenu.parentMenu = &whichUpdateMenu;
|
||||
addNodes(&confirmMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){changeMenu(confirmMenu.parentMenu);});
|
||||
//addNodes(&confirmMenu, "Yes", TFT_ORANGE, NULL, UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&updateMenu); sd_obj.runUpdate();});
|
||||
addNodes(&confirmMenu, "Yes", TFT_ORANGE, NULL, UPDATE, [this](){wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&failedUpdateMenu); sd_obj.runUpdate();});
|
||||
|
||||
// Web Update
|
||||
updateMenu.parentMenu = &deviceMenu;
|
||||
addNodes(&updateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF; changeMenu(updateMenu.parentMenu); WiFi.softAPdisconnect(true); web_obj.shutdownServer();});
|
||||
//addNodes(&updateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF; changeMenu(updateMenu.parentMenu);});
|
||||
|
||||
// Failed update menu
|
||||
failedUpdateMenu.parentMenu = &whichUpdateMenu;
|
||||
addNodes(&failedUpdateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF; changeMenu(failedUpdateMenu.parentMenu);});
|
||||
|
||||
// Device info menu
|
||||
infoMenu.parentMenu = &deviceMenu;
|
||||
addNodes(&infoMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this](){wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF; changeMenu(infoMenu.parentMenu);});
|
||||
|
||||
// Set the current menu to the mainMenu
|
||||
changeMenu(&mainMenu);
|
||||
|
||||
this->initTime = millis();
|
||||
}
|
||||
|
||||
// Function to change menu
|
||||
@@ -389,6 +541,8 @@ void MenuFunctions::buildButtons(Menu* menu)
|
||||
menu->list->get(i).color, // Text
|
||||
buf,
|
||||
KEY_TEXTSIZE);
|
||||
|
||||
display_obj.key[i].setLabelDatum(BUTTON_PADDING - (KEY_W/2), 2, ML_DATUM);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -399,6 +553,7 @@ void MenuFunctions::displayCurrentMenu()
|
||||
Serial.println("Displaying current menu...");
|
||||
display_obj.clearScreen();
|
||||
display_obj.tft.setTextColor(TFT_LIGHTGREY, TFT_DARKGREY);
|
||||
this->drawStatusBar();
|
||||
//display_obj.tft.fillRect(0,0,240,16, TFT_DARKGREY);
|
||||
//display_obj.tft.drawCentreString(" ESP32 Marauder ",120,0,2);
|
||||
//Serial.println("Getting size...");
|
||||
@@ -413,7 +568,10 @@ void MenuFunctions::displayCurrentMenu()
|
||||
display_obj.tft.setFreeFont(MENU_FONT);
|
||||
for (int i = 0; i < current_menu->list->size(); i++)
|
||||
{
|
||||
display_obj.key[i].drawButton2(current_menu->list->get(i).name);
|
||||
//display_obj.key[i].drawButton2(current_menu->list->get(i).name);
|
||||
//display_obj.key[i].drawButton(ML_DATUM, BUTTON_PADDING, current_menu->list->get(i).name);
|
||||
//display_obj.key[i].drawButton(true);
|
||||
display_obj.key[i].drawButton(false, current_menu->list->get(i).name);
|
||||
|
||||
if (current_menu->list->get(i).name != "Back")
|
||||
display_obj.tft.drawXBitmap(0,
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
|
||||
#include "WiFiScan.h"
|
||||
#include "Display.h"
|
||||
#include "BatteryInterface.h"
|
||||
#include "SDInterface.h"
|
||||
#include "Web.h"
|
||||
|
||||
extern Display display_obj;
|
||||
extern WiFiScan wifi_scan_obj;
|
||||
extern Web web_obj;
|
||||
extern SDInterface sd_obj;
|
||||
extern BatteryInterface battery_obj;
|
||||
|
||||
// Keypad start position, key sizes and spacing
|
||||
#define KEY_X 120 // Centre of key
|
||||
@@ -19,6 +23,7 @@ extern Web web_obj;
|
||||
#define KEY_TEXTSIZE 1 // Font size multiplier
|
||||
#define ICON_W 22
|
||||
#define ICON_H 22
|
||||
#define BUTTON_PADDING 22
|
||||
//#define BUTTON_ARRAY_LEN 5
|
||||
|
||||
#define FLASH_BUTTON 0
|
||||
@@ -41,6 +46,15 @@ extern Web web_obj;
|
||||
#define REBOOT 14
|
||||
#define GENERAL_APPS 15
|
||||
#define UPDATE 16
|
||||
#define DEVICE 17
|
||||
#define DEVICE_INFO 18
|
||||
#define SD_UPDATE 19
|
||||
#define WEB_UPDATE 20
|
||||
#define EAPOL 21
|
||||
#define STATUS_BAT 22
|
||||
#define STATUS_SD 23
|
||||
#define PWNAGOTCHI 24
|
||||
#define ESPRESSIF 25
|
||||
|
||||
struct Menu;
|
||||
|
||||
@@ -57,15 +71,20 @@ struct MenuNode {
|
||||
// Full Menus
|
||||
struct Menu {
|
||||
String name;
|
||||
SimpleList<MenuNode>* list;
|
||||
LinkedList<MenuNode>* list;
|
||||
Menu * parentMenu;
|
||||
uint8_t selected;
|
||||
//uint8_t selected;
|
||||
};
|
||||
|
||||
|
||||
class MenuFunctions
|
||||
{
|
||||
private:
|
||||
|
||||
String u_result = "";
|
||||
|
||||
uint32_t initTime = 0;
|
||||
|
||||
Menu* current_menu;
|
||||
|
||||
// Main menu stuff
|
||||
@@ -74,7 +93,14 @@ class MenuFunctions
|
||||
Menu wifiMenu;
|
||||
Menu bluetoothMenu;
|
||||
Menu generalMenu;
|
||||
Menu deviceMenu;
|
||||
|
||||
// Device menu stuff
|
||||
Menu whichUpdateMenu;
|
||||
Menu failedUpdateMenu;
|
||||
Menu confirmMenu;
|
||||
Menu updateMenu;
|
||||
Menu infoMenu;
|
||||
|
||||
// WiFi menu stuff
|
||||
Menu wifiSnifferMenu;
|
||||
@@ -91,6 +117,8 @@ class MenuFunctions
|
||||
//TFT_eSPI_Button key[BUTTON_ARRAY_LEN];
|
||||
|
||||
void addNodes(Menu* menu, String name, uint16_t color, Menu* child, int place, std::function<void()> callable);
|
||||
void drawStatusBar();
|
||||
void updateStatusBar();
|
||||
void showMenuList(Menu* menu, int layer);
|
||||
void orientDisplay();
|
||||
|
||||
@@ -103,7 +131,7 @@ class MenuFunctions
|
||||
void buildButtons(Menu* menu);
|
||||
void changeMenu(Menu* menu);
|
||||
void displayCurrentMenu();
|
||||
void main();
|
||||
void main(uint32_t currentTime);
|
||||
void RunSetup();
|
||||
};
|
||||
|
||||
|
||||
172
esp32_marauder/SDInterface.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
#include "SDInterface.h"
|
||||
|
||||
bool SDInterface::initSD() {
|
||||
String display_string = "";
|
||||
|
||||
if (!SD.begin(SD_CS)) {
|
||||
Serial.println("Failed to mount SD Card");
|
||||
this->supported = false;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
this->supported = true;
|
||||
this->cardType = SD.cardType();
|
||||
if (cardType == CARD_MMC)
|
||||
Serial.println("SD: MMC Mounted");
|
||||
else if(cardType == CARD_SD)
|
||||
Serial.println("SD: SDSC Mounted");
|
||||
else if(cardType == CARD_SDHC)
|
||||
Serial.println("SD: SDHC Mounted");
|
||||
else
|
||||
Serial.println("SD: UNKNOWN Card Mounted");
|
||||
|
||||
//this->cardSizeBT = SD.cardSize();
|
||||
//this->cardSizeKB = SD.cardSize() / 1024;
|
||||
this->cardSizeMB = SD.cardSize() / (1024 * 1024);
|
||||
//this->cardSizeGB = SD.cardSize() / (1024 * 1024 * 1024);
|
||||
|
||||
//Serial.printf("SD Card Size: %llu Bytes\n", this->cardSizeBT);
|
||||
//Serial.printf("SD Card Size: %lluKB\n", this->cardSizeKB);
|
||||
Serial.printf("SD Card Size: %lluMB\n", this->cardSizeMB);
|
||||
//Serial.printf("SD Card Size: %lluGB\n", this->cardSizeGB);
|
||||
|
||||
if (this->supported) {
|
||||
//display_obj.tft.println((byte)(sd_obj.cardSizeMB % 10));
|
||||
const int NUM_DIGITS = log10(this->cardSizeMB) + 1;
|
||||
|
||||
char sz[NUM_DIGITS + 1];
|
||||
|
||||
sz[NUM_DIGITS] = 0;
|
||||
for ( size_t i = NUM_DIGITS; i--; this->cardSizeMB /= 10)
|
||||
{
|
||||
sz[i] = '0' + (this->cardSizeMB % 10);
|
||||
display_string.concat((String)sz[i]);
|
||||
}
|
||||
|
||||
//this->card_sz = display_string;
|
||||
this->card_sz = sz;
|
||||
}
|
||||
|
||||
buffer_obj = Buffer();
|
||||
|
||||
//if (this->supported)
|
||||
// buffer_obj.open(&SD);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void SDInterface::addPacket(uint8_t* buf, uint32_t len) {
|
||||
if ((this->supported) && (this->do_save)) {
|
||||
//Serial.println("Adding packet to buffer...");
|
||||
buffer_obj.addPacket(buf, len);
|
||||
}
|
||||
}
|
||||
|
||||
void SDInterface::openCapture(String file_name) {
|
||||
if (this->supported)
|
||||
buffer_obj.open(&SD, file_name);
|
||||
}
|
||||
|
||||
void SDInterface::runUpdate() {
|
||||
//display_obj.clearScreen();
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, 100);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
|
||||
display_obj.tft.println("Opening /update.bin...");
|
||||
File updateBin = SD.open("/update.bin");
|
||||
if (updateBin) {
|
||||
if(updateBin.isDirectory()){
|
||||
display_obj.tft.setTextColor(TFT_RED);
|
||||
display_obj.tft.println("Error, could not find update.bin");
|
||||
Serial.println("Error, update.bin is not a file");
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
updateBin.close();
|
||||
return;
|
||||
}
|
||||
|
||||
size_t updateSize = updateBin.size();
|
||||
|
||||
if (updateSize > 0) {
|
||||
display_obj.tft.println("Starting SD Update...");
|
||||
Serial.println("Try to start update");
|
||||
this->performUpdate(updateBin, updateSize);
|
||||
}
|
||||
else {
|
||||
display_obj.tft.setTextColor(TFT_RED);
|
||||
display_obj.tft.println("Error, update.bin is empty");
|
||||
Serial.println("Error, file is empty");
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
return;
|
||||
}
|
||||
|
||||
updateBin.close();
|
||||
|
||||
// whe finished remove the binary from sd card to indicate end of the process
|
||||
display_obj.tft.println("rebooting...");
|
||||
Serial.println("rebooting...");
|
||||
//SD.remove("/update.bin");
|
||||
delay(1000);
|
||||
ESP.restart();
|
||||
}
|
||||
else {
|
||||
display_obj.tft.setTextColor(TFT_RED);
|
||||
display_obj.tft.println("Could not load update.bin from /");
|
||||
Serial.println("Could not load update.bin from sd root");
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
void SDInterface::performUpdate(Stream &updateSource, size_t updateSize) {
|
||||
if (Update.begin(updateSize)) {
|
||||
display_obj.tft.println("File size: " + String(updateSize));
|
||||
display_obj.tft.println("Writing file to partition...");
|
||||
size_t written = Update.writeStream(updateSource);
|
||||
if (written == updateSize) {
|
||||
display_obj.tft.println("Written: " + String(written) + " successfully");
|
||||
Serial.println("Written : " + String(written) + " successfully");
|
||||
}
|
||||
else {
|
||||
display_obj.tft.println("Written only : " + String(written) + "/" + String(updateSize) + ". Retry?");
|
||||
Serial.println("Written only : " + String(written) + "/" + String(updateSize) + ". Retry?");
|
||||
}
|
||||
if (Update.end()) {
|
||||
Serial.println("OTA done!");
|
||||
if (Update.isFinished()) {
|
||||
display_obj.tft.println("Update complete");
|
||||
Serial.println("Update successfully completed. Rebooting.");
|
||||
}
|
||||
else {
|
||||
display_obj.tft.setTextColor(TFT_RED);
|
||||
display_obj.tft.println("Update could not complete");
|
||||
Serial.println("Update not finished? Something went wrong!");
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
display_obj.tft.println("Error Occurred. Error #: " + String(Update.getError()));
|
||||
Serial.println("Error Occurred. Error #: " + String(Update.getError()));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
display_obj.tft.println("Not enough space to begin OTA");
|
||||
Serial.println("Not enough space to begin OTA");
|
||||
}
|
||||
}
|
||||
|
||||
void SDInterface::main() {
|
||||
if ((this->supported) && (this->do_save)) {
|
||||
//Serial.println("Saving packet...");
|
||||
buffer_obj.forceSave(&SD);
|
||||
}
|
||||
}
|
||||
|
||||
//void SDInterface::savePacket(uint8_t* buf, uint32_t len) {
|
||||
// if (this->supported)
|
||||
// buffer_obj.save(
|
||||
//}
|
||||
39
esp32_marauder/SDInterface.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef SDInterface_h
|
||||
#define SDInterface_h
|
||||
|
||||
#include "SD.h"
|
||||
#include "Buffer.h"
|
||||
#include "Display.h"
|
||||
#include <Update.h>
|
||||
|
||||
extern Buffer buffer_obj;
|
||||
extern Display display_obj;
|
||||
|
||||
#define SD_CS 12
|
||||
|
||||
class SDInterface {
|
||||
|
||||
private:
|
||||
|
||||
public:
|
||||
uint8_t cardType;
|
||||
//uint64_t cardSizeBT;
|
||||
//uint64_t cardSizeKB;
|
||||
uint64_t cardSizeMB;
|
||||
//uint64_t cardSizeGB;
|
||||
bool supported = false;
|
||||
bool do_save = true;
|
||||
|
||||
String card_sz;
|
||||
|
||||
bool initSD();
|
||||
|
||||
void addPacket(uint8_t* buf, uint32_t len);
|
||||
void openCapture(String file_name = "");
|
||||
void runUpdate();
|
||||
void performUpdate(Stream &updateSource, size_t updateSize);
|
||||
void main();
|
||||
//void savePacket(uint8_t* buf, uint32_t len);
|
||||
};
|
||||
|
||||
#endif
|
||||
33
esp32_marauder/TemperatureInterface.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "TemperatureInterface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
uint8_t temprature_sens_read();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
uint8_t temprature_sens_read();
|
||||
|
||||
TemperatureInterface::TemperatureInterface() {
|
||||
|
||||
}
|
||||
|
||||
void TemperatureInterface::RunSetup() {
|
||||
this->initTime = millis();
|
||||
this->current_temp = this->getCurrentTemp();
|
||||
}
|
||||
|
||||
uint8_t TemperatureInterface::getCurrentTemp() {
|
||||
return ((temprature_sens_read() - 32) / 1.8);
|
||||
}
|
||||
|
||||
void TemperatureInterface::main(uint32_t currentTime) {
|
||||
if (currentTime != 0) {
|
||||
if (currentTime - initTime >= 100) {
|
||||
//Serial.println("Checking Battery Level");
|
||||
this->initTime = millis();
|
||||
this->current_temp = this->getCurrentTemp();
|
||||
}
|
||||
}
|
||||
}
|
||||
22
esp32_marauder/TemperatureInterface.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef TemperatureInterface_h
|
||||
#define TemperatureInterface_h
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
class TemperatureInterface {
|
||||
|
||||
private:
|
||||
uint32_t initTime = 0;
|
||||
|
||||
public:
|
||||
TemperatureInterface();
|
||||
|
||||
uint8_t current_temp = 0;
|
||||
uint8_t old_temp = 0;
|
||||
|
||||
uint8_t getCurrentTemp();
|
||||
void RunSetup();
|
||||
void main(uint32_t currentTime);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -11,6 +11,8 @@ void Web::main()
|
||||
{
|
||||
//Serial.println("Running the shits");
|
||||
// Notify if client has connected to the update server
|
||||
|
||||
|
||||
int current_sta = WiFi.softAPgetStationNum();
|
||||
|
||||
if (current_sta < this->num_sta)
|
||||
@@ -26,27 +28,54 @@ void Web::main()
|
||||
Serial.println(this->num_sta);
|
||||
}
|
||||
|
||||
|
||||
server.handleClient();
|
||||
delay(1);
|
||||
}
|
||||
|
||||
// Callback for the embedded jquery.min.js page
|
||||
void Web::onJavaScript(void) {
|
||||
Serial.println("onJavaScript(void)");
|
||||
server.setContentLength(jquery_min_js_v3_2_1_gz_len);
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send_P(200, "text/javascript", jquery_min_js_v3_2_1_gz, jquery_min_js_v3_2_1_gz_len);
|
||||
}
|
||||
|
||||
void Web::setupOTAupdate()
|
||||
{
|
||||
uint8_t newMACAddress[] = {0x06, 0x07, 0x0D, 0x09, 0x0E, 0x0D};
|
||||
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, 100);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_WHITE);
|
||||
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
display_obj.tft.print("Configuring update server...\n\n");
|
||||
Serial.println("Configuring update server...");
|
||||
|
||||
display_obj.tft.setTextColor(TFT_YELLOW);
|
||||
|
||||
// Start WiFi AP
|
||||
Serial.println("Initializing WiFi...");
|
||||
//wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
esp_wifi_init(&wifi_scan_obj.cfg);
|
||||
//esp_wifi_set_storage(WIFI_STORAGE_RAM);
|
||||
if (esp_wifi_set_storage(WIFI_STORAGE_FLASH) != ESP_OK)
|
||||
Serial.println("Could not set WiFi Storage!");
|
||||
esp_wifi_set_mode(WIFI_MODE_NULL);
|
||||
esp_wifi_start();
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
|
||||
Serial.println("Starting softAP...");
|
||||
esp_wifi_set_mac(ESP_IF_WIFI_AP, &newMACAddress[0]);
|
||||
WiFi.softAP(ssid, password);
|
||||
Serial.println("");
|
||||
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
|
||||
Serial.println("Displaying settings to TFT...");
|
||||
display_obj.tft.print("SSID: ");
|
||||
display_obj.tft.println(ssid);
|
||||
display_obj.tft.print("IP address: ");
|
||||
@@ -65,7 +94,11 @@ void Web::setupOTAupdate()
|
||||
}
|
||||
Serial.println("mDNS responder started");
|
||||
*/
|
||||
|
||||
|
||||
// return javascript jquery
|
||||
Serial.println("Setting server behavior...");
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
server.on("/jquery.min.js", HTTP_GET, onJavaScript);
|
||||
/*return index page which is stored in serverIndex */
|
||||
server.on("/", HTTP_GET, [this]() {
|
||||
server.sendHeader("Connection", "close");
|
||||
@@ -87,6 +120,7 @@ void Web::setupOTAupdate()
|
||||
display_obj.tft.print("Update: ");
|
||||
display_obj.tft.print(upload.filename.c_str());
|
||||
display_obj.tft.print("\n");
|
||||
//display_obj.updateBanner(menu_function_obj.current_menu->name);
|
||||
Serial.printf("Update: %s\n", upload.filename.c_str());
|
||||
if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { //start with max available size
|
||||
Update.printError(Serial);
|
||||
@@ -127,9 +161,25 @@ void Web::setupOTAupdate()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Serial.println("Finished setting server behavior");
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
Serial.println("Starting server...");
|
||||
server.begin();
|
||||
|
||||
display_obj.tft.setTextColor(TFT_GREEN);
|
||||
display_obj.tft.println("\nCompleted update server setup");
|
||||
Serial.println("Completed update server setup");
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
}
|
||||
|
||||
void Web::shutdownServer() {
|
||||
Serial.println("Closing Update Server...");
|
||||
server.stop();
|
||||
WiFi.mode(WIFI_OFF);
|
||||
esp_wifi_set_mode(WIFI_MODE_NULL);
|
||||
esp_wifi_stop();
|
||||
esp_wifi_deinit();
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
}
|
||||
|
||||
@@ -11,22 +11,26 @@ Code taken from espressif ESP32 OTA Update example
|
||||
#include <ESPmDNS.h>
|
||||
#include <Update.h>
|
||||
|
||||
#include "Assets.h"
|
||||
#include "Display.h"
|
||||
#include "WiFiScan.h"
|
||||
|
||||
extern Display display_obj;
|
||||
extern WiFiScan wifi_scan_obj;
|
||||
|
||||
class Web
|
||||
{
|
||||
private:
|
||||
|
||||
const char* host = "esp32marauder";
|
||||
const char* ssid = "MarauderOTA";
|
||||
const char* password = "justcallmekoko";
|
||||
PROGMEM const char* host = "esp32marauder";
|
||||
PROGMEM const char* ssid = "MarauderOTA";
|
||||
PROGMEM const char* password = "justcallmekoko";
|
||||
|
||||
bool serving = false;
|
||||
|
||||
int num_sta = 0;
|
||||
|
||||
const char* loginIndex =
|
||||
PROGMEM const char* loginIndex =
|
||||
"<form name='loginForm'>"
|
||||
"<table width='20%' bgcolor='A09F9F' align='center'>"
|
||||
"<tr>"
|
||||
@@ -71,8 +75,15 @@ class Web
|
||||
* Server Index Page
|
||||
*/
|
||||
|
||||
const char* serverIndex =
|
||||
"<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>"
|
||||
PROGMEM const char* serverIndex =
|
||||
"<script src='/jquery.min.js'></script>"
|
||||
"Because the lack of an asynchronous webserver in this Arduino sketch like 'ESPAsyncWebServer', <br/>"
|
||||
"both file 'serverIndex' and 'jquery.min.js' can't be read from the webserver at the same time. <br/><br/>"
|
||||
"Your web browser probably requests those two files simultaneously and therefore <br/>"
|
||||
"the javascript file failed to load. By a refresh of this page, the browser cash has already <br/>"
|
||||
"load 'serverIndex' file, the web browser will do a second attempt to only read the javascript file. <br/>"
|
||||
"This second attempt, with an idle webserver, will be processed.<br/><br/>"
|
||||
"Long story short, press F5 (refresh web browser) before uploading your firmware. <br/><br/>"
|
||||
"<form method='POST' action='#' enctype='multipart/form-data' id='upload_form'>"
|
||||
"<input type='file' name='update'>"
|
||||
"<input type='submit' value='Update'>"
|
||||
@@ -113,7 +124,9 @@ class Web
|
||||
Web();
|
||||
|
||||
void main();
|
||||
PROGMEM static void onJavaScript();
|
||||
void setupOTAupdate();
|
||||
void shutdownServer();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,31 +5,49 @@
|
||||
#include <BLEUtils.h>
|
||||
#include <BLEScan.h>
|
||||
#include <BLEAdvertisedDevice.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <math.h>
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_wifi_types.h"
|
||||
#include "esp_bt.h"
|
||||
#include "Display.h"
|
||||
#include "SDInterface.h"
|
||||
#include "Buffer.h"
|
||||
#include "BatteryInterface.h"
|
||||
#include "TemperatureInterface.h"
|
||||
#include "Assets.h"
|
||||
//#include "MenuFunctions.h"
|
||||
|
||||
#define bad_list_length 3
|
||||
|
||||
#define OTA_UPDATE 100
|
||||
#define SHOW_INFO 101
|
||||
#define WIFI_SCAN_OFF 0
|
||||
#define WIFI_SCAN_PROBE 1
|
||||
#define WIFI_SCAN_AP 2
|
||||
#define WIFI_SCAN_ST 3
|
||||
#define WIFI_SCAN_DEAUTH 4
|
||||
#define WIFI_SCAN_ALL 5
|
||||
#define WIFI_PACKET_MONITOR 6
|
||||
#define WIFI_ATTACK_BEACON_SPAM 7
|
||||
#define WIFI_ATTACK_RICK_ROLL 8
|
||||
#define BT_SCAN_ALL 9
|
||||
#define BT_SCAN_SKIMMERS 10
|
||||
#define WIFI_SCAN_PWN 3
|
||||
#define WIFI_SCAN_EAPOL 4
|
||||
#define WIFI_SCAN_DEAUTH 5
|
||||
#define WIFI_SCAN_ALL 6
|
||||
#define WIFI_PACKET_MONITOR 7
|
||||
#define WIFI_ATTACK_BEACON_SPAM 8
|
||||
#define WIFI_ATTACK_RICK_ROLL 9
|
||||
#define BT_SCAN_ALL 10
|
||||
#define BT_SCAN_SKIMMERS 11
|
||||
#define WIFI_SCAN_ESPRESSIF 12
|
||||
//#define LV_JOIN_WIFI 12
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
#define MAX_CHANNEL 14
|
||||
|
||||
extern Display display_obj;
|
||||
extern SDInterface sd_obj;
|
||||
extern Buffer buffer_obj;
|
||||
extern BatteryInterface battery_obj;
|
||||
extern TemperatureInterface temp_obj;
|
||||
|
||||
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, bool en_sys_seq);
|
||||
|
||||
@@ -55,12 +73,12 @@ class WiFiScan
|
||||
|
||||
uint32_t initTime = 0;
|
||||
bool run_setup = true;
|
||||
int set_channel = 1;
|
||||
int bluetoothScanTime = 5;
|
||||
int packets_sent = 0;
|
||||
const wifi_promiscuous_filter_t filt = {.filter_mask=WIFI_PROMIS_FILTER_MASK_MGMT | WIFI_PROMIS_FILTER_MASK_DATA};
|
||||
BLEScan* pBLEScan;
|
||||
|
||||
String connected_network = "";
|
||||
String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
|
||||
|
||||
char* rick_roll[8] = {
|
||||
@@ -105,7 +123,8 @@ class WiFiScan
|
||||
/*36*/ 0x00
|
||||
};
|
||||
|
||||
void packetMonitorMain();
|
||||
void packetMonitorMain(uint32_t currentTime);
|
||||
void eapolMonitorMain(uint32_t currentTime);
|
||||
void changeChannel();
|
||||
void updateMidway();
|
||||
void tftDrawXScalButtons();
|
||||
@@ -117,20 +136,35 @@ class WiFiScan
|
||||
void broadcastSetSSID(uint32_t current_time, char* ESSID);
|
||||
void RunRickRoll(uint8_t scan_mode, uint16_t color);
|
||||
void RunBeaconSpam(uint8_t scan_mode, uint16_t color);
|
||||
void RunEspressifScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunPwnScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunBeaconScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunDeauthScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunEapolScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunProbeScan(uint8_t scan_mode, uint16_t color);
|
||||
void RunPacketMonitor(uint8_t scan_mode, uint16_t color);
|
||||
void RunBluetoothScan(uint8_t scan_mode, uint16_t color);
|
||||
//void RunLvJoinWiFi(uint8_t scan_mode, uint16_t color);
|
||||
static void scanCompleteCB(BLEScanResults scanResults);
|
||||
|
||||
public:
|
||||
WiFiScan();
|
||||
|
||||
int set_channel = 1;
|
||||
|
||||
int old_channel = 0;
|
||||
|
||||
bool orient_display = false;
|
||||
|
||||
|
||||
|
||||
String free_ram = "";
|
||||
String old_free_ram = "";
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
|
||||
String getStaMAC();
|
||||
String getApMAC();
|
||||
String freeRAM();
|
||||
void RunInfo();
|
||||
void channelHop();
|
||||
uint8_t currentScanMode = 0;
|
||||
void main(uint32_t currentTime);
|
||||
@@ -138,9 +172,12 @@ class WiFiScan
|
||||
void StopScan(uint8_t scan_mode);
|
||||
|
||||
static void getMAC(char *addr, uint8_t* data, uint16_t offset);
|
||||
static void espressifSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void pwnSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void beaconSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void deauthSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void probeSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
static void wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* FLASH SETTINGS
|
||||
Board: LOLIN D32
|
||||
Flash Frequency: 80MHz
|
||||
Partition Scheme: No OTA
|
||||
Partition Scheme: Minimal SPIFFS
|
||||
https://www.online-utility.org/image/convert/to/XBM
|
||||
*/
|
||||
|
||||
@@ -15,25 +15,55 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#include "esp_system.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
|
||||
#include "Assets.h"
|
||||
#include "Display.h"
|
||||
#include "WiFiScan.h"
|
||||
#include "MenuFunctions.h"
|
||||
#include "SDInterface.h"
|
||||
#include "Web.h"
|
||||
#include "Buffer.h"
|
||||
#include "BatteryInterface.h"
|
||||
#include "TemperatureInterface.h"
|
||||
#include "LedInterface.h"
|
||||
//#include "icons.h"
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
uint8_t temprature_sens_read();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
uint8_t temprature_sens_read();
|
||||
*/
|
||||
|
||||
Display display_obj;
|
||||
WiFiScan wifi_scan_obj;
|
||||
MenuFunctions menu_function_obj;
|
||||
SDInterface sd_obj;
|
||||
Web web_obj;
|
||||
Buffer buffer_obj;
|
||||
BatteryInterface battery_obj;
|
||||
TemperatureInterface temp_obj;
|
||||
LedInterface led_obj;
|
||||
|
||||
Adafruit_NeoPixel strip = Adafruit_NeoPixel(Pixels, PIN, NEO_GRB + NEO_KHZ800);
|
||||
|
||||
uint32_t currentTime = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
pinMode(FLASH_BUTTON, INPUT);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// Preset SPI CS pins to avoid bus conflicts
|
||||
digitalWrite(TFT_CS, HIGH);
|
||||
digitalWrite(SD_CS, HIGH);
|
||||
|
||||
Serial.begin(115200);
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.println("\n\n--------------------------------\n");
|
||||
@@ -42,17 +72,49 @@ void setup()
|
||||
Serial.println(" By: justcallmekoko\n");
|
||||
Serial.println("--------------------------------\n\n");
|
||||
|
||||
//Serial.println("Internal Temp: " + (String)((temprature_sens_read() - 32) / 1.8));
|
||||
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
|
||||
// Do some SD stuff
|
||||
if(sd_obj.initSD())
|
||||
Serial.println("SD Card supported");
|
||||
else
|
||||
Serial.println("SD Card NOT Supported");
|
||||
|
||||
// Run display setup
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
display_obj.RunSetup();
|
||||
|
||||
// Build menus
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
menu_function_obj.RunSetup();
|
||||
|
||||
// Battery stuff
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
battery_obj.RunSetup();
|
||||
|
||||
// Temperature stuff
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
temp_obj.RunSetup();
|
||||
|
||||
battery_obj.battery_level = battery_obj.getBatteryLevel();
|
||||
|
||||
if (battery_obj.i2c_supported) {
|
||||
Serial.println("IP5306 I2C Supported: true");
|
||||
}
|
||||
else
|
||||
Serial.println("IP5306 I2C Supported: false");
|
||||
|
||||
Serial.println(wifi_scan_obj.freeRAM());
|
||||
|
||||
// Do some LED stuff
|
||||
led_obj.RunSetup();
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
|
||||
// get the current time
|
||||
//if ((wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM))
|
||||
currentTime = millis();
|
||||
@@ -64,9 +126,14 @@ void loop()
|
||||
{
|
||||
display_obj.main();
|
||||
wifi_scan_obj.main(currentTime);
|
||||
sd_obj.main();
|
||||
battery_obj.main(currentTime);
|
||||
temp_obj.main(currentTime);
|
||||
//led_obj.main(currentTime);
|
||||
//if ((wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM))
|
||||
if (wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR)
|
||||
menu_function_obj.main();
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL))
|
||||
menu_function_obj.main(currentTime);
|
||||
if (wifi_scan_obj.currentScanMode == OTA_UPDATE)
|
||||
web_obj.main();
|
||||
delay(1);
|
||||
|
||||
BIN
esp32_marauder/esp32_marauder_v0_6_8_20200715_1.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_6_8_20200715_6.bin
Normal file
BIN
pictures/IMG_0420.JPG
Normal file
|
After Width: | Height: | Size: 7.4 MiB |
BIN
pictures/IMG_0421.JPG
Normal file
|
After Width: | Height: | Size: 7.3 MiB |
BIN
pictures/IMG_0423.JPG
Normal file
|
After Width: | Height: | Size: 7.5 MiB |
BIN
pictures/IMG_0424.JPG
Normal file
|
After Width: | Height: | Size: 8.3 MiB |
BIN
pictures/IMG_0425.JPG
Normal file
|
After Width: | Height: | Size: 6.6 MiB |
BIN
pictures/IMG_0426.JPG
Normal file
|
After Width: | Height: | Size: 7.0 MiB |
BIN
pictures/IMG_2519 - Copy.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
pictures/IMG_2520 - Copy.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
pictures/diy.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
pictures/icons/battery_16.bmp
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
pictures/icons/device_22.bmp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
pictures/icons/device_info_22.bmp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
pictures/icons/eapol_22.bmp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
pictures/icons/espressif_22.bmp
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
pictures/icons/pwnagotchi_22.bmp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
pictures/icons/sd_16.bmp
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
pictures/icons/sd_update_22.bmp
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
pictures/icons/web_update_22.bmp
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
pictures/m5stack.jpg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
pictures/odroid_marauder.jpg
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
6
pictures/xbm/battery_16.XBM
Normal file
@@ -0,0 +1,6 @@
|
||||
#define 1589480361777_width 16
|
||||
#define 1589480361777_height 16
|
||||
static char 1589480361777_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFC, 0x9F, 0xF9, 0xDF, 0xFB, 0xDF, 0xFB, 0x1F, 0xF8,
|
||||
0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8,
|
||||
0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF, };
|
||||
9
pictures/xbm/device_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1581293081239_width 22
|
||||
#define 1581293081239_height 22
|
||||
static char 1581293081239_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x1F, 0x3F, 0x3E,
|
||||
0x1F, 0x3F, 0x3E, 0x1F, 0x3F, 0x3E, 0x1F, 0x3F, 0x3E, 0x1F, 0x1E, 0x3E,
|
||||
0x9F, 0x5E, 0x3E, 0x9F, 0x4C, 0x3E, 0x9F, 0x6D, 0x3E, 0x9F, 0x61, 0x3E,
|
||||
0x9F, 0x73, 0x3E, 0x9F, 0x73, 0x3E, 0x9F, 0x7F, 0x3E, 0x9F, 0x7F, 0x3E,
|
||||
0x9F, 0x7F, 0x3E, 0x9F, 0x7F, 0x3E, 0x9F, 0x7F, 0x3E, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
9
pictures/xbm/device_info_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1581293373698_width 22
|
||||
#define 1581293373698_height 22
|
||||
static char 1581293373698_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0x7F, 0xF0, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F,
|
||||
0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF1, 0x3F,
|
||||
0xFF, 0xF1, 0x3F, 0x7F, 0xC0, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
9
pictures/xbm/eapol_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1584799606553_width 22
|
||||
#define 1584799606553_height 22
|
||||
static char 1584799606553_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3B, 0xFF, 0xFF, 0x39,
|
||||
0xFF, 0xFF, 0x3C, 0xFF, 0x7F, 0x3A, 0xFF, 0x3F, 0x37, 0xFF, 0x9F, 0x3E,
|
||||
0xFF, 0xCF, 0x3D, 0xFF, 0xE7, 0x3F, 0xFF, 0xF3, 0x3F, 0xCF, 0xF9, 0x3F,
|
||||
0xB7, 0xFC, 0x3F, 0x77, 0xFE, 0x3F, 0xF7, 0xFE, 0x3F, 0xEF, 0xFD, 0x3F,
|
||||
0xDF, 0xFB, 0x3F, 0xBF, 0xFB, 0x3F, 0x7F, 0xFC, 0x3F, 0xFF, 0xFF, 0x3F,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
9
pictures/xbm/espressif_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1593729689573_width 22
|
||||
#define 1593729689573_height 22
|
||||
static char 1593729689573_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xC7, 0x3F, 0x7F, 0x0E, 0x3F,
|
||||
0x2F, 0x30, 0x3E, 0x37, 0x40, 0x3C, 0xF3, 0x83, 0x38, 0x0B, 0x04, 0x39,
|
||||
0x03, 0x18, 0x32, 0x01, 0x20, 0x32, 0xF1, 0x21, 0x34, 0x01, 0x46, 0x34,
|
||||
0x03, 0x84, 0x38, 0x7B, 0x88, 0x38, 0x93, 0x88, 0x38, 0x17, 0x89, 0x3C,
|
||||
0x07, 0x89, 0x3F, 0xCF, 0x89, 0x3D, 0x9F, 0x49, 0x3C, 0x7F, 0x00, 0x3F,
|
||||
0xFF, 0xE3, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
9
pictures/xbm/pwnagotchi_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1592872258566_width 22
|
||||
#define 1592872258566_height 22
|
||||
static char 1592872258566_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x7F, 0x80, 0x3F, 0xBF, 0x7F, 0x3F,
|
||||
0xDF, 0xC0, 0x3E, 0x6F, 0xBF, 0x3D, 0xBF, 0x61, 0x3F, 0xFF, 0xDE, 0x3F,
|
||||
0xFF, 0xF3, 0x3F, 0xFF, 0xFF, 0x3F, 0xFB, 0xFF, 0x37, 0xFD, 0xFF, 0x2F,
|
||||
0xFE, 0xFF, 0x1F, 0x8E, 0x7F, 0x1C, 0x36, 0xBF, 0x19, 0x16, 0xBF, 0x18,
|
||||
0x06, 0x3F, 0x18, 0x8E, 0x7F, 0x1C, 0xFD, 0xFF, 0x2F, 0xDB, 0xF3, 0x36,
|
||||
0x3F, 0x0C, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
6
pictures/xbm/sd_16.XBM
Normal file
@@ -0,0 +1,6 @@
|
||||
#define 1589480446253_width 16
|
||||
#define 1589480446253_height 16
|
||||
static char 1589480446253_bits[] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x07, 0xF8, 0x07, 0xF0, 0x07, 0xE0,
|
||||
0x67, 0xE7, 0x97, 0xE9, 0x17, 0xE9, 0x67, 0xE9, 0x87, 0xE9, 0x97, 0xE9,
|
||||
0x67, 0xE7, 0x07, 0xE0, 0x07, 0xE0, 0xFF, 0xFF, };
|
||||
9
pictures/xbm/sd_update_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1583800096004_width 22
|
||||
#define 1583800096004_height 22
|
||||
static char 1583800096004_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0x00, 0x3C, 0x7F, 0xFF, 0x3D,
|
||||
0xBF, 0xFF, 0x3D, 0xDF, 0xFF, 0x3D, 0xEF, 0xFF, 0x3D, 0x6F, 0xC4, 0x3D,
|
||||
0xAF, 0xB7, 0x3D, 0xAF, 0xB7, 0x3D, 0x6F, 0xB6, 0x3D, 0xEF, 0xB5, 0x3D,
|
||||
0xEF, 0xB5, 0x3D, 0x2F, 0xC6, 0x3D, 0xEF, 0xFF, 0x3D, 0xEF, 0xFF, 0x3D,
|
||||
0xEF, 0xFF, 0x3D, 0xEF, 0xFF, 0x3D, 0xEF, 0xFF, 0x3D, 0x0F, 0x00, 0x3C,
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||
9
pictures/xbm/web_update_22.XBM
Normal file
@@ -0,0 +1,9 @@
|
||||
#define 1583800128954_width 22
|
||||
#define 1583800128954_height 22
|
||||
static char 1583800128954_bits[] = {
|
||||
0xFF, 0xFF, 0x3F, 0xFF, 0xC0, 0x3F, 0x3F, 0x23, 0x3F, 0xDF, 0x94, 0x3E,
|
||||
0x6F, 0x55, 0x3D, 0xB7, 0xB6, 0x3A, 0x03, 0x00, 0x30, 0xDB, 0xB6, 0x35,
|
||||
0xDD, 0xB6, 0x2D, 0xED, 0xB6, 0x2B, 0xED, 0xB6, 0x2B, 0x01, 0x00, 0x20,
|
||||
0xED, 0xB6, 0x2B, 0xDD, 0xB6, 0x2D, 0xDB, 0xB6, 0x35, 0xDB, 0x96, 0x35,
|
||||
0x07, 0x00, 0x38, 0x6F, 0x55, 0x3D, 0xDF, 0x94, 0x3E, 0x3F, 0x23, 0x3F,
|
||||
0xFF, 0xC0, 0x3F, 0xFF, 0xFF, 0x3F, };
|
||||