Initial commit: project docs and ignore rules
This commit is contained in:
89
ESP32-C5-Toolkit/main/main.c
Normal file
89
ESP32-C5-Toolkit/main/main.c
Normal file
@@ -0,0 +1,89 @@
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_random.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_wifi_types.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "esp_mac.h"
|
||||
#include "esp_chip_info.h"
|
||||
#include "web_server.h"
|
||||
#include "esp_netif.h"
|
||||
#include "lwip/ip4_addr.h"
|
||||
#include "board_config.h"
|
||||
#include "wifi_init.h"
|
||||
#include "handshake_capture.h"
|
||||
|
||||
// Define MACSTR and MAC2STR
|
||||
#ifndef MAC2STR
|
||||
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
|
||||
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
#endif
|
||||
|
||||
static const char* TAG = "esp32_c5_toolkit";
|
||||
|
||||
void app_main(void) {
|
||||
printf("\n\n=== ESP32-C5 Toolkit Starting ===\n");
|
||||
|
||||
// Initialize NVS
|
||||
esp_err_t ret = nvs_flash_init();
|
||||
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
ESP_ERROR_CHECK(nvs_flash_erase());
|
||||
ret = nvs_flash_init();
|
||||
}
|
||||
ESP_ERROR_CHECK(ret);
|
||||
printf("NVS initialized OK\n");
|
||||
|
||||
// Print system info
|
||||
ESP_LOGI(TAG, "╔════════════════════════════════════════╗");
|
||||
ESP_LOGI(TAG, "║ ESP32-C5 Unified Toolkit ║");
|
||||
ESP_LOGI(TAG, "╚════════════════════════════════════════╝");
|
||||
ESP_LOGI(TAG, "Starting on %s", BOARD_NAME);
|
||||
ESP_LOGI(TAG, "IDF Version: %s", esp_get_idf_version());
|
||||
|
||||
esp_chip_info_t chip_info;
|
||||
esp_chip_info(&chip_info);
|
||||
ESP_LOGI(TAG, "Chip model: %d, cores: %d", chip_info.model, chip_info.cores);
|
||||
|
||||
printf("Initializing WiFi...\n");
|
||||
// Initialize WiFi
|
||||
wifi_init_ap();
|
||||
printf("WiFi initialized OK\n");
|
||||
|
||||
printf("Starting web server...\n");
|
||||
// Initialize and start web server
|
||||
init_web_server();
|
||||
printf("Web server started OK\n");
|
||||
|
||||
printf("Initializing handshake capture module...\n");
|
||||
// Initialize handshake capture (WPA/WPA2 handshake + PMKID capture)
|
||||
handshake_capture_init();
|
||||
printf("Handshake capture module ready\n");
|
||||
|
||||
// Display access instructions
|
||||
ESP_LOGI(TAG, "");
|
||||
ESP_LOGI(TAG, "╔════════════════════════════════════════╗");
|
||||
ESP_LOGI(TAG, "║ Web Interface Ready ║");
|
||||
ESP_LOGI(TAG, "╚════════════════════════════════════════╝");
|
||||
ESP_LOGI(TAG, "Connect to WiFi SSID: ESP32-C5-Toolkit");
|
||||
ESP_LOGI(TAG, "Password: h4ck3rm4n");
|
||||
ESP_LOGI(TAG, "Web interface: http://192.168.4.1");
|
||||
ESP_LOGI(TAG, "");
|
||||
ESP_LOGI(TAG, "Features:");
|
||||
ESP_LOGI(TAG, " - WiFi Network Scanner (2.4GHz + 5GHz)");
|
||||
ESP_LOGI(TAG, " - WPA/WPA2 Handshake Capture (DUAL RADIO)");
|
||||
ESP_LOGI(TAG, " - PMKID Capture Attack");
|
||||
ESP_LOGI(TAG, " - PCAP & HCCAPX Download (Browser)");
|
||||
ESP_LOGI(TAG, " - Advanced Packet Sniffer with Signal Analysis");
|
||||
ESP_LOGI(TAG, " - Dual-Band Deauth Engine (Authorized use only!)");
|
||||
ESP_LOGI(TAG, " - Signal Analysis & Channel Mapping");
|
||||
ESP_LOGI(TAG, " - Real-time Graphs & Visualizations");
|
||||
ESP_LOGI(TAG, " - Professional Hacker-Style UI");
|
||||
ESP_LOGI(TAG, "");
|
||||
|
||||
printf("=== System Ready! ===\n\n");
|
||||
}
|
||||
Reference in New Issue
Block a user