diff --git a/HoneyESP-SPIFFS/HoneyESP-SPIFFS.ino b/HoneyESP-SPIFFS/HoneyESP-SPIFFS.ino index c3ebd8b..896e263 100644 --- a/HoneyESP-SPIFFS/HoneyESP-SPIFFS.ino +++ b/HoneyESP-SPIFFS/HoneyESP-SPIFFS.ino @@ -1,8 +1,17 @@ +#ifdef ESP8266 #include #include -#include #include #include +#else +#include +#include +#include +#include +#include +#endif + +#include #define DNS_PORT 53 #define HTTP_PORT 80 @@ -20,7 +29,11 @@ #define FILE_WRITE "a" DNSServer dnsServer; +#ifdef ESP8266 ESP8266WebServer server(HTTP_PORT); +#else +WebServer server(HTTP_PORT); +#endif int lastClientCount = -1; void setup() { @@ -31,7 +44,7 @@ void setup() { Serial.begin(9600); Serial.println(); Serial.println(" _ _ _____ ____ ____"); - Serial.println("| | | | ___ _ __ ___ _ _| ____/ ___|| _ \\ ESP8266 honeypot version 1.6"); + Serial.println("| | | | ___ _ __ ___ _ _| ____/ ___|| _ \\ ESP8266/ESP32 honeypot version 2.0"); Serial.println("| |_| |/ _ \\| '_ \\ / _ \\ | | | _| \\___ \\| |_) | SPIFFS Version"); Serial.println("| _ | (_) | | | | __/ |_| | |___ ___) | __/ github.com/ridercz/HoneyESP"); Serial.println("|_| |_|\\___/|_| |_|\\___|\\__, |_____|____/|_| (c) 2018-2019 Michal Altair Valasek"); @@ -49,6 +62,11 @@ void setup() { } // Create SSID +#ifdef ESP8266 + WiFi.mode(WIFI_AP); +#else + WiFi.mode(WIFI_MODE_AP); +#endif String ssid = DEFAULT_SSID_PREFIX + WiFi.softAPmacAddress(); if (SPIFFS.exists(FILENAME_SSID)) { File ssidFile = SPIFFS.open(FILENAME_SSID, FILE_READ); @@ -61,6 +79,13 @@ void setup() { Serial.print(" MAC: "); Serial.println(WiFi.softAPmacAddress()); Serial.print(" Host name: "); Serial.println(HOSTNAME); + // Show HW platform +#ifdef ESP8266 + Serial.println(" HW platform: ESP8266"); +#else + Serial.println(" HW platform: ESP32"); +#endif + // Parse IP address and netmask IPAddress ip, nm; ip.fromString(AP_ADDRESS); diff --git a/README.md b/README.md index 3ac72e6..b73e988 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -The **HoneyESP Project** is fake captive portal/honeypot for ESP8266-based microcontroller boards (NodeMCU, Wemos D1 etc). +The **HoneyESP Project** is fake captive portal/honeypot for microcontroller boards based on ESP8266 (NodeMCU, Wemos D1 etc) and ESP32 (SPIFFS version only, no SD card support on ESP32 yet). This project is intended for social engineering attacks and education. See the [usage](https://github.com/ridercz/HoneyESP/wiki/Usage) wiki page on how it works.