Skip to content

Commit

Permalink
Merge pull request #1 from ridercz/master
Browse files Browse the repository at this point in the history
Merge updated master
  • Loading branch information
Thebys authored Mar 1, 2019
2 parents 6bf3b75 + 5b20a5a commit 600b298
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 27 additions & 2 deletions HoneyESP-SPIFFS/HoneyESP-SPIFFS.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#ifdef ESP8266
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <ESP8266mDNS.h>
#include <FS.h>
#else
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include <SPIFFS.h>
#endif

#include <DNSServer.h>

#define DNS_PORT 53
#define HTTP_PORT 80
Expand All @@ -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() {
Expand All @@ -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");
Expand All @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down

0 comments on commit 600b298

Please sign in to comment.