Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Politician — Modern WiFi auditing library for ESP32 using advanced 802.11 techniques. Captures WPA/WPA2/WPA3 handshakes via PMKID extraction and CSA injection (bypasses PMF). Harvests enterprise credentials, supports dual-band (2.4GHz/5GHz on ESP32-C6), exports to PCAPNG/Hashcat. Clean C++ API with 9 examples. | Kitploit
Tools/GitHubGitHub/0ldev/politician
Embedded Systems SecurityPassword CrackingWi-Fi AuditingIoT SecurityInformation GatheringFuzzingWireless SecurityPenetration TestingHardware Security
GitHub0ldev/politician

Politician

9361805 days agoReviewed by Kitploit

About

Modern WiFi auditing library for ESP32 using advanced 802.11 techniques. Captures WPA/WPA2/WPA3 handshakes via PMKID extraction and CSA injection (bypasses PMF). Harvests enterprise credentials, supports dual-band (2.4GHz/5GHz on ESP32-C6), exports to PCAPNG/Hashcat. Clean C++ API with 9 examples.

View Repository
Website
Share

Politician

A sophisticated WiFi auditing library for ESP32 microcontrollers

License: MIT PlatformIO

Politician is an embedded C++ library designed for WiFi security auditing on ESP32 platforms. It provides a clean, modern API for capturing WPA/WPA2/WPA3 handshakes and harvesting enterprise credentials using advanced 802.11 protocol techniques.

Migration Notes

ClientFoundCb signature change (develop)

ClientFoundCb was changed from (const uint8_t *bssid, const uint8_t *sta, int8_t rssi) to (const ClientRecord &rec). Update existing callbacks:

// Before
engine.setClientFoundCallback([](const uint8_t *bssid, const uint8_t *sta, int8_t rssi) { … });

// After
engine.setClientFoundCallback([](const ClientRecord &rec) {
    // rec.bssid, rec.sta, rec.rssi — same data plus rand_mac, vendor, timestamps
});

Key Capabilities

  • PMKID Capture — Extract PMKIDs via fake association without disconnecting any client
  • CSA Injection — Channel Switch Announcement; modern PMF-bypassing alternative to deauth
  • 802.11v BTM Injection — BSS Transition Management Request; politely steers clients to reconnect
  • Classic Deauth — Reason-7 deauthentication for legacy networks without PMF
  • Client Stimulation — Wake sleeping devices with QoS Null Data frames
  • Enterprise Credential Harvesting — Passively capture EAP-Identity and bare EAP-MSCHAPv2 exchanges
  • WPS M1 Capture — Harvest device fingerprint attributes from unencrypted WPS Enrollee M1 messages
  • Hidden Network Discovery — SSID decloaking via directed probe requests; optional wordlist cycling
  • VHT/HE Detection — Parse 802.11ac/ax IEs to expose channel width and Wi-Fi generation per AP
  • Device Fingerprinting — Identify 150+ IoT/consumer brands via MAC OUI and IE signatures
  • Export Formats — Streaming PCAPNG (Wireshark-compatible); auxiliary HC22000 for Hashcat; Wigle CSV
  • Passive Motion Sensing — RSSI variance analysis detects human presence and movement via a fixed anchor AP; device-free, no mode switching, runs alongside the audit engine

Architecture

The library is built around a non-blocking state machine managing channel hopping, target selection, attack execution, and capture processing. All operations are contained within the politician namespace.

Core Headers

HeaderDescription
Politician.hMain engine class — include this in every project
PoliticianTypes.hPublic structs, enums, and compile-time feature gates
PoliticianStorage.hSD card loggers and NVS persistence (Arduino only)
PoliticianFormat.hPCAPNG and HC22000 serialization primitives
PoliticianStress.hOpt-in DoS payloads (SAE flood, probe flood, beacon flood)
PoliticianProbe.hOpt-in PROGMEM wordlist for hidden SSID probing
PoliticianWPS.hOpt-in WPS M1 print helpers and bitmask constants
PoliticianSense.hOpt-in passive RSSI-based motion and presence sensing

Attack Modes

ModeBitDescription
ATTACK_PMKID0x01PMKID fishing via fake association
ATTACK_CSA0x02Channel Switch Announcement injection
ATTACK_PASSIVE0x04Listen-only — zero transmission
ATTACK_DEAUTH0x08Classic Reason-7 deauthentication
ATTACK_STIMULATE0x10QoS Null Data client stimulation
ATTACK_BTM0x20802.11v BSS Transition Management Request
ATTACK_ALL0x3FAll active attack vectors

Compile-Time Feature Gates

Define any of these before including Politician.h or via your build system (-DNAME):

