Compare commits

...

24 Commits

Author SHA1 Message Date
Just Call Me Koko
54e00389cc Release v0.9.0 2021-05-06 17:05:45 -04:00
Just Call Me Koko
a888c97d52 Create release_countdown.html 2021-05-04 12:38:20 -04:00
Just Call Me Koko
3203c1f94a Add files via upload 2021-04-29 14:19:16 -04:00
Just Call Me Koko
98e5b532bc Add files via upload 2021-04-29 09:20:41 -04:00
Just Call Me Koko
f43907e37c Add files via upload 2021-04-29 09:02:34 -04:00
Just Call Me Koko
c993edb6b2 Upload Marauder 7 images 2021-04-27 15:25:02 -04:00
Just Call Me Koko
e27ffe1d5f Fix ESP8266 Menu option 2021-04-27 15:23:50 -04:00
Just Call Me Koko
324e780609 Update README.md 2021-04-26 11:18:03 -04:00
Just Call Me Koko
1b51354e5d Create old_README.md 2021-04-26 10:44:59 -04:00
Just Call Me Koko
2ec82c509b Check for SD 2021-04-17 13:52:32 -04:00
Just Call Me Koko
d6f20ec1fa add Save As to ducky scripts 2021-04-15 21:20:47 -04:00
Just Call Me Koko
87b0fbf370 Load and modify ducky scripts 2021-04-15 20:50:53 -04:00
Just Call Me Koko
a314e8e817 Add load ducky scripts 2021-04-15 17:08:26 -04:00
Just Call Me Koko
a52e52962d Better ATmega32u4 detection 2021-04-14 16:32:52 -04:00
Just Call Me Koko
e3de597e0a Add A32U4 check 2021-04-13 21:32:05 -04:00
Just Call Me Koko
3f3b784d47 Add check ESP8266 2021-04-13 20:32:15 -04:00
Just Call Me Koko
c822bba6da Add detect ESP8266 2021-04-13 20:05:04 -04:00
Just Call Me Koko
6ce7f598eb Add ducky script execution 2021-04-08 21:48:31 -04:00
Just Call Me Koko
fe33f1fab3 Add BadUSB 2021-04-08 21:02:31 -04:00
Just Call Me Koko
a18b8b3004 Add esp8266 interface 2021-04-08 15:22:33 -04:00
Just Call Me Koko
5102939dd5 Update README.md 2021-01-07 12:23:20 -05:00
Just Call Me Koko
02ac69ecca Update README.md 2021-01-07 12:09:47 -05:00
Just Call Me Koko
4154b0e0dd Update README to v0.8.0 2020-12-30 22:18:38 -05:00
Just Call Me Koko
e108fef595 Add TFT pin definitions 2020-12-30 22:18:01 -05:00
38 changed files with 1530 additions and 246 deletions

214
README.md
View File

