# sparkns/wfuzz architecture

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

- Interactive diagram: https://gitdiagram.com/sparkns/wfuzz
- Repository: https://github.com/sparkns/wfuzz

## Overview

##### Project type and purpose
- This is an open-source, modular web-fuzzing tool written in Python (“Wfuzz – The Web Fuzzer”).
- It’s invoked via CLI (wfuzz-cli) or GUI, provides payload injection into HTTP requests, and uses plugins to extend payload sources, encoding, iterations, scripts, and output printers.

##### File structure
- Top-level:
- setup.py, requirements.txt, Makefile, docs/ – packaging, build, documentation
- src/ – core implementation
- tests/ – automated tests
- wordlist/ – built-in payload dictionaries
- In src/wfuzz:
- core.py, api.py, facade.py – core fuzz engine, public API, façade layer
- externals/ – module manager (plugin loader), request/response abstractions, settings
- plugin_api/ – base classes and mixins for writing plugins
- plugins/encoders, iterators, payloads, printers, scripts – built-in plugin implementations
- ui/console (MVC parser, output), ui/gui (MVC pattern)
- myhttp.py – HTTP client wrapper
- options.py – CLI option definitions
- wfuzz.py, __main__.py – entry points
- Utility scripts at project root: wfencode, wfpayload, wxfuzz

##### README
- Describes the simple FUZZ keyword replacement concept
- Stresses modular, plugin-based design
- Highlights use cases: parameters, auth, forms, directories, headers
- Points to documentation for deeper architecture details

##### Important notes
- Be detailed: capture all plugin categories and external modules

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Entry Points
    subgraph "Entry Points"
        CLI_Script["wfuzz-cli / wfuzz"]:::frontend
        GUI_Script["wfuzz-gui"]:::frontend
    end

    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        subgraph "CLI Frontend"
            direction TB
            CLP["clparser.py"]:::frontend
            CMVC["mvc.py"]:::frontend
            COUT["output.py"]:::frontend
        end
        subgraph "GUI Frontend"
            direction TB
            GCTL["controller.py"]:::frontend
            GMOD["model.py"]:::frontend
            GUICT["guicontrols.py"]:::frontend
        end
    end

    %% Facade and Core
    FAC["Facade Layer\n(facade.py)"]:::core
    CORE["Core Fuzz Engine\n(core.py,\nfuzzobjects.py,\nfuzzqueues.py,\nmyqueues.py)"]:::core

    %% Plugin Manager, Settings & HTTP
    PM["Plugin Manager\n(loader.py,\nmodulefilter.py,\nplugin.py,\nregistrant.py)"]:::plugin
    SETT["Settings & Config\n(settings.py)"]:::external
    HTTP["HTTP Layer\n(myhttp.py,\nRequest.py,\nResponse.py,\nTextParser.py,\nVariables.py,\ncache.py)"]:::external

    %% Plugin API
    PA["Plugin API\n(base.py,\nmixins.py,\npayloadtools.py,\nurlutils.py)"]:::pluginapi

    %% Plugin Categories
    subgraph "Plugins"
        direction TB
        PL_PAY["Payload Plugins"]:::builtins
        PL_ITR["Iterator Plugins"]:::builtins
        PL_ENC["Encoder Plugins"]:::builtins
        PL_SCR["Script Plugins"]:::builtins
        PL_PRI["Printer Plugins"]:::builtins
        WL["Wordlist Directory"]:::external
    end

    %% Peripheral
    DOCS["Documentation\n(docs/)"]:::external
    TESTS["Tests\n(tests/)"]:::external

    %% Relationships
    CLI_Script -->|invokes| CLP
    GUI_Script -->|invokes| GCTL

    CLP -->|parse options| FAC
    CMVC --> FAC
    COUT --> FAC
    GCTL --> FAC
    GMOD --> FAC
    GUICT --> FAC

    FAC --> CORE
    FAC --> SETT
    FAC --> PM

    CORE --> PM
    CORE --> HTTP
    CORE --> SETT
    CORE --> PA

    PM --> PL_PAY
    PM --> PL_ITR
    PM --> PL_ENC
    PM --> PL_SCR
    PM --> PL_PRI

    PL_PAY --> WL

    CORE --> PL_PAY
    CORE --> PL_ITR
    CORE --> PL_ENC
    CORE --> PL_SCR
    CORE --> PL_PRI

    CORE --> COUT
    CORE --> GUICT

    DOCS -.-> CORE
    TESTS -.-> CORE

    %% Click Events
    click CLP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/console/clparser.py"
    click CMVC "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/console/mvc.py"
    click COUT "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/console/output.py"
    click GCTL "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/gui/controller.py"
    click GMOD "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/gui/model.py"
    click GUICT "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/ui/gui/guicontrols.py"
    click CLI_Script "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz-cli.py"
    click CLI_Script "https://github.com/sparkns/wfuzz/tree/master/wfuzz"
    click FAC "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/facade.py"
    click CORE "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/core.py"
    click PM "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/moduleman/loader.py"
    click SETT "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/settings/settings.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/myhttp.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/reqresp/Request.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/reqresp/Response.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/reqresp/TextParser.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/reqresp/Variables.py"
    click HTTP "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/externals/reqresp/cache.py"
    click PA "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugin_api/base.py"
    click PA "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugin_api/mixins.py"
    click PA "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugin_api/payloadtools.py"
    click PA "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugin_api/urlutils.py"
    click PL_PAY "https://github.com/sparkns/wfuzz/tree/master/src/wfuzz/plugins/payloads/"
    click WL "https://github.com/sparkns/wfuzz/tree/master/wordlist/"
    click PL_ITR "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugins/iterators/iterations.py"
    click PL_ENC "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugins/encoders/encoders.py"
    click PL_SCR "https://github.com/sparkns/wfuzz/tree/master/src/wfuzz/plugins/scripts/"
    click PL_PRI "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/plugins/printers/printers.py"
    click CORE "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/fuzzobjects.py"
    click CORE "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/fuzzqueues.py"
    click CORE "https://github.com/sparkns/wfuzz/blob/master/src/wfuzz/myqueues.py"
    click CLI_Script "https://github.com/sparkns/wfuzz/tree/master/src/wfuzz/ui/console/"
    click GCTL "https://github.com/sparkns/wfuzz/tree/master/src/wfuzz/ui/gui/"

    %% Styles
    classDef frontend fill:#E8F1FB,stroke:#1F77B4,color:#1F77B4
    classDef core fill:#FFE8B2,stroke:#FF8C00,color:#FF8C00
    classDef plugin fill:#E2F0D9,stroke:#2E8B57,color:#2E8B57
    classDef pluginapi fill:#F4E1F4,stroke:#800080,color:#800080
    classDef builtins fill:#FFF2CC,stroke:#DAA520,color:#DAA520
    classDef external fill:#F0F0F0,stroke:#A0A0A0,color:#606060
```