; platformio.ini
build_flags =
    -DPOLITICIAN_NO_DB           ; Strip 14KB OUI database (no vendor lookups)
    -DPOLITICIAN_NO_PCAPNG       ; Strip PCAPNG serialization
    -DPOLITICIAN_NO_HC22000      ; Strip Hashcat HC22000 formatter
    -DPOLITICIAN_NO_LOGGING      ; Strip all internal Serial log output
    -DPOLITICIAN_NO_STD_FUNCTION ; Use raw fn pointers instead of std::function
    -DPOLITICIAN_NO_MSCHAPV2     ; Strip bare EAP-MSCHAPv2 capture
    -DPOLITICIAN_NO_KARMA        ; Strip KARMA rogue AP responder
    -DPOLITICIAN_MAX_INSTANCES=1 ; Limit to one instance (saves a pointer array slot)

POLITICIAN_NO_STD_FUNCTION reverts all callback types from std::function<> to raw function pointers — saving ~2KB flash and enabling use in environments without <functional>. Lambda captures are unavailable when this flag is set.

POLITICIAN_MAX_INSTANCES (default 2) controls the size of the static instance registry used by the promiscuous ISR dispatcher. Set to 1 for single-instance deployments to eliminate the loop overhead in the ISR.

Installation

PlatformIO

[env:myboard]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
    Politician

Or clone directly into your project's lib/ directory:

cd lib/
git clone https://github.com/0ldev/Politician.git

Arduino IDE

  1. Download the library as a ZIP file
  2. Sketch → Include Library → Add .ZIP Library

ESP-IDF

Clone into your project's components/ directory and create a CMakeLists.txt:

idf_component_register(
    SRCS "src/Politician.cpp" "src/PoliticianFormat.cpp" "src/PoliticianStress.cpp"
    INCLUDE_DIRS "src"
)

PoliticianStorage.h is Arduino-only and emits a #error under ESP-IDF. Use ESP-IDF's VFS and nvs_flash APIs directly.

Quick Start

Basic Handshake Capture

#include <Arduino.h>
#include <SD.h>
#include <Politician.h>
#include <PoliticianStorage.h>

using namespace politician;
using namespace politician::storage;

Politician engine;
PcapngFileLogger pcap; // Streaming logger — one open(), many write() calls

void onHandshake(const HandshakeRecord &rec) {
    Serial.printf("[✓] %s  ch%d  rssi=%d  type=%d\n",
                  rec.ssid, rec.channel, rec.rssi, rec.type);
    pcap.write(rec);
}

void setup() {
    Serial.begin(115200);
    SD.begin();

    pcap.open(SD, "/captures.pcapng", 4 * 1024 * 1024); // optional auto-rotation at 4MB

    engine.setEapolCallback(onHandshake);
    engine.begin();
    engine.setAttackMask(ATTACK_ALL);
}

void loop() {
    engine.tick();
}

Bare ESP-IDF Quick Start

#include <nvs_flash.h>
#include <esp_event.h>
#include <Politician.h>

using namespace politician;
static Politician engine;

static void audit_task(void *) {
    engine.setEapolCallback([](const HandshakeRecord &rec) {
        printf("[+] %s  ch%d\n", rec.ssid, rec.channel);
    });
    engine.begin();
    engine.setAttackMask(ATTACK_ALL);
    for (;;) { engine.tick(); vTaskDelay(pdMS_TO_TICKS(1)); }
}

extern "C" void app_main(void) {
    nvs_flash_init();
    esp_event_loop_create_default();
    xTaskCreate(audit_task, "politician", 8192, nullptr, 5, nullptr);
}

API Reference

Initialization

Error begin(const Config &cfg = Config());

Initializes the WiFi driver in promiscuous mode. Must be called before any other method. Clamps and warns on invalid Config values at startup. Use validateConfig() beforehand to surface misconfigurations before deploying in the field:

Config cfg;
cfg.hop_min_dwell_ms = 400;
cfg.hop_max_dwell_ms = 200; // wrong — min > max

const char *warnings[8];
int n = politician::validateConfig(cfg, warnings, 8);
for (int i = 0; i < n; i++) Serial.println(warnings[i]);
// → "hop_min_dwell_ms >= hop_max_dwell_ms — max will be clamped to min+50ms"

engine.begin(cfg); // begins normally; begin() clamps automatically

validateConfig() is a free inline function in the politician namespace — zero allocations, zero dependencies.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    501
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    467
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    340
  • 4

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    314
  • 5

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    307
  • 6

    estorides

    grisuno/estorides

    Aggregates 99+ free OSINT sources in parallel, resolves entities into a knowledge graph, and exports STIX 2.1, MISP, or GraphML with LLM-assisted analysis.

    295

Explore all tools

Browse our collection of tools

View all tools →