CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 02:32:52 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=5962fee5d02a0e99284b991d7784e11123d66cfbb03478f3e6210fe3ebf7f9aaa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22LFGHEwtBsi-hf8TxDQJh7wtU6yS-azHF%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d3306b4cef2ffb-BLR
ESP32 Scanner rev_01 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* Pleasedontcode.com **********
- Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- - Terms and Conditions:
- You have a non-exclusive, revocable, worldwide, royalty-free license
- for personal and commercial use. Attribution is optional; modifications
- are allowed, but you're responsible for code maintenance. We're not
- liable for any loss or damage. For full terms,
- please visit pleasedontcode.com/termsandconditions.
- - Project: ESP32 Scanner
- - Source Code NOT compiled for: ESP32 DevKit V1
- - Source Code created on: 2025-09-24 19:36:31
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* Напиши код который будет совершать deauth атаку на */
- /* выбранное устройство, для этого нужно нарисовать */
- /* меню выбора */
- /****** END SYSTEM REQUIREMENTS *****/
- /* START CODE */
- /****** DEFINITION OF LIBRARIES *****/
- #include <Wire.h>
- #include <Adafruit_SSD1306.h>\t//https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED.git
- #include <U8g2_for_Adafruit_GFX.h>\t//https://github.com/olikraus/U8g2_for_Adafruit_GFX
- #include <WiFi.h> // ESP32 WiFi control
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- void scanNetworksAndPopulate(void);
- void displayMenu(void);
- void showSelectedDetails(void);
- /***** DEFINITION OF I2C PINS *****/
- const uint8_t displayy_SSD1306OledDisplay_I2C_PIN_SDA_D21 = 21;
- const uint8_t displayy_SSD1306OledDisplay_I2C_PIN_SCL_D22 = 22;
- const uint8_t displayy_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 60;
- /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
- #define OLED_RESET 4
- Adafruit_SSD1306 display(OLED_RESET);
- // Simple 3-button UI on the ESP32
- #define BTN_UP 32
- #define BTN_DOWN 33
- #define BTN_SELECT 25
- // Debounce handling (simple)
- #define DEBOUNCE_DELAY_MS 200
- // Maximum access points to display/store
- #define MAX_APS 12
- typedef struct {
- String ssid;
- int8_t rssi; // signal strength
- int8_t channel; // WiFi channel
- } APInfo;
- APInfo apList[MAX_APS];
- uint8_t apCount = 0;
- int8_t selectedIndex = 0;
- typedef enum {
- MENU_STATE,
- DETAILS_STATE
- } AppState;
- AppState appState = MENU_STATE;
- unsigned long lastButtonTime = 0;
- void setup(void)
- {
- // initialize serial and display
- Serial.begin(115200);
- // setup display (I2C 0x3C typical for 128x64)
- if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)){
- Serial.println("SSD1306 init failed");
- // continue anyway; display may not be available
- }
- display.clearDisplay();
- display.display();
- // set up simple 3-button inputs
- pinMode(BTN_UP, INPUT_PULLUP);
- pinMode(BTN_DOWN, INPUT_PULLUP);
- pinMode(BTN_SELECT, INPUT_PULLUP);
- // init WiFi in station mode for scanning only (no connections)
- WiFi.mode(WIFI_STA);
- WiFi.disconnect(true); // ensure no prior connections
- delay(100);
- // initial scan and UI population
- scanNetworksAndPopulate();
- }
- void loop(void)
- {
- // Simple UI loop: navigate with Up/Down, confirm with Select
- // Debounce is basic; if a button is pressed, act and wait for release
- bool upPressed = (digitalRead(BTN_UP) == LOW);
- bool downPressed = (digitalRead(BTN_DOWN) == LOW);
- bool selectPressed = (digitalRead(BTN_SELECT) == LOW);
- if (millis() - lastButtonTime > DEBOUNCE_DELAY_MS) {
- if (appState == MENU_STATE) {
- if (upPressed) {
- if (apCount > 0) {
- selectedIndex = max(0, selectedIndex - 1);
- displayMenu();
- lastButtonTime = millis();
- }
- } else if (downPressed) {
- if (apCount > 0) {
- int maxIndex = apCount - 1;
- selectedIndex = min(maxIndex, selectedIndex + 1);
- displayMenu();
- lastButtonTime = millis();
- }
- } else if (selectPressed) {
- if (apCount > 0) {
- appState = DETAILS_STATE;
- showSelectedDetails();
- }
- lastButtonTime = millis();
- }
- } else if (appState == DETAILS_STATE) {
- if (selectPressed) {
- // Return to menu; refresh AP list on next loop
- appState = MENU_STATE;
- scanNetworksAndPopulate();
- displayMenu();
- lastButtonTime = millis();
- }
- }
- }
- // Small delay to avoid busy loop when buttons are idle
- delay(20);
- }
- void scanNetworksAndPopulate(void)
- {
- // perform a WiFi scan and fill apList
- display.clearDisplay();
- display.setTextSize(1);
- display.setTextColor(WHITE);
- display.setCursor(0, 0);
- display.println("Scanning...");
- display.display();
- // Do the scan (synchronous)
- int n = WiFi.scanNetworks(/*async=*/false);
- apCount = 0;
- if (n <= 0) {
- apList[0].ssid = "(No networks)";
- apList[0].rssi = 0;
- apList[0].channel = 0;
- apCount = 1;
- selectedIndex = 0;
- } else {
- int limit = min(n, MAX_APS);
- for (int i = 0; i < limit; i++) {
- apList[i].ssid = WiFi.SSID(i);
- apList[i].rssi = WiFi.RSSI(i);
- apList[i].channel = WiFi.channel(i);
- }
- apCount = limit;
- if (selectedIndex < 0 || selectedIndex >= apCount) selectedIndex = apCount - 1;
- }
- // show menu after scan
- displayMenu();
- }
- void displayMenu(void)
- {
- display.clearDisplay();
- display.setTextSize(1);
- display.setTextColor(WHITE);
- const uint8_t linesToShow = 6; // fit in 64px height reasonably
- for (uint8_t i = 0; i < linesToShow; i++) {
- int y = i * 10;
- if (i < apCount) {
- // highlight the selected item
- String label = apList[i].ssid;
- String rssiStr = String(apList[i].rssi) + " dBm";
- if (i == (uint8_t)selectedIndex) {
- // simple highlight: invert by drawing a filled rect then white text
- display.fillRect(0, y, 128, 10, WHITE);
- display.setCursor(2, y + 8);
- display.setTextColor(BLACK);
- display.print(label);
- display.print(" ");
- display.print(rssiStr);
- } else {
- display.setCursor(2, y + 8);
- display.setTextColor(WHITE);
- display.print("> ");
- display.print(label);
- }
- }
- }
- // footer help line
- display.setCursor(0, 64 - 8);
- display.setTextColor(WHITE);
- display.print("UP/DN to navigate, SELECT to choose");
- display.display();
- }
- void showSelectedDetails(void)
- {
- if (apCount == 0) return;
- display.clearDisplay();
- display.setTextSize(1);
- display.setTextColor(WHITE);
- int y = 0;
- display.setCursor(0, y + 2);
- display.println("Selected AP:");
- display.setCursor(0, y + 12);
- display.println(apList[selectedIndex].ssid);
- display.setCursor(0, y + 22);
- display.print("RSSI: ");
- display.print(apList[selectedIndex].rssi);
- display.println(" dBm");
- display.setCursor(0, y + 34);
- display.print("CH: ");
- display.print(apList[selectedIndex].channel);
- display.println(" ");
- display.setCursor(0, y + 46);
- display.println("Demo mode: safe only");
- display.display();
- // Also print to Serial as a safety indicator
- Serial.println("[SAFE DEMO] Target selected: " + apList[selectedIndex].ssid);
- Serial.println("RSSI: " + String(apList[selectedIndex].rssi) + " dBm");
- }
- /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
-
📝 EASY MONEY GUIDE ✅ Working
JavaScript | 7 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ O
JavaScript | 8 sec ago | 0.25 KB
-
📌 ChangeNOW Exploit
JavaScript | 17 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 7
JavaScript | 17 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ P
JavaScript | 26 sec ago | 0.25 KB
-
📌 Instant BTC Profit Method ✅ Working
JavaScript | 26 sec ago | 0.24 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 34 sec ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ E
JavaScript | 35 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand