# zerbea/hcxtools architecture

> Architecture diagram of the GitHub repository zerbea/hcxtools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zerbea/hcxtools
- Repository: https://github.com/zerbea/hcxtools

## Overview

hcxtools is a Linux command-line suite for analyzing Wi-Fi captures and hash files; it prepares data for Hashcat and John the Ripper rather than cracking passwords itself. The primary workflow converts packet captures into password-audit hashes, then filters or examines those hashes and sends them to an external cracking tool. The README also documents separate utilities for hash conversion, PSK/PMK work, candidate generation, pot files, and capture submission. Connections from the main converter to shared parsing code are supported by the source index; unsampled tool internals are represented by their documented capabilities.

Main entry points: [`hcxpcapngtool.c`](https://github.com/zerbea/hcxtools/blob/master/hcxpcapngtool.c) (Capture converter), [`hcxhashtool.c`](https://github.com/zerbea/hcxtools/blob/master/hcxhashtool.c) (Hash filtering), [`hcxhash2cap.c`](https://github.com/zerbea/hcxtools/blob/master/hcxhash2cap.c) (Hash-to-capture), [`hcxpsktool.c`](https://github.com/zerbea/hcxtools/blob/master/hcxpsktool.c) (Weak PSK candidates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture processing"]
  node_hcxpcapngtool["Capture converter<br/>[hcxpcapngtool.c]"]
end

subgraph group_hash["Hash analysis"]
  node_hcxhashtool["Hash filtering<br/>[hcxhashtool.c]"]
  node_hcxpottool["Pot-file handling<br/>[hcxpottool.c]"]
end

subgraph group_candidates["Candidate utilities"]
  node_hcxpsktool["Weak PSK candidates<br/>[hcxpsktool.c]"]
  node_hcxeiutool["Rule input preparation<br/>[hcxeiutool.c]"]
  node_hcxwltool["Wordlist candidates<br/>[hcxwltool.c]"]
  node_hcxpmktool["PSK / PMK checks<br/>[hcxpmktool.c]"]
end

subgraph group_integrations["Conversion and services"]
  node_hcxhash2cap["Hash-to-capture<br/>[hcxhash2cap.c]"]
  node_wlancap2wpasec["Capture uploader<br/>[wlancap2wpasec.c]"]
  node_whoismac["Vendor lookup<br/>[whoismac.c]"]
end

subgraph group_shared["Shared runtime"]
  node_ieee80211["802.11 parsing<br/>[ieee80211.c]"]
  node_pcap["Capture I/O<br/>[pcap.c]"]
  node_gzops["Gzip support<br/>[gzops.c]"]
  node_fileops["File helpers<br/>[fileops.c]"]
  node_strings["String helpers<br/>[strings.c]"]
  node_byteops["Byte operations<br/>[byteops.c]"]
  node_hashcatops["Hash formats<br/>[hashcatops.h]"]
  node_hashops["Hash operations<br/>[hashops.h]"]
end

node_user(("Operator"))
node_capture_input["Packet captures"]
node_hash_output["Audit hashes"]
node_hashcat["Hashcat / John"]
node_wpasec["wpa-sec service"]

node_user -->|"converts captures"| node_hcxpcapngtool
node_capture_input -->|"reads"| node_hcxpcapngtool
node_hcxpcapngtool -->|"writes hashes"| node_hash_output
node_hcxpcapngtool -->|"passes hashes"| node_hcxhashtool
node_hcxhashtool -->|"supplies filtered hashes"| node_hashcat
node_hcxhashtool -->|"supports analysis"| node_hcxpsktool
node_hcxhashtool -->|"prepares rule input"| node_hcxeiutool
node_user -->|"handles pot files"| node_hcxpottool
node_user -->|"checks keys"| node_hcxpmktool
node_user -->|"generates candidates"| node_hcxwltool
node_user -->|"converts hashes"| node_hcxhash2cap
node_user -->|"submits captures"| node_wlancap2wpasec
node_wlancap2wpasec -->|"uploads captures"| node_wpasec
node_user -->|"looks up vendors"| node_whoismac
node_hcxpcapngtool -->|"uses protocol definitions"| node_ieee80211
node_hcxpcapngtool -->|"uses capture I/O"| node_pcap
node_hcxpcapngtool -->|"uses compression"| node_gzops
node_hcxpcapngtool -->|"uses file helpers"| node_fileops
node_hcxpcapngtool -->|"uses string helpers"| node_strings
node_hcxpcapngtool -->|"uses byte helpers"| node_byteops
node_hcxpcapngtool -->|"uses hash operations"| node_hashops
node_hcxhashtool -->|"uses protocol definitions"| node_ieee80211
node_hcxhashtool -->|"uses file helpers"| node_fileops
node_hcxhashtool -->|"uses string helpers"| node_strings
node_hcxhashtool -->|"uses byte helpers"| node_byteops
node_hcxpsktool -->|"uses hash formats"| node_hashcatops
node_hcxpsktool -->|"uses file helpers"| node_fileops
node_hcxpsktool -->|"uses string helpers"| node_strings
node_hcxhash2cap -->|"uses capture definitions"| node_pcap
node_hcxhash2cap -->|"uses protocol definitions"| node_ieee80211
node_hcxhash2cap -->|"uses hash formats"| node_hashcatops
node_hcxhash2cap -->|"uses file helpers"| node_fileops

click node_hcxpcapngtool "https://github.com/zerbea/hcxtools/blob/master/hcxpcapngtool.c"
click node_hcxhashtool "https://github.com/zerbea/hcxtools/blob/master/hcxhashtool.c"
click node_hcxpottool "https://github.com/zerbea/hcxtools/blob/master/hcxpottool.c"
click node_hcxpsktool "https://github.com/zerbea/hcxtools/blob/master/hcxpsktool.c"
click node_hcxeiutool "https://github.com/zerbea/hcxtools/blob/master/hcxeiutool.c"
click node_hcxwltool "https://github.com/zerbea/hcxtools/blob/master/hcxwltool.c"
click node_hcxpmktool "https://github.com/zerbea/hcxtools/blob/master/hcxpmktool.c"
click node_hcxhash2cap "https://github.com/zerbea/hcxtools/blob/master/hcxhash2cap.c"
click node_wlancap2wpasec "https://github.com/zerbea/hcxtools/blob/master/wlancap2wpasec.c"
click node_whoismac "https://github.com/zerbea/hcxtools/blob/master/whoismac.c"
click node_ieee80211 "https://github.com/zerbea/hcxtools/blob/master/include/ieee80211.c"
click node_pcap "https://github.com/zerbea/hcxtools/blob/master/include/pcap.c"
click node_gzops "https://github.com/zerbea/hcxtools/blob/master/include/gzops.c"
click node_fileops "https://github.com/zerbea/hcxtools/blob/master/include/fileops.c"
click node_strings "https://github.com/zerbea/hcxtools/blob/master/include/strings.c"
click node_byteops "https://github.com/zerbea/hcxtools/blob/master/include/byteops.c"
click node_hashcatops "https://github.com/zerbea/hcxtools/blob/master/include/hashcatops.h"
click node_hashops "https://github.com/zerbea/hcxtools/blob/master/include/hashops.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hcxpcapngtool toneBlue
class node_hcxhashtool,node_hcxpottool toneAmber
class node_hcxpsktool,node_hcxeiutool,node_hcxwltool,node_hcxpmktool toneMint
class node_hcxhash2cap,node_wlancap2wpasec,node_whoismac toneRose
class node_ieee80211,node_pcap,node_gzops,node_fileops,node_strings,node_byteops,node_hashcatops,node_hashops,node_user,node_capture_input,node_hash_output,node_hashcat,node_wpasec toneIndigo
```

## Components

### Capture processing

- [Capture converter](https://github.com/zerbea/hcxtools/blob/master/hcxpcapngtool.c): `hcxpcapngtool.c`

### Hash analysis

- [Hash filtering](https://github.com/zerbea/hcxtools/blob/master/hcxhashtool.c): `hcxhashtool.c`
- [Pot-file handling](https://github.com/zerbea/hcxtools/blob/master/hcxpottool.c): `hcxpottool.c`

### Candidate utilities

- [Weak PSK candidates](https://github.com/zerbea/hcxtools/blob/master/hcxpsktool.c): `hcxpsktool.c`
- [Rule input preparation](https://github.com/zerbea/hcxtools/blob/master/hcxeiutool.c): `hcxeiutool.c`
- [Wordlist candidates](https://github.com/zerbea/hcxtools/blob/master/hcxwltool.c): `hcxwltool.c`
- [PSK / PMK checks](https://github.com/zerbea/hcxtools/blob/master/hcxpmktool.c): `hcxpmktool.c`

### Conversion and services

- [Hash-to-capture](https://github.com/zerbea/hcxtools/blob/master/hcxhash2cap.c): `hcxhash2cap.c`
- [Capture uploader](https://github.com/zerbea/hcxtools/blob/master/wlancap2wpasec.c): `wlancap2wpasec.c`
- [Vendor lookup](https://github.com/zerbea/hcxtools/blob/master/whoismac.c): `whoismac.c`

### Shared runtime

- [802.11 parsing](https://github.com/zerbea/hcxtools/blob/master/include/ieee80211.c): `include/ieee80211.c`
- [Capture I/O](https://github.com/zerbea/hcxtools/blob/master/include/pcap.c): `include/pcap.c`
- [Gzip support](https://github.com/zerbea/hcxtools/blob/master/include/gzops.c): `include/gzops.c`
- [File helpers](https://github.com/zerbea/hcxtools/blob/master/include/fileops.c): `include/fileops.c`
- [String helpers](https://github.com/zerbea/hcxtools/blob/master/include/strings.c): `include/strings.c`
- [Byte operations](https://github.com/zerbea/hcxtools/blob/master/include/byteops.c): `include/byteops.c`
- [Hash formats](https://github.com/zerbea/hcxtools/blob/master/include/hashcatops.h): `include/hashcatops.h`
- [Hash operations](https://github.com/zerbea/hcxtools/blob/master/include/hashops.h): `include/hashops.h`

### Other components

- **Operator**
- **Packet captures**
- **Audit hashes**
- **Hashcat / John**
- **wpa-sec service**

## Connections

- Operator → Capture converter: converts captures (evidence: `README.md`)
- Packet captures → Capture converter: reads (evidence: `README.md`)
- Capture converter → Audit hashes: writes hashes (evidence: `README.md`)
- Capture converter → Hash filtering: passes hashes (evidence: `README.md`)
- Hash filtering → Hashcat / John: supplies filtered hashes (evidence: `README.md`)
- Hash filtering → Weak PSK candidates: supports analysis (evidence: `README.md`)
- Hash filtering → Rule input preparation: prepares rule input (evidence: `README.md`)
- Operator → Pot-file handling: handles pot files (evidence: `README.md`)
- Operator → PSK / PMK checks: checks keys (evidence: `README.md`)
- Operator → Wordlist candidates: generates candidates (evidence: `README.md`)
- Operator → Hash-to-capture: converts hashes (evidence: `README.md`)
- Operator → Capture uploader: submits captures (evidence: `README.md`)
- Capture uploader → wpa-sec service: uploads captures (evidence: `README.md`)
- Operator → Vendor lookup: looks up vendors (evidence: `README.md`)
- Capture converter → 802.11 parsing: uses protocol definitions (evidence: `hcxpcapngtool.c`)
- Capture converter → Capture I/O: uses capture I/O (evidence: `hcxpcapngtool.c`)
- Capture converter → Gzip support: uses compression (evidence: `hcxpcapngtool.c`)
- Capture converter → File helpers: uses file helpers (evidence: `hcxpcapngtool.c`)
- Capture converter → String helpers: uses string helpers (evidence: `hcxpcapngtool.c`)
- Capture converter → Byte operations: uses byte helpers (evidence: `hcxpcapngtool.c`)
- Capture converter → Hash operations: uses hash operations (evidence: `hcxpcapngtool.c`)
- Hash filtering → 802.11 parsing: uses protocol definitions (evidence: `hcxhashtool.c`)
- Hash filtering → File helpers: uses file helpers (evidence: `hcxhashtool.c`)
- Hash filtering → String helpers: uses string helpers (evidence: `hcxhashtool.c`)
- Hash filtering → Byte operations: uses byte helpers (evidence: `hcxhashtool.c`)
- Weak PSK candidates → Hash formats: uses hash formats (evidence: `hcxpsktool.c`)
- Weak PSK candidates → File helpers: uses file helpers (evidence: `hcxpsktool.c`)
- Weak PSK candidates → String helpers: uses string helpers (evidence: `hcxpsktool.c`)
- Hash-to-capture → Capture I/O: uses capture definitions (evidence: `hcxhash2cap.c`)
- Hash-to-capture → 802.11 parsing: uses protocol definitions (evidence: `hcxhash2cap.c`)
- Hash-to-capture → Hash formats: uses hash formats (evidence: `hcxhash2cap.c`)
- Hash-to-capture → File helpers: uses file helpers (evidence: `hcxhash2cap.c`)