@@ -3,7 +3,7 @@
<!---[![Build Status](https://travis-ci.com/justcallmekoko/ESP32Marauder.svg?branch=master)](https://travis-ci.com/justcallmekoko/ESP32Marauder)--->
<!---Shields/Badges https://shields.io/--->
# ESP32 Marauder v0.7.0
# ESP32 Marauder v0.9.0
<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>
@@ -16,216 +16,16 @@
<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>
<br>
<a href="https://www.twitch.tv/willstunforfood"><img src="https://assets.stickpng.com/images/580b57fcd9996e24bc43c540.png" alt="Twitch WillStunForFood" width="200"></a>
</p>
[![HitCount](http://hits.dwyl.io/justcallmekoko/badges.svg)](http://hits.dwyl.io/justcallmekoko/badges)
[![Build Status](https://travis-ci.com/justcallmekoko/ESP32Marauder.svg?branch=master)](https://travis-ci.com/justcallmekoko/ESP32Marauder)
# Table Of Condensation
- [About](#about)
- [YouTube](#youtube)
- [Hackster Article](#hackster-article)
- [Capabilities](#capabilities)
- [Do It Yourself](#do-it-yourself)
- [Hardware](#hardware)
- [Connections](#connections)
- [Flashing Firmware](#flashing-firmware)
- [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 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. 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
<p align="left"><a href="https://www.youtube.com/watch?v=BGFO1wA29o8"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/esp32marauder_thumbnail.jpg" width="500"></a></p>
### Hackster Article
You can check out the marauder article written [here](https://www.hackster.io/news/esp32-marauder-puts-a-bluetooth-wi-fi-pen-testing-toolkit-in-your-pocket-32d389f6e66f) as well as other interesting engineering projects.
## Capabilities
### Current
- Join WiFi: Just join a WiFi network
- Shutdown WiFi: Shutdown the Marauder WiFi interface to save some RAM
- Generate SSIDs: Add 20 random SSIDs to your list of SSIDs
- Add SSID: Use an on-screen keyboard to add your own SSIDs to the SSID list
- Clear SSIDs: Clear the list of SSIDs
- Probe Request Sniff: Sniff for WiFi [probe request frames](https://mrncciew.com/2014/10/27/cwap-802-11-probe-requestresponse/) sent by wireless devices
- Beacon Sniff: Sniff [beacon frames](https://en.wikipedia.org/wiki/Beacon_frame) sent by wireless acccess points
- Beacon Spam List: Spam a list of SSIDs and monitoring connection attempts to those networks
- Beacon Spam Random: Spam hundreds of random beacon frames to wireless devices within range
- Rick Roll Beacon: Broadcast the rick roll lyrics as WiFi access points
- Bluetooth Sniffer: Sniff bluetooth devices within range
- Shutdown BLE: Shutdown the Marauder BLE interface to save RAM
- Detect Card Skimmers: Detect bluetooth enabled credit card skimmers
- Packet Monitor: Show WiFi packet density on a given channel using a time bar graph
- EAPOL/PMKID Scan: Capture EAPOL/PMKID frames
- Detect Pwnagotchi: Detect any pwnagotchis in range
- Detect Espressif: Detect any espressif devices in range
- Deauth Sniff: Detect deauthentication packets sent on all channels
- Draw: Just doodle on the screen or whatever
- 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:
- Any ESP32 Development Board
- 2.8" TFT Touch Screen w/ ili9341
- Jumper Wires
- Breadboard
### 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)
| 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 |
For the analog battery circuit, use a 4 to 1 voltage divider, and (optional) a mosfet.
For the charge detection circuit, use a 1 to 2 voltage divider (the charge detection is optional and only changes the battery icon colour while charging)
| BATTERY | ESP32 |
| ------- | ------ |
| BAT + | GPIO34 |
| MOSFET | GPIO13 |
| CHARGE +| GPIO27 |
## Flashing Firmware
### Using Arduino IDE
1. Install the [Arduino IDE](https://www.arduino.cc/en/main/software)
2. In the Arduino IDE, go to `File`>`Preferences`
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`
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
<!---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
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`
10.5. If you're using the analog battery measuring circuit, go to the MenuFunctions.h and change "#define BATTERY_ANALOG_ON" to 1
11. Plug your ESP32 into a USB port and select the COM port under `Tools`>`Port`
12. Select `LOLIN D32` under `Tools`>`Boards`
12.5 If you want an upscaled version of the logo, go to the data folder and rename "marauder3L1.jpg" to "marauder3L.jpg"
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
Catch my live stream on [Twitch](https://www.twitch.tv/willstunforfood) where I play games, have just chatting sessions to talk tech, and just generally be an ordinary person who can't figure out how to make proper life decisions.
### 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).
## Getting Started
Download the [latest release](https://github.com/justcallmekoko/ESP32Marauder/releases/latest) of the firmware.
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
# Icons
I put these here just because
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/attack_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/beacon_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/beacon_spam_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/bluetooth_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/bluetooth_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/deauth_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/device_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/device_info_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/draw_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/eapol_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/espressif_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/general_apps_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/monitor_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/probe_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/pwnagotchi_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/reboot_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/rick_roll_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/scan_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/sd_update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/skimmer_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/web_update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/wifi_22.bmp">
# 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.
# 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
Check out the project [wiki](https://github.com/justcallmekoko/ESP32Marauder/wiki) for a full overview of the ESP32 Marauder
# For Sale Now
You can buy the ESP32 Marauder using [this link](https://www.tindie.com/products/justcallmekoko/esp32-marauder/)

View File

@@ -0,0 +1,459 @@
#include <hidboot.h>
#include <usbhub.h>
#include "Keyboard.h"
#define Serial Serial1
// Satisfy the IDE, which needs to see the include statment in the ino too.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#include <SPI.h>
#endif
#include <SPI.h>
#include <SD.h>
#define CAPS_LOCK 0x39
#define NUM_LOCK 0x53
#define SCROLL_LOCK 0x47
#define PRINT_SCREEN 0x46
#define NUM_1 0x59
#define NUM_2 0x5A
#define NUM_3 0x5B
#define NUM_4 0x5C
#define NUM_5 0x5D
#define NUM_6 0x5E
#define NUM_7 0x5F
#define NUM_8 0x60
#define NUM_9 0x61
#define NUM_0 0x62
#define KEY_CAPS_LOCK 0x01
#define KEY_NUM_LOCK 0x02
#define KEY_SCROLL_LOCK 0x04
#define KEY_PRINT_SCREEN 0x05
#define KEY_NUM_1 0x31
#define KEY_NUM_2 0x32
#define KEY_NUM_3 0x33
#define KEY_NUM_4 0x34
#define KEY_NUM_5 0x35
#define KEY_NUM_6 0x36
#define KEY_NUM_7 0x37
#define KEY_NUM_8 0x38
#define KEY_NUM_9 0x39
#define KEY_NUM_0 0x30
String bufferStr = "";
String last = "";
int defaultDelay = 0;
bool shift = false;
bool num_lock = false; // false is working half way
USB Usb;
HIDBoot<USB_HID_PROTOCOL_KEYBOARD> HidKeyboard(&Usb);
uint32_t next_time;
class KbdRptParser : public KeyboardReportParser{
public:
uint8_t _parse(uint8_t key);
String _getChar(uint8_t key);
protected:
void OnControlKeysChanged(uint8_t before, uint8_t after);
void OnKeyDown (uint8_t mod, uint8_t key);
void OnKeyUp (uint8_t mod, uint8_t key);
void OnKeyPressed(uint8_t key);
void _press(uint8_t key);
void _release(uint8_t key);
};
void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key){
digitalWrite(LED_BUILTIN, HIGH);
int parsedKey = _parse(key);
if(parsedKey == key){
uint8_t c = OemToAscii(mod, key);
OnKeyPressed(c);
if(c != 0x20 && c != 0x00) _press(c);
else _press(key);
}else _press(parsedKey);
digitalWrite(LED_BUILTIN, LOW);
}
void KbdRptParser::OnKeyUp(uint8_t mod, uint8_t key){
int parsedKey = _parse(key);
if(parsedKey == key){
uint8_t c = OemToAscii(mod, key);
OnKeyPressed(c);
if(c != 0x20 && c != 0x00){
_release(c);
Serial.print((char)c);
}
else{
_release(key);
Serial.print("0x");
Serial.print(key, HEX);
}
}else{
_release(parsedKey);
Serial.print(_getChar(key));
}
}
void KbdRptParser::OnControlKeysChanged(uint8_t before, uint8_t after) {
MODIFIERKEYS beforeMod;
*((uint8_t*)&beforeMod) = before;
MODIFIERKEYS afterMod;
*((uint8_t*)&afterMod) = after;
//left
if(beforeMod.bmLeftCtrl != afterMod.bmLeftCtrl){
if(afterMod.bmLeftCtrl) Keyboard.press(KEY_LEFT_CTRL);
else Keyboard.release(KEY_LEFT_CTRL);
Serial.print("<ctrl "+(String)afterMod.bmLeftCtrl+">");
}
if(beforeMod.bmLeftShift != afterMod.bmLeftShift){
if(afterMod.bmLeftShift) Keyboard.press(KEY_LEFT_SHIFT);
else Keyboard.release(KEY_LEFT_SHIFT);
shift = afterMod.bmLeftShift;
//Serial.print("<shift "+(String)afterMod.bmLeftShift+">");
}
if(beforeMod.bmLeftAlt != afterMod.bmLeftAlt){
if(afterMod.bmLeftAlt) Keyboard.press(KEY_LEFT_ALT);
else Keyboard.release(KEY_LEFT_ALT);
Serial.print("<alt "+(String)afterMod.bmLeftAlt+">");
}
if(beforeMod.bmLeftGUI != afterMod.bmLeftGUI){
if(afterMod.bmLeftGUI) Keyboard.press(KEY_LEFT_GUI);
else Keyboard.release(KEY_LEFT_GUI);
Serial.print("<gui "+(String)afterMod.bmLeftGUI+">");
}
//right
if(beforeMod.bmRightCtrl != afterMod.bmRightCtrl){
if(afterMod.bmRightCtrl) Keyboard.press(KEY_RIGHT_CTRL);
else Keyboard.release(KEY_RIGHT_CTRL);
Serial.print("<ctrl "+(String)afterMod.bmRightCtrl+">");
}
if(beforeMod.bmRightShift != afterMod.bmRightShift){
if(afterMod.bmRightShift) Keyboard.press(KEY_RIGHT_SHIFT);
else Keyboard.release(KEY_RIGHT_SHIFT);
shift = afterMod.bmLeftShift;
//Serial.print("<shift "+(String)afterMod.bmRightShift+">");
}
if(beforeMod.bmRightAlt != afterMod.bmRightAlt){
if(afterMod.bmRightAlt) Keyboard.press(KEY_RIGHT_ALT);
else Keyboard.release(KEY_RIGHT_ALT);
Serial.print("<alt "+(String)afterMod.bmRightAlt+">");
}
if(beforeMod.bmRightGUI != afterMod.bmRightGUI){
if(afterMod.bmRightGUI) Keyboard.press(KEY_RIGHT_GUI);
else Keyboard.release(KEY_RIGHT_GUI);
Serial.print("<gui "+(String)afterMod.bmRightGUI+">");
}
}
void KbdRptParser::OnKeyPressed(uint8_t key){
/*Serial.print("ASCII: \"");
Serial.print((char)key);
Serial.print("\" = 0x");
Serial.print(key, HEX);
Serial.print("; ");*/
};
uint8_t KbdRptParser::_parse(uint8_t key){
/*
Serial.print("0x");
Serial.print(key, HEX);
Serial.print(" = ");*/
switch(key){
case CAPS_LOCK: return KEY_CAPS_LOCK; break; // CAPS
case NUM_LOCK: return KEY_NUM_LOCK; break; // NUM LOCK
case SCROLL_LOCK: return KEY_SCROLL_LOCK; break; // SCROLL LOCK
case PRINT_SCREEN: return KEY_PRINT_SCREEN; break; // PRINT SCREEN
case NUM_1 : if (!num_lock) return KEY_NUM_1; break;
case NUM_2 : if (!num_lock) return KEY_NUM_2; break;
case NUM_3 : if (!num_lock) return KEY_NUM_3; break;
case NUM_4 : if (!num_lock) return KEY_NUM_4; break;
case NUM_5 : if (!num_lock) return KEY_NUM_5; break;
case NUM_6 : if (!num_lock) return KEY_NUM_6; break;
case NUM_7 : if (!num_lock) return KEY_NUM_7; break;
case NUM_8 : if (!num_lock) return KEY_NUM_8; break;
case NUM_9 : if (!num_lock) return KEY_NUM_9; break;
case NUM_0 : if (!num_lock) return KEY_NUM_0; break;
case 0x2C: return 0x20; break; // SPACE
case 40: return KEY_RETURN; break;
case 41: return KEY_ESC; break;
case 42: return KEY_BACKSPACE; break;
case 43: return KEY_TAB; break;
case 58: return KEY_F1; break;
case 59: return KEY_F2; break;
case 60: return KEY_F3; break;
case 61: return KEY_F4; break;
case 62: return KEY_F5; break;
case 63: return KEY_F6; break;
case 64: return KEY_F7; break;
case 65: return KEY_F8; break;
case 66: return KEY_F9; break;
case 67: return KEY_F10; break;
case 68: return KEY_F11; break;
case 69: return KEY_F12; break;
case 73: return KEY_INSERT; break;
case 74: return KEY_HOME; break;
case 75: return KEY_PAGE_UP; break;
case 76: return KEY_DELETE; break;
case 77: return KEY_END; break;
case 78: return KEY_PAGE_DOWN; break;
case 79: return KEY_RIGHT_ARROW; break;
case 80: return KEY_LEFT_ARROW; break;
case 81: return KEY_DOWN_ARROW; break;
case 82: return KEY_UP_ARROW; break;
case 88: return KEY_RETURN; break;
//=====[DE-Keyboard]=====//
case 0x64: return 236; break; // <
case 0x32: return 92; break; // #
//======================//
default: {
//Serial.print(" N/A ");
return key;
}
}
}
String KbdRptParser::_getChar(uint8_t key){
switch(key){
case CAPS_LOCK: return "<CAPS_LOCK>"; break; // CAPS
case NUM_LOCK: return "<NUM_LOCK>"; break; // NUM LOCK
case SCROLL_LOCK: return "<SCROLL_LOCK>"; break; // SCROLL LOCK
case PRINT_SCREEN: return "<PRINT_SCREEN>"; break; // PRINT SCREEN
//case NUM_1 : if (num_lock) return "<NUM_1>"; break;
//case NUM_2 : if (num_lock) return "<NUM_2>"; break;
//case NUM_3 : if (num_lock) return "<NUM_3>"; break;
//case NUM_4 : if (num_lock) return "<NUM_4>"; break;
//case NUM_5 : if (num_lock) return "<NUM_5>"; break;
//case NUM_6 : if (num_lock) return "<NUM_6>"; break;
//case NUM_7 : if (num_lock) return "<NUM_7>"; break;
//case NUM_8 : if (num_lock) return "<NUM_8>"; break;
//case NUM_9 : if (num_lock) return "<NUM_9>"; break;
//case NUM_0 : if (num_lock) return "<NUM_0>"; break;
case 0x2C: return " "; break;
case 40: return "<RETURN>\n"; break;
case 41: return "<ESC>\n"; break;
case 42: return "<BACKSPCAE>"; break;
case 43: return "<TAB>\n"; break;
case 58: return "<F1>\n"; break;
case 59: return "<F2>\n"; break;
case 60: return "<F3>\n"; break;
case 61: return "<F4>\n"; break;
case 62: return "<F5>\n"; break;
case 63: return "<F6>\n"; break;
case 64: return "<F7>\n"; break;
case 65: return "<F8>\n"; break;
case 66: return "<F9>\n"; break;
case 67: return "<F10>\n"; break;
case 68: return "<F11>\n"; break;
case 69: return "<F12>\n"; break;
case 73: return "<INSERT>"; break;
case 74: return "<HOME>\n"; break;
case 75: return "<PAGE_UP>\n"; break;
case 76: return "<DELETE>"; break;
case 77: return "<END>\n"; break;
case 78: return "<PAGE_DOWN>\n"; break;
case 79: return "<RIGHT_ARROW>\n"; break;
case 80: return "<LEFT_ARROW>\n"; break;
case 81: return "<DOWN_ARROW>\n"; break;
case 82: return "<UP_ARROW>\n"; break;
case 88: return "<RETURN>\n"; break;
//=====[DE-Keyboard]=====//
case 0x64: {
if(shift) return "<";
else return ">";
break;
}
case 0x32:{
if(shift) return "'";
else return "#";
break;
}
//======================//
default: {
return "";
}
}
}
void KbdRptParser::_press(uint8_t key){
/*Serial.print("0x");
Serial.print(key, HEX);
Serial.println(" DOWN");*/
Keyboard.press(key);
}
void KbdRptParser::_release(uint8_t key){
/*Serial.print("0x");
Serial.print(key, HEX);
Serial.println(" UP");
Serial.println();*/
Keyboard.release(key);
}
KbdRptParser parser;
void Line(String _line)
{
int firstSpace = _line.indexOf(" ");
if(firstSpace == -1) Press(_line);
else if(_line.substring(0,firstSpace) == "STRING"){
for(int i=firstSpace+1;i<_line.length();i++) Keyboard.write(_line[i]);
}
else if(_line.substring(0,firstSpace) == "DELAY"){
int delaytime = _line.substring(firstSpace + 1).toInt();
delay(delaytime);
}
else if(_line.substring(0,firstSpace) == "DEFAULTDELAY") defaultDelay = _line.substring(firstSpace + 1).toInt();
else if(_line.substring(0,firstSpace) == "REM"){} //nothing :/
else if(_line.substring(0,firstSpace) == "REPLAY") {
int replaynum = _line.substring(firstSpace + 1).toInt();
while(replaynum)
{
Line(last);
--replaynum;
}
} else{
String remain = _line;
while(remain.length() > 0){
int latest_space = remain.indexOf(" ");
if (latest_space == -1){
Press(remain);
remain = "";
}
else{
Press(remain.substring(0, latest_space));
remain = remain.substring(latest_space + 1);
}
delay(5);
}
}
Keyboard.releaseAll();
delay(defaultDelay);
}
void Press(String b){
if(b.length() == 1) Keyboard.press(char(b[0]));
else if (b.equals("ENTER")) Keyboard.press(KEY_RETURN);
else if (b.equals("CTRL")) Keyboard.press(KEY_LEFT_CTRL);
else if (b.equals("SHIFT")) Keyboard.press(KEY_LEFT_SHIFT);
else if (b.equals("ALT")) Keyboard.press(KEY_LEFT_ALT);
else if (b.equals("GUI")) Keyboard.press(KEY_LEFT_GUI);
else if (b.equals("UP") || b.equals("UPARROW")) Keyboard.press(KEY_UP_ARROW);
else if (b.equals("DOWN") || b.equals("DOWNARROW")) Keyboard.press(KEY_DOWN_ARROW);
else if (b.equals("LEFT") || b.equals("LEFTARROW")) Keyboard.press(KEY_LEFT_ARROW);
else if (b.equals("RIGHT") || b.equals("RIGHTARROW")) Keyboard.press(KEY_RIGHT_ARROW);
else if (b.equals("DELETE")) Keyboard.press(KEY_DELETE);
else if (b.equals("PAGEUP")) Keyboard.press(KEY_PAGE_UP);
else if (b.equals("PAGEDOWN")) Keyboard.press(KEY_PAGE_DOWN);
else if (b.equals("HOME")) Keyboard.press(KEY_HOME);
else if (b.equals("ESC")) Keyboard.press(KEY_ESC);
else if (b.equals("BACKSPACE")) Keyboard.press(KEY_BACKSPACE);
else if (b.equals("INSERT")) Keyboard.press(KEY_INSERT);
else if (b.equals("TAB")) Keyboard.press(KEY_TAB);
else if (b.equals("END")) Keyboard.press(KEY_END);
else if (b.equals("CAPSLOCK")) Keyboard.press(KEY_CAPS_LOCK);
else if (b.equals("F1")) Keyboard.press(KEY_F1);
else if (b.equals("F2")) Keyboard.press(KEY_F2);
else if (b.equals("F3")) Keyboard.press(KEY_F3);
else if (b.equals("F4")) Keyboard.press(KEY_F4);
else if (b.equals("F5")) Keyboard.press(KEY_F5);
else if (b.equals("F6")) Keyboard.press(KEY_F6);
else if (b.equals("F7")) Keyboard.press(KEY_F7);
else if (b.equals("F8")) Keyboard.press(KEY_F8);
else if (b.equals("F9")) Keyboard.press(KEY_F9);
else if (b.equals("F10")) Keyboard.press(KEY_F10);
else if (b.equals("F11")) Keyboard.press(KEY_F11);
else if (b.equals("F12")) Keyboard.press(KEY_F12);
else if (b.equals("SPACE")) Keyboard.press(' ');
//else Serial.println("not found :'"+b+"'("+String(b.length())+")");
}
void setup()
{
Serial.begin(115200);
//Serial1.begin(115200);
Keyboard.begin();
delay(2000);
pinMode(LED_BUILTIN, OUTPUT);
// Turn signal LED off
digitalWrite(LED_BUILTIN, LOW);
//Serial1.println("\n\nLogging keys...\n");
/*
for(int i=0;i<256;i++){
int key = parser._parse(i);
if(key == i){
Keyboard.print((String)i+" ");
Keyboard.write(i);
delay(200);
Keyboard.write(KEY_RETURN);
}
}*/
if(Usb.Init() == -1) Serial.println("OSC did not start.");
delay(200);
next_time = millis() + 5000;
HidKeyboard.SetReportParser(0, &parser);
}
void loop(){
Usb.Task();
if(Serial.available()) {
bufferStr = Serial.readStringUntil("END");
//Serial.println(bufferStr);
}
if(bufferStr.length() > 0){
bufferStr.replace("\r","\n");
bufferStr.replace("\n\n","\n");
while(bufferStr.length() > 0){
int latest_return = bufferStr.indexOf("\n");
if(latest_return == -1){
//Serial.println("run: "+bufferStr);
Line(bufferStr);
bufferStr = "";
} else{
//Serial.println("run: '"+bufferStr.substring(0, latest_return)+"'");
Line(bufferStr.substring(0, latest_return));
last=bufferStr.substring(0, latest_return);
bufferStr = bufferStr.substring(latest_return + 1);
}
}
bufferStr = "";
Serial.write(0x99);
//Serial.println("done");
}
}

View File

@@ -241,6 +241,24 @@ PROGMEM static const unsigned char menu_icons[][66] = {
0x54, 0x12, 0x1A, 0x54, 0xD0, 0x1F, 0x7C, 0xD2, 0x1B, 0x7C, 0x12, 0x1B,
0x38, 0xD2, 0x1B, 0x28, 0xD0, 0x1B, 0x01, 0xF8, 0x2F, 0x03, 0x00, 0x30,
0x1F, 0x00, 0x3E, 0x3F, 0x00, 0x3F, 0xFF, 0xC0, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, 0x3C, 0xDF, 0xFF, 0x3D, // ESP_UPDATE_ICO: 32
0x5F, 0x10, 0x3D, 0x5F, 0x55, 0x3D, 0x5F, 0x45, 0x3D, 0xDF, 0xFF, 0x3D,
0x7F, 0x00, 0x3F, 0x5F, 0x7F, 0x3D, 0x7F, 0x71, 0x3F, 0x5F, 0x77, 0x3D,
0x7F, 0x7F, 0x3F, 0x5F, 0x71, 0x3D, 0x7F, 0x75, 0x3F, 0x5F, 0x7F, 0x3D,
0x7F, 0x7F, 0x3F, 0x5F, 0x00, 0x3D, 0xFF, 0xFF, 0x3F, 0x5F, 0x55, 0x3D,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
{0xFF, 0xFF, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, // BAD_USB_ICO: 33
0xFF, 0xF3, 0x3F, 0xFF, 0x13, 0x3F, 0x7F, 0x13, 0x3F, 0x3F, 0x92, 0x3F,
0x3F, 0xB2, 0x3F, 0x7F, 0x93, 0x3F, 0x7F, 0xD3, 0x3F, 0x7F, 0xE3, 0x3F,
0x7F, 0xF2, 0x3F, 0xFF, 0xF0, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF3, 0x3F,
0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xE1, 0x3F, 0xFF, 0xE1, 0x3F,
0xFF, 0xE1, 0x3F, 0xFF, 0xF3, 0x3F},
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, // TEST_BAD_USB_ICO: 34
0xFF, 0xFF, 0x3F, 0xFF, 0xC1, 0x33, 0xFF, 0xBE, 0x3B, 0x7F, 0xFF, 0x3D,
0xBF, 0xFF, 0x3C, 0xDF, 0x7F, 0x3C, 0xDF, 0x3F, 0x3D, 0xEF, 0x9F, 0x3D,
0x1F, 0xCE, 0x3D, 0xDF, 0xE4, 0x3D, 0xBF, 0xF1, 0x3E, 0x7F, 0x7F, 0x3F,
0xFF, 0xBE, 0x3F, 0xFF, 0xC1, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
};

View File

@@ -16,6 +16,16 @@
#include <TFT_eSPI.h>
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 27
#define TFT_DC 26
#define TFT_RST 5
#define TFT_BL 32
#define TOUCH_CS 21
#define SD_CS 4
// WiFi stuff
#define OTA_UPDATE 100
#define SHOW_INFO 101
@@ -54,7 +64,7 @@
//#define MENU_FONT &FreeMonoBold9pt7b
//#define MENU_FONT &FreeSans9pt7b
//#define MENU_FONT &FreeSansBold9pt7b
#define BUTTON_ARRAY_LEN 7
#define BUTTON_ARRAY_LEN 8
#define STATUS_BAR_WIDTH 16
#define LVGL_TICK_PERIOD 6
@@ -98,7 +108,7 @@ class Display
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite img = TFT_eSprite(&tft);
TFT_eSPI_Button key[BUTTON_ARRAY_LEN];
const String PROGMEM version_number = "v0.8.0";
const String PROGMEM version_number = "v0.9.0";
bool printing = false;
bool loading = false;

View File

@@ -5,6 +5,7 @@ extern const unsigned char menu_icons[][66];
PROGMEM lv_obj_t * slider_label;
PROGMEM lv_obj_t * ta1;
PROGMEM lv_obj_t * ta2;
PROGMEM lv_obj_t * save_name;
MenuFunctions::MenuFunctions()
{
@@ -108,6 +109,52 @@ void MenuFunctions::deinitLVGL() {
//lv_deinit();
}
void MenuFunctions::writeBadUSB(){
// 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, write_bad_usb_keyboard_event_cb);
// Create one text area
// Store all SSIDs
ta1 = lv_textarea_create(lv_scr_act(), NULL);
lv_textarea_set_cursor_hidden(ta1, false);
lv_textarea_set_one_line(ta1, false);
lv_obj_set_width(ta1, LV_HOR_RES);
lv_obj_set_height(ta1, (LV_VER_RES / 2) - 35);
lv_obj_set_pos(ta1, 5, 20);
lv_textarea_set_cursor_hidden(ta1, true);
lv_obj_align(ta1, NULL, LV_ALIGN_IN_TOP_MID, NULL, NULL);
lv_textarea_set_text(ta1, "");
lv_textarea_set_placeholder_text(ta1, "Ducky script");
if (sd_obj.supported) {
// Create load button
lv_obj_t * label;
lv_obj_t * load_btn = lv_btn_create(lv_scr_act(), NULL);
lv_obj_set_event_cb(load_btn, load_btn_cb);
lv_obj_set_height(load_btn, 35);
lv_obj_set_width(load_btn, LV_HOR_RES / 3);
lv_obj_align(load_btn, ta1, LV_ALIGN_IN_TOP_RIGHT, NULL, (LV_VER_RES / 2) - 35); // align to text area
label = lv_label_create(load_btn, NULL);
lv_label_set_text(label, "Load");
// Create Save As button
lv_obj_t * label2;
lv_obj_t * save_as_btn = lv_btn_create(lv_scr_act(), NULL);
lv_obj_set_event_cb(save_as_btn, load_btn_cb);
lv_obj_set_height(save_as_btn, 35);
lv_obj_set_width(save_as_btn, LV_HOR_RES / 3);
lv_obj_align(save_as_btn, ta1, LV_ALIGN_IN_TOP_MID, NULL, (LV_VER_RES / 2) - 35); // align to text area
label2 = lv_label_create(save_as_btn, NULL);
lv_label_set_text(label2, "Save As");
}
// Focus it on one of the text areas to start
lv_keyboard_set_textarea(kb, ta1);
lv_keyboard_set_cursor_manage(kb, true);
}
void MenuFunctions::addSSIDGFX(){
extern LinkedList<ssid>* ssids;
@@ -188,6 +235,230 @@ void MenuFunctions::joinWiFiGFX(){
}
// Function to create keyboard for saving file name
void save_as_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event) {
extern MenuFunctions menu_function_obj;
lv_keyboard_def_event_cb(save_as_kb, event);
// User canceled so we will get rid of the keyboard and text box
if (event == LV_EVENT_CANCEL) {
lv_obj_del_async(save_as_kb);
lv_obj_del_async(save_name);
}
// Save content from ta1 to file name in save_name
else if(event == LV_EVENT_APPLY){
String display_string = "";
printf("LV_EVENT_APPLY\n");
// Get ducky script
String content = lv_textarea_get_text(ta1);
String target_file_name = "/SCRIPTS/" + (String)lv_textarea_get_text(save_name);
Serial.println("Writing to target file: " + (String)target_file_name);
// Open file with the given name
File script = SD.open(target_file_name, FILE_WRITE);
if (script) {
menu_function_obj.loaded_file = target_file_name;
Serial.println("Writing content: ");
Serial.println(content);
script.print(content);
script.close();
}
lv_obj_del_async(save_as_kb);
lv_obj_del_async(save_name);
// Create Save button
lv_obj_t * save_label;
lv_obj_t * save_btn = lv_btn_create(lv_scr_act(), NULL);
lv_obj_set_event_cb(save_btn, load_btn_cb);
lv_obj_set_height(save_btn, 35);
lv_obj_set_width(save_btn, LV_HOR_RES / 3);
lv_obj_align(save_btn, ta1, LV_ALIGN_IN_TOP_LEFT, NULL, (LV_VER_RES / 2) - 35); // align to text area
save_label = lv_label_create(save_btn, NULL);
lv_label_set_text(save_label, "Save");
}
}
void test_btn_cb(lv_obj_t * btn, lv_event_t event) {
extern MenuFunctions menu_function_obj;
if (event == LV_EVENT_CLICKED) {
String btn_text = lv_list_get_btn_text(btn);
String display_string = "";
//printf("Clicked: %s\n", btn_text);
Serial.print("Clicked: ");
Serial.println(btn_text);
// Get file content and send to text area
if (btn_text != "Cancel") {
File script = SD.open(btn_text);
if (script) {
while (script.available()) {
display_string.concat((char)script.read());
}
script.close();
Serial.println(display_string);
char buf[display_string.length() + 1] = {};
display_string.toCharArray(buf, display_string.length() + 1);
lv_textarea_set_text(ta1, buf);
// Create Save button
lv_obj_t * save_label;
lv_obj_t * save_btn = lv_btn_create(lv_scr_act(), NULL);
lv_obj_set_event_cb(save_btn, load_btn_cb);
lv_obj_set_height(save_btn, 35);
lv_obj_set_width(save_btn, LV_HOR_RES / 3);
lv_obj_align(save_btn, ta1, LV_ALIGN_IN_TOP_LEFT, NULL, (LV_VER_RES / 2) - 35); // align to text area
save_label = lv_label_create(save_btn, NULL);
lv_label_set_text(save_label, "Save");
}
}
// Delete the file list obj
lv_obj_del_async(lv_obj_get_parent(lv_obj_get_parent(btn)));
menu_function_obj.loaded_file = btn_text;
}
}
void load_btn_cb(lv_obj_t * load_btn, lv_event_t event) {
extern SDInterface sd_obj;
extern MenuFunctions menu_function_obj;
String btn_text = lv_list_get_btn_text(load_btn);
if (btn_text == "Load") {
if (event == LV_EVENT_CLICKED)
Serial.println("Load button pressed");
else if (event == LV_EVENT_RELEASED) {
Serial.println("Load button released");
/*Create a list*/
lv_obj_t * list1 = lv_list_create(lv_scr_act(), NULL);
lv_obj_set_size(list1, 160, 200);
lv_obj_set_width(list1, LV_HOR_RES);
lv_obj_align(list1, NULL, LV_ALIGN_CENTER, 0, 0);
//lv_list_set_anim_time(list1, 0);
// Load file names into buttons
File scripts = SD.open("/SCRIPTS");
// Build list of files from the SD card
lv_obj_t * list_btn;
while (true) {
File entity = scripts.openNextFile();
if (!entity)
break;
if (!entity.isDirectory()) {
String file_name = entity.name();
// Fancy button text time
char buf[file_name.length() + 1] = {};
file_name.toCharArray(buf, file_name.length() + 1);
list_btn = lv_list_add_btn(list1, LV_SYMBOL_FILE, buf);
lv_obj_set_event_cb(list_btn, test_btn_cb);
}
entity.close();
}
scripts.close();
list_btn = lv_list_add_btn(list1, LV_SYMBOL_CLOSE, "Cancel");
lv_obj_set_event_cb(list_btn, test_btn_cb);
}
}
// Save current text bod content to new file
else if (btn_text == "Save As") {
if (event == LV_EVENT_CLICKED)
Serial.println("Save button pressed");
else if (event == LV_EVENT_RELEASED) {
Serial.println("Save button released");
save_name = lv_textarea_create(lv_scr_act(), ta2);
lv_textarea_set_cursor_hidden(save_name, false);
lv_textarea_set_one_line(save_name, true);
lv_obj_align(save_name, NULL, LV_ALIGN_IN_TOP_MID, NULL, (LV_VER_RES / 2) - 35);
lv_textarea_set_text(save_name, "");
lv_textarea_set_placeholder_text(save_name, "File Name");
// Create a keyboard and apply the styles
save_as_kb = lv_keyboard_create(lv_scr_act(), NULL);
lv_obj_set_size(save_as_kb, LV_HOR_RES, LV_VER_RES / 2);
lv_obj_set_event_cb(save_as_kb, save_as_keyboard_event_cb);
lv_keyboard_set_textarea(save_as_kb, save_name);
lv_keyboard_set_cursor_manage(save_as_kb, true);
}
}
// Save current text box content to current loaded file
else if (btn_text == "Save") {
if (event == LV_EVENT_CLICKED)
Serial.println("Save button pressed");
else if (event == LV_EVENT_RELEASED) {
Serial.println("Save button released");
Serial.println("Writing to file: " + (String)menu_function_obj.loaded_file);
File script = SD.open(menu_function_obj.loaded_file, FILE_WRITE);
// Write data to file
if (script) {
String content = lv_textarea_get_text(ta1);
Serial.println("Writing content:");
Serial.println(content);
Serial.println("to file: " + (String)menu_function_obj.loaded_file);
script.print(lv_textarea_get_text(ta1));
script.close();
}
}
}
}
void write_bad_usb_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event) {
extern Display display_obj;
extern MenuFunctions menu_function_obj;
extern A32u4Interface a32u4_obj;
extern WiFiScan wifi_scan_obj;
lv_keyboard_def_event_cb(kb, event);
if(event == LV_EVENT_APPLY){
String display_string = "";
printf("LV_EVENT_APPLY\n");
String ta1_text = lv_textarea_get_text(ta1);
Serial.println(ta1_text);
a32u4_obj.runScript(ta1_text);
}
else if(event == LV_EVENT_CANCEL) {
printf("LV_EVENT_CANCEL\n");
menu_function_obj.deinitLVGL();
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
display_obj.exit_draw = true; // set everything back to normal
}
}
// Keyboard callback dedicated to joining wifi
void add_ssid_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event){
extern Display display_obj;
@@ -276,6 +547,7 @@ void MenuFunctions::main(uint32_t currentTime)
}
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
(wifi_scan_obj.currentScanMode == OTA_UPDATE) ||
(wifi_scan_obj.currentScanMode == ESP_UPDATE) ||
(wifi_scan_obj.currentScanMode == SHOW_INFO)) {
if (wifi_scan_obj.orient_display) {
this->orientDisplay();
@@ -334,6 +606,7 @@ void MenuFunctions::main(uint32_t currentTime)
if ((wifi_scan_obj.currentScanMode != WIFI_SCAN_OFF) &&
(pressed) &&
(wifi_scan_obj.currentScanMode != OTA_UPDATE) &&
(wifi_scan_obj.currentScanMode != ESP_UPDATE) &&
(wifi_scan_obj.currentScanMode != SHOW_INFO))
{
// Stop the current scan
@@ -684,6 +957,7 @@ void MenuFunctions::RunSetup()
// Main menu stuff
wifiMenu.list = new LinkedList<MenuNode>(); // Get list in second menu ready
bluetoothMenu.list = new LinkedList<MenuNode>(); // Get list in third menu ready
badusbMenu.list = new LinkedList<MenuNode>();
generalMenu.list = new LinkedList<MenuNode>();
deviceMenu.list = new LinkedList<MenuNode>();
@@ -691,18 +965,17 @@ void MenuFunctions::RunSetup()
failedUpdateMenu.list = new LinkedList<MenuNode>();
whichUpdateMenu.list = new LinkedList<MenuNode>();
confirmMenu.list = new LinkedList<MenuNode>();
espUpdateMenu.list = new LinkedList<MenuNode>();
updateMenu.list = new LinkedList<MenuNode>();
infoMenu.list = new LinkedList<MenuNode>();
// WiFi menu stuff
wifiSnifferMenu.list = new LinkedList<MenuNode>();
wifiScannerMenu.list = new LinkedList<MenuNode>();
wifiAttackMenu.list = new LinkedList<MenuNode>();
wifiGeneralMenu.list = new LinkedList<MenuNode>();
// Bluetooth menu stuff
bluetoothSnifferMenu.list = new LinkedList<MenuNode>();
bluetoothScannerMenu.list = new LinkedList<MenuNode>();
bluetoothGeneralMenu.list = new LinkedList<MenuNode>();
// Settings stuff
@@ -714,20 +987,20 @@ void MenuFunctions::RunSetup()
// Work menu names
mainMenu.name = " ESP32 Marauder ";
wifiMenu.name = " WiFi ";
badusbMenu.name = " Bad USB ";
deviceMenu.name = " Device ";
generalMenu.name = " General Apps ";
failedUpdateMenu.name = " Updating... ";
whichUpdateMenu.name = "Select Method ";
confirmMenu.name = " Confirm Update ";
espUpdateMenu.name = " ESP8266 Update ";
updateMenu.name = " Update Firmware ";
infoMenu.name = " Device Info ";
bluetoothMenu.name = " Bluetooth ";
wifiSnifferMenu.name = " WiFi Sniffers ";
wifiScannerMenu.name = " WiFi Scanners";
wifiAttackMenu.name = " WiFi Attacks ";
wifiGeneralMenu.name = " WiFi General ";
bluetoothSnifferMenu.name = " Bluetooth Sniffers ";
bluetoothScannerMenu.name = " Bluetooth Scanners ";
bluetoothGeneralMenu.name = " Bluetooth General ";
shutdownWiFiMenu.name = " Shutdown WiFi ";
shutdownBLEMenu.name = " Shutdown BLE ";
@@ -743,6 +1016,9 @@ void MenuFunctions::RunSetup()
addNodes(&mainMenu, "Bluetooth", TFT_CYAN, NULL, BLUETOOTH, [this]() {
changeMenu(&bluetoothMenu);
});
if (a32u4_obj.supported) addNodes(&mainMenu, "Bad USB", TFT_RED, NULL, BAD_USB_ICO, [this]() {
changeMenu(&badusbMenu);
});
addNodes(&mainMenu, "General Apps", TFT_MAGENTA, NULL, GENERAL_APPS, [this]() {
changeMenu(&generalMenu);
});
@@ -761,9 +1037,9 @@ void MenuFunctions::RunSetup()
addNodes(&wifiMenu, "Sniffers", TFT_YELLOW, NULL, SNIFFERS, [this]() {
changeMenu(&wifiSnifferMenu);
});
addNodes(&wifiMenu, "Scanners", TFT_ORANGE, NULL, SCANNERS, [this]() {
changeMenu(&wifiScannerMenu);
});
//addNodes(&wifiMenu, "Scanners", TFT_ORANGE, NULL, SCANNERS, [this]() {
// changeMenu(&wifiScannerMenu);
//});
addNodes(&wifiMenu, "Attacks", TFT_RED, NULL, ATTACKS, [this]() {
changeMenu(&wifiAttackMenu);
});
@@ -791,24 +1067,18 @@ void MenuFunctions::RunSetup()
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]() {
addNodes(&wifiSnifferMenu, "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]() {
addNodes(&wifiSnifferMenu, "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]() {
addNodes(&wifiSnifferMenu, "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]() {
addNodes(&wifiSnifferMenu, "Detect Espressif", TFT_ORANGE, NULL, ESPRESSIF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_ESPRESSIF, TFT_ORANGE);
@@ -892,9 +1162,9 @@ void MenuFunctions::RunSetup()
addNodes(&bluetoothMenu, "Sniffers", TFT_YELLOW, NULL, SNIFFERS, [this]() {
changeMenu(&bluetoothSnifferMenu);
});
addNodes(&bluetoothMenu, "Scanners", TFT_ORANGE, NULL, SCANNERS, [this]() {
changeMenu(&bluetoothScannerMenu);
});
//addNodes(&bluetoothMenu, "Scanners", TFT_ORANGE, NULL, SCANNERS, [this]() {
// changeMenu(&bluetoothScannerMenu);
//});
addNodes(&bluetoothMenu, "General", TFT_PURPLE, NULL, GENERAL_APPS, [this]() {
changeMenu(&bluetoothGeneralMenu);
});
@@ -909,18 +1179,18 @@ void MenuFunctions::RunSetup()
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]() {
addNodes(&bluetoothSnifferMenu, "Detect Card Skimmers", TFT_MAGENTA, NULL, CC_SKIMMERS, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);
});
// Build bluetooth scanner Menu
//bluetoothScannerMenu.parentMenu = &bluetoothMenu; // Second Menu is third menu parent
//addNodes(&bluetoothScannerMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this]() {
// changeMenu(bluetoothScannerMenu.parentMenu);
//});
// Build bluetooth general menu
bluetoothGeneralMenu.parentMenu = &bluetoothMenu;
addNodes(&bluetoothGeneralMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this]() {
@@ -937,6 +1207,21 @@ void MenuFunctions::RunSetup()
changeMenu(shutdownBLEMenu.parentMenu);
});
// Bad USB Menu
badusbMenu.parentMenu = &mainMenu;
addNodes(&badusbMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this]() {
changeMenu(badusbMenu.parentMenu);
});
addNodes(&badusbMenu, "Test BadUSB", TFT_PURPLE, NULL, TEST_BAD_USB_ICO, [this]() {
a32u4_obj.test();
});
addNodes(&badusbMenu, "Run Ducky Script", TFT_RED, NULL, BAD_USB_ICO, [this](){
display_obj.clearScreen();
wifi_scan_obj.currentScanMode = LV_ADD_SSID;
wifi_scan_obj.StartScan(LV_ADD_SSID, TFT_RED);
writeBadUSB();
});
// General apps menu
generalMenu.parentMenu = &mainMenu;
addNodes(&generalMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this]() {
@@ -979,6 +1264,19 @@ void MenuFunctions::RunSetup()
wifi_scan_obj.currentScanMode = OTA_UPDATE;
changeMenu(&confirmMenu);
});
addNodes(&whichUpdateMenu, "ESP8266 Update", TFT_RED, NULL, ESP_UPDATE_ICO, [this]() {
wifi_scan_obj.currentScanMode = ESP_UPDATE;
changeMenu(&espUpdateMenu);
esp_obj.RunUpdate();
});
// ESP Update Menu
espUpdateMenu.parentMenu = &whichUpdateMenu;
addNodes(&espUpdateMenu, "Back", TFT_LIGHTGREY, NULL, 0, [this]() {
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
esp_obj.bootRunMode();
changeMenu(espUpdateMenu.parentMenu);
});
// Confirm SD update menu
confirmMenu.parentMenu = &whichUpdateMenu;

View File

@@ -8,6 +8,8 @@
#include "BatteryInterface.h"
#include "SDInterface.h"
#include "Web.h"
#include "esp_interface.h"
#include "a32u4_interface.h"
extern Display display_obj;
@@ -15,6 +17,8 @@ extern WiFiScan wifi_scan_obj;
extern Web web_obj;
extern SDInterface sd_obj;
extern BatteryInterface battery_obj;
extern EspInterface esp_obj;
extern A32u4Interface a32u4_obj;
// Keypad start position, key sizes and spacing
#define KEY_X 120 // Centre of key
@@ -70,6 +74,9 @@ extern BatteryInterface battery_obj;
#define CLEAR_ICO 29
#define KEYBOARD_ICO 30
#define JOIN_WIFI 31
#define ESP_UPDATE_ICO 32
#define BAD_USB_ICO 33
#define TEST_BAD_USB_ICO 34
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);
@@ -80,9 +87,14 @@ 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 join_wifi_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
PROGMEM static void add_ssid_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
PROGMEM static void write_bad_usb_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
PROGMEM static void load_btn_cb(lv_obj_t * load_btn, lv_event_t event);
PROGMEM static void test_btn_cb(lv_obj_t * load_btn, lv_event_t event);
PROGMEM static void save_as_keyboard_event_cb(lv_obj_t * keyboard, lv_event_t event);
// lvgl stuff
PROGMEM static lv_obj_t *kb;
PROGMEM static lv_obj_t * save_as_kb;
struct Menu;
@@ -120,6 +132,7 @@ class MenuFunctions
Menu wifiMenu;
Menu bluetoothMenu;
Menu badusbMenu;
Menu generalMenu;
Menu deviceMenu;
@@ -127,18 +140,17 @@ class MenuFunctions
Menu whichUpdateMenu;
Menu failedUpdateMenu;
Menu confirmMenu;
Menu espUpdateMenu;
Menu updateMenu;
Menu infoMenu;
// WiFi menu stuff
Menu wifiSnifferMenu;
Menu wifiScannerMenu;
Menu wifiAttackMenu;
Menu wifiGeneralMenu;
// Bluetooth menu stuff
Menu bluetoothSnifferMenu;
Menu bluetoothScannerMenu;
Menu bluetoothGeneralMenu;
// Settings things menus
@@ -170,10 +182,13 @@ class MenuFunctions
uint16_t x = -1, y = -1;
boolean pressed = false;
String loaded_file = "";
void initLVGL();
void deinitLVGL();
void joinWiFiGFX();
void addSSIDGFX();
void writeBadUSB();
void buildButtons(Menu* menu);
void changeMenu(Menu* menu);

View File

@@ -51,6 +51,14 @@ bool SDInterface::initSD() {
//if (this->supported)
// buffer_obj.open(&SD);
// Check for SCRIPTS folder
if (!SD.exists("/SCRIPTS")) {
Serial.println("/SCRIPTS does not exist. Creating...");
SD.mkdir("/SCRIPTS");
Serial.println("/SCRIPTS created");
}
return true;
}

View File

@@ -28,6 +28,7 @@
#define OTA_UPDATE 100
#define SHOW_INFO 101
#define ESP_UPDATE 102
#define WIFI_SCAN_OFF 0
#define WIFI_SCAN_PROBE 1
#define WIFI_SCAN_AP 2

View File

@@ -0,0 +1,66 @@
#include "a32u4_interface.h"
HardwareSerial MySerial_two(2);
void A32u4Interface::begin() {
MySerial_two.begin(BAUD32U4, SERIAL_8N1, 25, 4);
delay(2000);
Serial.println("Setup A32U4 Serial Interface");
MySerial_two.println("DELAY 1");
delay(1000);
uint8_t a32u4_rep = 0;
if (MySerial_two.available()) {
a32u4_rep = (uint8_t)MySerial_two.read();
}
//display_string.trim();
//Serial.println("\nDisplay string: " + (String)display_string);
if (a32u4_rep != 0) {
this->supported = true;
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.tft.println("ATmega32U4 Found!");
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
}
else {
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
display_obj.tft.println("ATmega32U4 Not Found");
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
Serial.print("A32U4 Said: ");
Serial.println(a32u4_rep);
}
this->initTime = millis();
}
void A32u4Interface::runScript(String script) {
MySerial_two.println(script);
}
void A32u4Interface::test() {
MySerial_two.println("STRING Hello, World!");
}
void A32u4Interface::main(uint32_t current_time) {
if (current_time - this->initTime >= 1000) {
this->initTime = millis();
//MySerial_two.write("PING");
//delay(1);
if (MySerial_two.available()) {
Serial.println("Got A32U4 Serial data");
Serial.println(MySerial_two.read());
}
}
//delay(1);*/
}

View File

@@ -0,0 +1,24 @@
#ifndef a32u4_interface_h
#define a32u4_interface_h
#include "Display.h"
#include <HardwareSerial.h>
#define BAUD32U4 115200
extern Display display_obj;
class A32u4Interface {
public:
bool supported = false;
uint32_t initTime;
void begin();
void main(uint32_t current_time);
void test();
void runScript(String script);
};
#endif

View File

@@ -26,6 +26,8 @@ https://www.online-utility.org/image/convert/to/XBM
#include "BatteryInterface.h"
#include "TemperatureInterface.h"
#include "LedInterface.h"
#include "esp_interface.h"
#include "a32u4_interface.h"
//#include "icons.h"
/*
@@ -48,6 +50,8 @@ Buffer buffer_obj;
BatteryInterface battery_obj;
TemperatureInterface temp_obj;
LedInterface led_obj;
EspInterface esp_obj;
A32u4Interface a32u4_obj;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(Pixels, PIN, NEO_GRB + NEO_KHZ800);
@@ -69,11 +73,30 @@ void setup()
Serial.begin(115200);
Serial.begin(115200);
//Serial.begin(115200);
display_obj.RunSetup();
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
digitalWrite(TFT_BL, LOW);
// Draw the title screen
display_obj.drawJpeg("/marauder3L.jpg", 0 , 0); // 240 x 320 image
//showCenterText(version_number, 250);
display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2);
digitalWrite(TFT_BL, HIGH); // Need this
delay(2000);
display_obj.clearScreen();
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
digitalWrite(TFT_BL, HIGH);
display_obj.tft.println("Giving room for HardwareSerial...");
delay(2000);
display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
@@ -142,12 +165,14 @@ void setup()
display_obj.tft.println(F("Initialized LED Interface"));
display_obj.tft.println(F("Starting..."));
//display_obj.tft.println(F("Starting..."));
delay(1000);
delay(500);
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
//display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
// OG Logo Section
/*
digitalWrite(TFT_BL, LOW);
// Draw the title screen
@@ -157,8 +182,17 @@ void setup()
display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2);
digitalWrite(TFT_BL, HIGH);
*/
delay(5000);
esp_obj.begin();
a32u4_obj.begin(); // This goes last to make sure nothing is messed up when reading serial
display_obj.tft.println(F("Starting..."));
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
delay(2000);
menu_function_obj.RunSetup();
}
@@ -173,13 +207,15 @@ void loop()
// Update all of our objects
//if ((!display_obj.draw_tft) &&
// (wifi_scan_obj.currentScanMode != OTA_UPDATE))
if (!display_obj.draw_tft)
if ((!display_obj.draw_tft) && (wifi_scan_obj.currentScanMode != ESP_UPDATE))
{
display_obj.main(wifi_scan_obj.currentScanMode);
display_obj.main(wifi_scan_obj.currentScanMode);
wifi_scan_obj.main(currentTime);
sd_obj.main();
battery_obj.main(currentTime);
temp_obj.main(currentTime);
esp_obj.main(currentTime);
a32u4_obj.main(currentTime);
//led_obj.main(currentTime);
//if ((wifi_scan_obj.currentScanMode != WIFI_ATTACK_BEACON_SPAM))
if ((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) &&
@@ -194,6 +230,12 @@ void loop()
{
display_obj.drawStylus();
}
else if (wifi_scan_obj.currentScanMode == ESP_UPDATE) {
display_obj.main(wifi_scan_obj.currentScanMode);
menu_function_obj.main(currentTime);
esp_obj.program();
delay(1);
}
//else
//{
// web_obj.main();

View File

@@ -0,0 +1,126 @@
#include "esp_interface.h"
HardwareSerial MySerial(1);
void EspInterface::begin() {
pinMode(ESP_RST, OUTPUT);
pinMode(ESP_ZERO, OUTPUT);
delay(100);
digitalWrite(ESP_ZERO, HIGH);
Serial.println("Checking for ESP8266...");
MySerial.begin(BAUD, SERIAL_8N1, 27, 26);
delay(100);
display_obj.tft.println("Checking for ESP8266...");
this->bootRunMode();
delay(500);
while (MySerial.available())
MySerial.read();
MySerial.write("PING");
delay(2000);
String display_string = "";
while (MySerial.available()) {
display_string.concat((char)MySerial.read());
}
display_string.trim();
Serial.println("\nDisplay string: " + (String)display_string);
if (display_string == "ESP8266 Pong") {
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.tft.println("ESP8266 Found!");
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
Serial.println("ESP8266 Found!");
this->supported = true;
}
else {
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
display_obj.tft.println("ESP8266 Not Found");
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
}
this->initTime = millis();
}
void EspInterface::RunUpdate() {
this->bootProgramMode();
display_obj.tft.setTextWrap(true);
display_obj.tft.setFreeFont(NULL);
display_obj.tft.setCursor(0, 100);
display_obj.tft.setTextSize(1);
display_obj.tft.setTextColor(TFT_GREEN);
display_obj.tft.println("Waiting for serial data...");
display_obj.tft.setTextColor(TFT_WHITE);
}
void EspInterface::bootProgramMode() {
Serial.println("[!] Setting ESP12 in program mode...");
digitalWrite(ESP_ZERO, LOW);
delay(100);
digitalWrite(ESP_RST, LOW);
delay(100);
digitalWrite(ESP_RST, HIGH);
delay(100);
digitalWrite(ESP_ZERO, HIGH);
Serial.println("[!] Complete");
Serial.end();
Serial.begin(57600);
}
void EspInterface::bootRunMode() {
Serial.end();
Serial.begin(115200);
Serial.println("[!] Setting ESP12 in run mode...");
digitalWrite(ESP_ZERO, HIGH);
delay(100);
digitalWrite(ESP_RST, LOW);
delay(100);
digitalWrite(ESP_RST, HIGH);
delay(100);
digitalWrite(ESP_ZERO, HIGH);
Serial.println("[!] Complete");
}
void EspInterface::program() {
if (MySerial.available()) {
Serial.write((uint8_t)MySerial.read());
}
if (Serial.available()) {
display_obj.tft.print(".");
while (Serial.available()) {
MySerial.write((uint8_t)Serial.read());
}
}
}
void EspInterface::main(uint32_t current_time) {
if (current_time - this->initTime >= 1000) {
this->initTime = millis();
//MySerial.write("PING");
}
while (MySerial.available()) {
Serial.print((char)MySerial.read());
}
if (Serial.available()) {
MySerial.write((uint8_t)Serial.read());
}
}

View File

@@ -0,0 +1,28 @@
#ifndef esp_interface_h
#define esp_interface_h
#include "Display.h"
#include <HardwareSerial.h>
#define ESP_RST 14
#define ESP_ZERO 13
#define BAUD 115200
extern Display display_obj;
class EspInterface {
public:
bool supported = false;
uint32_t initTime;
void RunUpdate();
void bootProgramMode();
void bootRunMode();
void begin();
void program();
void main(uint32_t current_time);
};
#endif

View File

@@ -0,0 +1,37 @@
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(115200);
delay(100);
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
}
// the loop function runs over and over again forever
void loop() {
//digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
//delay(1000); // wait for a second
//digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
//delay(1000); // wait for a second
if (Serial.available()) {
String input = Serial.readString();
input.trim();
if (input == "PING") {
Serial.println("ESP8266 Pong");
digitalWrite(LED_BUILTIN, LOW);
delay(1);
digitalWrite(LED_BUILTIN, HIGH);
}
//Serial.println(input);
}
else
delay(1);
}

240
old_README.md Normal file
View File

@@ -0,0 +1,240 @@
<!---[![License: MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/justcallmekoko/ESP32Marauder/blob/master/LICENSE)--->
<!---[![Gitter](https://badges.gitter.im/justcallmekoko/ESP32Marauder.png)](https://gitter.im/justcallmekoko/ESP32Marauder)--->
<!---[![Build Status](https://travis-ci.com/justcallmekoko/ESP32Marauder.svg?branch=master)](https://travis-ci.com/justcallmekoko/ESP32Marauder)--->
<!---Shields/Badges https://shields.io/--->
# ESP32 Marauder v0.8.0
<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>
<br>
<a href="https://www.twitch.tv/willstunforfood"><img src="https://assets.stickpng.com/images/580b57fcd9996e24bc43c540.png" alt="Twitch WillStunForFood" width="200"></a>
</p>
Catch my live stream on [Twitch](https://www.twitch.tv/willstunforfood) where I play games, have just chatting sessions to talk tech, and just generally be an ordinary person who can't figure out how to make proper life decisions.
Stream Schedule:
Mon: 1800 - 2000 EST
Wed: 1800 - 2000 EST
Sun: 1200 - 1400 EST
[![HitCount](http://hits.dwyl.io/justcallmekoko/badges.svg)](http://hits.dwyl.io/justcallmekoko/badges)
[![Build Status](https://travis-ci.com/justcallmekoko/ESP32Marauder.svg?branch=master)](https://travis-ci.com/justcallmekoko/ESP32Marauder)
# Table Of Condensation
- [About](#about)
- [YouTube](#youtube)
- [Hackster Article](#hackster-article)
- [Capabilities](#capabilities)
- [Do It Yourself](#do-it-yourself)
- [Hardware](#hardware)
- [Connections](#connections)
- [Flashing Firmware](#flashing-firmware)
- [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 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. 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
<p align="left"><a href="https://www.youtube.com/watch?v=BGFO1wA29o8"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/esp32marauder_thumbnail.jpg" width="500"></a></p>
### Hackster Article
You can check out the marauder article written [here](https://www.hackster.io/news/esp32-marauder-puts-a-bluetooth-wi-fi-pen-testing-toolkit-in-your-pocket-32d389f6e66f) as well as other interesting engineering projects.
## Capabilities
### Current
- Join WiFi: Just join a WiFi network
- Shutdown WiFi: Shutdown the Marauder WiFi interface to save some RAM
- Generate SSIDs: Add 20 random SSIDs to your list of SSIDs
- Add SSID: Use an on-screen keyboard to add your own SSIDs to the SSID list
- Clear SSIDs: Clear the list of SSIDs
- Probe Request Sniff: Sniff for WiFi [probe request frames](https://mrncciew.com/2014/10/27/cwap-802-11-probe-requestresponse/) sent by wireless devices
- Beacon Sniff: Sniff [beacon frames](https://en.wikipedia.org/wiki/Beacon_frame) sent by wireless acccess points
- Beacon Spam List: Spam a list of SSIDs and monitoring connection attempts to those networks
- Beacon Spam Random: Spam hundreds of random beacon frames to wireless devices within range
- Rick Roll Beacon: Broadcast the rick roll lyrics as WiFi access points
- Bluetooth Sniffer: Sniff bluetooth devices within range
- Shutdown BLE: Shutdown the Marauder BLE interface to save RAM
- Detect Card Skimmers: Detect bluetooth enabled credit card skimmers
- Packet Monitor: Show WiFi packet density on a given channel using a time bar graph
- EAPOL/PMKID Scan: Capture EAPOL/PMKID frames
- Detect Pwnagotchi: Detect any pwnagotchis in range
- Detect Espressif: Detect any espressif devices in range
- Deauth Sniff: Detect deauthentication packets sent on all channels
- Draw: Just doodle on the screen or whatever
- 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:
- Any ESP32 Development Board
- 2.8" TFT Touch Screen w/ ili9341
- Jumper Wires
- Breadboard
### 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)
| 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 |
For the analog battery circuit, use a 4 to 1 voltage divider, and (optional) a mosfet.
For the charge detection circuit, use a 1 to 2 voltage divider (the charge detection is optional and only changes the battery icon colour while charging)
| BATTERY | ESP32 |
| ------- | ------ |
| BAT + | GPIO34 |
| MOSFET | GPIO13 |
| CHARGE +| GPIO27 |
## Flashing Firmware
### Using Arduino IDE
1. Install the [Arduino IDE](https://www.arduino.cc/en/main/software)
2. In the Arduino IDE, go to `File`>`Preferences`
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`
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
<!---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
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`
10.5. If you're using the analog battery measuring circuit, go to the MenuFunctions.h and change "#define BATTERY_ANALOG_ON" to 1
11. Plug your ESP32 into a USB port and select the COM port under `Tools`>`Port`
12. Select `LOLIN D32` under `Tools`>`Boards`
12.5 If you want an upscaled version of the logo, go to the data folder and rename "marauder3L1.jpg" to "marauder3L.jpg"
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
# Icons
I put these here just because
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/attack_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/beacon_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/beacon_spam_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/bluetooth_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/bluetooth_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/deauth_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/device_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/device_info_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/draw_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/eapol_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/espressif_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/general_apps_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/monitor_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/probe_sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/pwnagotchi_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/reboot_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/rick_roll_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/scan_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/sd_update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/skimmer_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/sniff_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/web_update_22.bmp">
<img alt="Marauder logo" src="https://raw.githubusercontent.com/justcallmekoko/ESP32Marauder/master/pictures/icons/wifi_22.bmp">
# 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.
# 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/)

BIN
pictures/IMG_1838.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
pictures/IMG_1840.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
pictures/IMG_1841.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
pictures/IMG_1842.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
pictures/IMG_1844.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
pictures/IMG_1845.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

BIN
pictures/IMG_1848.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
pictures/IMG_1849.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
pictures/IMG_1851.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
pictures/IMG_1852.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
pictures/IMG_1853.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
pictures/icons/badusb.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

9
pictures/xbm/badusb.XBM Normal file
View File

@@ -0,0 +1,9 @@
#define 1617929519824_width 22
#define 1617929519824_height 22
static char 1617929519824_bits[] = {
0xFF, 0xFF, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F,
0xFF, 0xF3, 0x3F, 0xFF, 0x13, 0x3F, 0x7F, 0x13, 0x3F, 0x3F, 0x92, 0x3F,
0x3F, 0xB2, 0x3F, 0x7F, 0x93, 0x3F, 0x7F, 0xD3, 0x3F, 0x7F, 0xE3, 0x3F,
0x7F, 0xF2, 0x3F, 0xFF, 0xF0, 0x3F, 0xFF, 0xF1, 0x3F, 0xFF, 0xF3, 0x3F,
0xFF, 0xF3, 0x3F, 0xFF, 0xF3, 0x3F, 0xFF, 0xE1, 0x3F, 0xFF, 0xE1, 0x3F,
0xFF, 0xE1, 0x3F, 0xFF, 0xF3, 0x3F, };

View File

@@ -0,0 +1,9 @@
#define 1617929836316_width 22
#define 1617929836316_height 22
static char 1617929836316_bits[] = {
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xC1, 0x33, 0xFF, 0xBE, 0x3B, 0x7F, 0xFF, 0x3D,
0xBF, 0xFF, 0x3C, 0xDF, 0x7F, 0x3C, 0xDF, 0x3F, 0x3D, 0xEF, 0x9F, 0x3D,
0x1F, 0xCE, 0x3D, 0xDF, 0xE4, 0x3D, 0xBF, 0xF1, 0x3E, 0x7F, 0x7F, 0x3F,
0xFF, 0xBE, 0x3F, 0xFF, 0xC1, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, };

94
release_countdown.html Normal file
View File

@@ -0,0 +1,94 @@
<!DOCTYPE HTML>
<html>
<head>
<title>ESP32 Marauder Release</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
q {
position: absolute;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
p {
position: absolute;
top: 56%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
font-size: 30px;
color: white;
font-family: courier new;
padding-top: 10px;
}
body {
background-color: black;
}
.countdown {
padding-top: 5%;
}
</style>
</head>
<body>
<div>
<q>
<a href="https://www.tindie.com/products/justcallmekoko/esp32-marauder/"><img src="https://github.com/justcallmekoko/ESP32Marauder/raw/master/pictures/marauder3L.jpg?raw=true" alt="marauder">
</q>
</div>
<div>
<p class="countdown" id="demo"></p>
<script>
// Set the date we're counting down to
var countDownDate = new Date("Jun 1, 2021 15:00:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("demo").innerHTML = days + "d " + hours + "h "
+ minutes + "m " + seconds + "s ";
document.title = days + "d " + hours + "h "
+ minutes + "m " + seconds + "s ";
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML = "EXPIRED";
}
}, 1000);
</script>
</div>
</body>
</html>