ESP-Sniffer is a real-time Wi-Fi packet sniffer that uses an ESP32 to capture 802.11 frames in promiscuous mode and streams them in PCAP format over USB serial to a Python host tool for live color-coded decoding and display.

Stars

11

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It provides a low-cost, open-source, cross-platform solution for 802.11 frame capture with automatic port detection, vendor name resolution, and real-time classification, making it accessible for learning and experimentation.

Who it is for

  • Network enthusiasts and hobbyists learning Wi-Fi protocols
  • Security researchers performing wireless analysis on controlled networks
  • IoT developers debugging Wi-Fi device behavior
  • Students in computer networking or cybersecurity courses

Use cases

  • Monitoring Wi-Fi networks for educational purposes on your own infrastructure
  • Analyzing beacon frames to study access point behavior
  • Debugging custom Wi-Fi devices or firmware by sniffing their traffic
  • Capturing and inspecting 802.11 management and control frames for research

Strengths

  • Uses standard PCAP format for easy integration with Wireshark and other tools
  • Real-time color-coded terminal output with per-packet details and periodic statistics
  • Auto-detects ESP32 serial port via USB VID/PID and keywords, reducing setup friction
  • Supports a wide range of 802.11 frame types including Management, Control, and Data

Considerations

  • Only scans 2.4 GHz channels (1–13) and hops every 500 ms, missing 5 GHz and reducing capture completeness
  • Serial streaming at 921600 baud may drop packets under high traffic
  • Requires a wired USB connection and a separate Python environment, limiting portability

README quick start

ESP-Sniffer

A real-time Wi-Fi packet sniffer built on the ESP32. The ESP32 runs in promiscuous mode, captures raw 802.11 frames, and streams them over USB serial in PCAP format to a Python host tool that decodes, classifies, and displays them in a live color-coded terminal view.

System Architecture

The system is split into two halves:

  • ESP32 firmware — puts the Wi-Fi radio into promiscuous mode, hops channels every 500 ms, wraps every captured frame in a PCAP packet header, and streams the raw bytes over UART at 921600 baud.
  • Python host tool — syncs to the PCAP magic bytes, reads packet headers and frames, decodes the 802.11 control field, resolves vendor names from MAC addresses, and prints a live colored packet log with periodic statistics.

Live Output

Each line shows:

FieldDescription
[000001]Packet number
0.18sElapsed time since capture start
Management802.11 frame category (Management / Control / Data)
BeaconFrame subtype
len=318Captured frame length in bytes
src=...Source MAC address with vendor name
dst=...Destination MAC address with vendor name
bssid=...BSSID MAC address

Every 50 packets a summary line prints packet rate and top frame types.

Project Structure

ESP-Sniffer/
├── esp/
│   ├── esp.ino          # Arduino entry point (setup / loop)
│   ├── sniffer.cpp      # ESP32 promiscuous sniffer + PCAP serializer
│   └── sniffer.h        # Constants and function declarations
├── assets/
│   ├── logigrame.png    # System architecture diagram
│   └── screenshot.png   # Live terminal output screenshot
├── manuf.txt            # Wireshark OUI/vendor database
├── requirements.txt     # Python dependencies
└── sniffer.py           # Python host tool

Requirements

ESP32 Firmware

  • Arduino IDE or PlatformIO
  • ESP32 board support package
  • Board: any ESP32 development board (tested with CP2102 / CH340 USB-serial chips)

Python Host Tool

  • Python 3.8+

Install dependencies:

pip install -r requirements.txt
PackagePurpose
pyserialSerial communication with the ESP32
coloramaColored terminal output (cross-platform)
manufMAC address OUI vendor lookup
requestsDownloading updated Wireshark manuf database

Flashing the ESP32

  1. Open esp/esp.ino in

Description

A real-time Wi-Fi packet sniffer built on the ESP32.

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482