Add detect espressif devices

This commit is contained in:
Just Call Me Koko
2020-07-02 19:05:06 -04:00
parent e79db36906
commit 1a4136137d
11 changed files with 447 additions and 9 deletions

View File

@@ -3,6 +3,56 @@
#define jquery_min_js_v3_2_1_gz_len 30178
PROGMEM static String espressif_macs[] = {
"fc:f5:c4",
"f4:cf:a2",
"f0:08:d1",
"ec:fa:bc",
"e0:98:06",
"dc:4f:22",
"d8:f1:5b",
"d8:bf:c0",
"d8:a0:1d",
"cc:50:e3",
"c8:2b:96",
"c4:4f:33",
"bc:dd:c2",
"b8:f0:09",
"b4:e6:2d",
"ac:d0:74",
"ac:67:b2",
"a4:cf:12",
"a4:7b:9d",
"a0:20:a6",
"98:f4:ab",
"90:97:d5",
"8c:aa:b5",
"84:f3:eb",
"84:cc:a8",
"84:0d:8e",
"80:7d:3a",
"7c:df:a1",
"7c:9e:bd",
"70:03:9f",
"68:c6:3a",
"60:01:94",
"5c:cf:7f",
"54:5a:a6",
"50:02:91",
"4c:11:ae",
"48:3f:da",
"40:f5:20",
"3c:71:bf",
"30:ae:a4",
"2c:f4:32",
"2c:3a:e8",
"24:b2:de",
"24:6f:28",
"24:62:ab",
"24:0a:c4",
"18:fe:34",
"10:52:1c"
};
PROGMEM static const unsigned char menu_icons[][66] = {
@@ -143,7 +193,19 @@ PROGMEM static const unsigned char menu_icons[][66] = {
0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0xFF, 0xFF},
{0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x07, 0xF8, 0x07, 0xF0, 0x07, 0xE0, // SD: 23
0x67, 0xE7, 0x97, 0xE9, 0x17, 0xE9, 0x67, 0xE9, 0x87, 0xE9, 0x97, 0xE9,
0x67, 0xE7, 0x07, 0xE0, 0x07, 0xE0, 0xFF, 0xFF}
0x67, 0xE7, 0x07, 0xE0, 0x07, 0xE0, 0xFF, 0xFF},
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x7F, 0x80, 0x3F, 0xBF, 0x7F, 0x3F, // PWNAGOTCHI: 24
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},
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xC7, 0x3F, 0x7F, 0x0E, 0x3F, // ESPRESSIF: 25
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}
};

View File

@@ -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()
{
}
@@ -64,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
@@ -686,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

View File

