78 lines
2.9 KiB
Plaintext
78 lines
2.9 KiB
Plaintext
#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 "bt_scanner.h" // Temporarily disabled
|
|
|
|
// 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) {
|
|
// 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);
|
|
|
|
// 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);
|
|
|
|
// Initialize WiFi
|
|
wifi_init_ap();
|
|
|
|
// Initialize Bluetooth scanner
|
|
// bt_scanner_init(); // Temporarily disabled - BLE linking issues
|
|
|
|
// Initialize and start web server
|
|
init_web_server();
|
|
|
|
// 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, " - Advanced Packet Sniffer with Signal Analysis");
|
|
ESP_LOGI(TAG, " - Dual-Band Deauth Engine (Authorized use only!)");
|
|
ESP_LOGI(TAG, " - Bluetooth Scanner & Jamming");
|
|
ESP_LOGI(TAG, " - Signal Analysis & Channel Mapping");
|
|
ESP_LOGI(TAG, " - Real-time Graphs & Visualizations");
|
|
ESP_LOGI(TAG, " - Advanced System Dashboard");
|
|
ESP_LOGI(TAG, " - Professional Hacker-Style UI");
|
|
ESP_LOGI(TAG, "");
|
|
}
|