14 WIFI - geo-tp/ESP32-Bus-Pirate GitHub Wiki

Wi-Fi Mode

This mode provides control over Wi-Fi connectivity, scanning, spoofing, and sniffing.
Supports both client and access point (AP) modes.

M5Stick users must use the connect <ssid> <password> command via the terminal to configure Wi-Fi.

The credentials will be saved automatically to enable future use of the Web CLI mode.

⚠️ Wi-Fi Warning: Avoid using Wi-Fi commands (like disconnect, sniff, or reset) while connected via Web CLI, it will break the connection.


🧩 Commands

Command Description
connect <ssid> <pass> Connects to a Wi-Fi network using given SSID and password
disconnect Disconnects from the current Wi-Fi network
status Shows current Wi-Fi connection status, IP, and MAC addresses
ap <ssid> <pass> Starts a Wi-Fi Access Point with optional STA fallback
spoof sta <mac> Changes MAC address of station interface
spoof ap <mac> Changes MAC address of access point interface
scan Lists all nearby Wi-Fi networks, with details
ping <host> Sends a ping to a given host (e.g., 8.8.8.8 or google.com)
sniff Starts a passive Wi-Fi sniffer across all channels
webui Displays the current Web UI URL if connected
reset Resets the Wi-Fi interface

📝 Notes

  • connect stores credentials in NVS for auto-reconnect after reboot.
  • ap will fallback to dual mode (AP + STA) if existing credentials are saved.
  • spoof only works before starting Wi-Fi. Use reset first.
  • scan displays encryption type, BSSID, channel, RSSI, and flags like [open], [vulnerable], [hidden].
  • sniff cycles through Wi-Fi channels (1–13) and logs packets in real time.
  • webui URL is shown if connected via Wi-Fi STA.
  • ⚠️ Running Wi-Fi commands while using Web CLI may disconnect your session. Prefer USB serial in that case.

📌 Example Usage

mode wifi
scan                             # List networks
connect MyWiFi mypassword        # Connect to a Wi-Fi network
status                           # Show connection and IP info
sniff                            # Passive monitor of Wi-Fi packets
spoof sta AA:BB:CC:DD:EE:FF      # Spoof STA MAC address
ping 8.8.8.8                     # Ping google DNS
ping google.com                  # Ping google website
ap MyHotspot 12345678            # Start AP with optional STA fallback
disconnect                       # Disconnect from network
webui                            # Print URL for Web UI if connected
⚠️ **GitHub.com Fallback** ⚠️