@@ -8,6 +8,8 @@
//#include <SimpleList.h>
#include <LinkedList.h>
#include <SPI.h>
#include <lvgl.h>
#include <Ticker.h>
#include "SPIFFS.h"
#include "Assets.h"
@@ -33,9 +35,21 @@
//#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
{
@@ -53,13 +67,15 @@ 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.6.7";
String version_number = "v0.6.8";
bool printing = false;
bool loading = false;
@@ -94,6 +110,9 @@ class Display
// 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();

View File

@@ -71,6 +71,7 @@ void MenuFunctions::main(uint32_t currentTime)
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_AP) ||
(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) ||
@@ -179,6 +180,12 @@ void MenuFunctions::updateStatusBar()
}
display_obj.tft.setTextColor(TFT_WHITE, STATUSBAR_COLOR);
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(75, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
display_obj.tft.drawString("CH: " + (String)wifi_scan_obj.set_channel, 75, 0, 2);
}
// Draw battery info
if (battery_obj.i2c_supported)
{
@@ -245,6 +252,10 @@ void MenuFunctions::drawStatusBar()
display_obj.tft.drawString((String)temp_obj.current_temp + " C", 4, 0, 2);
display_obj.tft.setTextColor(TFT_WHITE, STATUSBAR_COLOR);
wifi_scan_obj.old_channel = wifi_scan_obj.set_channel;
display_obj.tft.fillRect(75, 0, 50, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
display_obj.tft.drawString("CH: " + (String)wifi_scan_obj.set_channel, 75, 0, 2);
// Draw battery info
if (battery_obj.i2c_supported)
{
@@ -381,8 +392,8 @@ void MenuFunctions::RunSetup()
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, BEACON_SNIFF, [this](){display_obj.clearScreen(); this->drawStatusBar(); wifi_scan_obj.StartScan(WIFI_SCAN_PWN, TFT_RED);});
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
@@ -417,6 +428,7 @@ void MenuFunctions::RunSetup()
//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;

View File

@@ -53,6 +53,8 @@ extern BatteryInterface battery_obj;
#define EAPOL 21
#define STATUS_BAT 22
#define STATUS_SD 23
#define PWNAGOTCHI 24
#define ESPRESSIF 25
struct Menu;
@@ -71,7 +73,7 @@ struct Menu {
String name;
LinkedList<MenuNode>* list;
Menu * parentMenu;
uint8_t selected;
//uint8_t selected;
};

View File

@@ -146,6 +146,10 @@ void WiFiScan::StartScan(uint8_t scan_mode, uint16_t color)
RunBluetoothScan(scan_mode, color);
else if (scan_mode == BT_SCAN_SKIMMERS)
RunBluetoothScan(scan_mode, color);
else if (scan_mode == WIFI_SCAN_ESPRESSIF)
RunEspressifScan(scan_mode, color);
//else if (scan_mode == LV_JOIN_WIFI)
// RunLvJoinWiFi(scan_mode, color);
WiFiScan::currentScanMode = scan_mode;
}
@@ -156,6 +160,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
if ((currentScanMode == WIFI_SCAN_PROBE) ||
(currentScanMode == WIFI_SCAN_AP) ||
(currentScanMode == WIFI_SCAN_PWN) ||
(currentScanMode == WIFI_SCAN_ESPRESSIF) ||
(currentScanMode == WIFI_SCAN_EAPOL) ||
(currentScanMode == WIFI_SCAN_ALL) ||
(currentScanMode == WIFI_SCAN_DEAUTH) ||
@@ -254,6 +259,28 @@ String WiFiScan::freeRAM()
return String(s);
}
/*
void WiFiScan::RunLvJoinWiFi(uint8_t scan_mode, uint16_t color) {
display_obj.tft.init();
display_obj.tft.setRotation(1);
#ifdef TFT_SHIELD
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
Serial.println("Using TFT Shield");
#else if defined(TFT_DIY)
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
Serial.println("Using TFT DIY");
#endif
display_obj.tft.setTouch(calData);
display_obj.initLVGL();
lv_obj_t * scr = lv_cont_create(NULL, NULL);
lv_disp_load_scr(scr);
display_obj.joinWiFiGFX();
}*/
void WiFiScan::RunInfo()
{
@@ -301,6 +328,34 @@ void WiFiScan::RunInfo()
display_obj.tft.println("Internal temp: " + (String)temp_obj.current_temp + " C");
}
void WiFiScan::RunEspressifScan(uint8_t scan_mode, uint16_t color) {
sd_obj.openCapture("espressif");
display_obj.TOP_FIXED_AREA_2 = 48;
display_obj.tteBar = true;
display_obj.print_delay_1 = 15;
display_obj.print_delay_2 = 10;
//display_obj.clearScreen();
display_obj.initScrollValues(true);
display_obj.tft.setTextWrap(false);
display_obj.tft.setTextColor(TFT_WHITE, color);
display_obj.tft.fillRect(0,16,240,16, color);
display_obj.tft.drawCentreString(" Detect Espressif ",120,16,2);
display_obj.touchToExit();
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&cfg);
esp_wifi_set_storage(WIFI_STORAGE_RAM);
esp_wifi_set_mode(WIFI_MODE_NULL);
esp_wifi_start();
esp_wifi_set_promiscuous(true);
esp_wifi_set_promiscuous_filter(&filt);
esp_wifi_set_promiscuous_rx_cb(&espressifSnifferCallback);
esp_wifi_set_channel(set_channel, WIFI_SECOND_CHAN_NONE);
initTime = millis();
}
void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
{
display_obj.tft.init();
@@ -645,6 +700,82 @@ void WiFiScan::getMAC(char *addr, uint8_t* data, uint16_t offset) {
sprintf(addr, "%02x:%02x:%02x:%02x:%02x:%02x", data[offset+0], data[offset+1], data[offset+2], data[offset+3], data[offset+4], data[offset+5]);
}
void WiFiScan::espressifSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
{
wifi_promiscuous_pkt_t *snifferPacket = (wifi_promiscuous_pkt_t*)buf;
WifiMgmtHdr *frameControl = (WifiMgmtHdr*)snifferPacket->payload;
wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
int len = snifferPacket->rx_ctrl.sig_len;
String display_string = "";
String src_addr_string = "";
if (type == WIFI_PKT_MGMT)
{
len -= 4;
}
int fctl = ntohs(frameControl->fctl);
const wifi_ieee80211_packet_t *ipkt = (wifi_ieee80211_packet_t *)snifferPacket->payload;
const WifiMgmtHdr *hdr = &ipkt->hdr;
// If we dont the buffer size is not 0, don't write or else we get CORRUPT_HEAP
//if ((snifferPacket->payload[0] == 0x80) && (display_obj.display_buffer->size() == 0))
//{
char addr[] = "00:00:00:00:00:00";
getMAC(addr, snifferPacket->payload, 10);
src_addr_string.concat(addr);
bool match = false;
for (int i = 0; i < (sizeof(espressif_macs) / sizeof(espressif_macs[0])); i++) {
if (src_addr_string.startsWith(espressif_macs[i])) {
match = true;
break;
}
}
if (!match)
return;
delay(random(0, 10));
Serial.print("RSSI: ");
Serial.print(snifferPacket->rx_ctrl.rssi);
Serial.print(" Ch: ");
Serial.print(snifferPacket->rx_ctrl.channel);
Serial.print(" BSSID: ");
Serial.print(addr);
//display_string.concat(" RSSI: ");
//display_string.concat(snifferPacket->rx_ctrl.rssi);
display_string.concat("CH: " + (String)snifferPacket->rx_ctrl.channel);
//display_string.concat(" ");
display_string.concat(" -> ");
display_string.concat(addr);
for (int i = 0; i < 19 - snifferPacket->payload[37]; i++)
{
display_string.concat(" ");
}
Serial.print(" ");
//if (display_obj.display_buffer->size() == 0)
//{
display_obj.loading = true;
display_obj.display_buffer->add(display_string);
display_obj.loading = false;
//}
Serial.println();
sd_obj.addPacket(snifferPacket->payload, len);
//}
}
void WiFiScan::pwnSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
{
wifi_promiscuous_pkt_t *snifferPacket = (wifi_promiscuous_pkt_t*)buf;
@@ -1659,6 +1790,7 @@ void WiFiScan::main(uint32_t currentTime)
if ((currentScanMode == WIFI_SCAN_PROBE) ||
(currentScanMode == WIFI_SCAN_AP) ||
(currentScanMode == WIFI_SCAN_PWN) ||
(currentScanMode == WIFI_SCAN_ESPRESSIF) ||
(currentScanMode == WIFI_SCAN_DEAUTH) ||
(currentScanMode == WIFI_SCAN_ALL))
{
@@ -1729,4 +1861,6 @@ void WiFiScan::main(uint32_t currentTime)
packets_sent = 0;
}
}
//else if (currentScanMode == LV_JOIN_WIFI)
// lv_task_handler();
}

View File

@@ -17,6 +17,7 @@
#include "Buffer.h"
#include "BatteryInterface.h"
#include "TemperatureInterface.h"
#include "Assets.h"
//#include "MenuFunctions.h"
#define bad_list_length 3
@@ -35,6 +36,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
@@ -70,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] = {
@@ -133,6 +136,7 @@ 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);
@@ -140,11 +144,16 @@ class WiFiScan
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;
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
@@ -160,6 +169,7 @@ 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);

View File

@@ -55,7 +55,6 @@ uint32_t currentTime = 0;
void setup()
{
pinMode(FLASH_BUTTON, INPUT);
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, LOW);
@@ -75,8 +74,7 @@ void setup()
//Serial.println("Internal Temp: " + (String)((temprature_sens_read() - 32) / 1.8));
// Do some LED stuff
led_obj.RunSetup();
Serial.println(wifi_scan_obj.freeRAM());
// Do some SD stuff
if(sd_obj.initSD())
@@ -85,15 +83,19 @@ void setup()
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();
@@ -105,6 +107,9 @@ void setup()
Serial.println("IP5306 I2C Supported: false");
Serial.println(wifi_scan_obj.freeRAM());
// Do some LED stuff
led_obj.RunSetup();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

View 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, };

View 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, };