# ernw/dizzy architecture

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

- Interactive diagram: https://gitdiagram.com/ernw/dizzy
- Repository: https://github.com/ernw/dizzy

## Overview

##### Main Components Identification
The system should be represented with these key components:

a) Core Engine Components:
- Fuzzing Engine (dizz.py, dizz_state.py)
- Interaction Engine (interaction.py, interaction_state.py)
- Job Controller (job.py)
- Configuration Manager (config.py)

b) Module System:
- Module Loader (module.py)
- Library Manager (library.py)

c) Functional Components:
- Encodings System (/encodings)
- Functions System (/functions)
- Objects System (/objects)
- Session Handlers (/session)
- Probes System (/probe)

##### Component Relationships

**[Job Controller]**

- ► [Configuration Manager]

- ► [Fuzzing Engine] ◄─────────┐

- ▼                      │
- [Objects System]            │

- ▼                      │
- [Functions System]          │

- ► [Interaction Engine] ──────┘

- ▼
- [Session Handlers]

- ▼
- ► [Probes System]

**[Module Loader] ───► [Library Manager]**

##### Component Details

Annotations for each major component:

a) Core Engine:
- Fuzzing Engine: Handles packet mutation and fuzzing logic
- Interaction Engine: Manages state-full fuzzing sequences
- Job Controller: Orchestrates fuzzing jobs and workflow

b) Module System:
- Module Loader: Handles dynamic loading of fuzzing modules
- Library Manager: Manages shared resources and dependencies

c) I/O Components:
- Session Handlers: Multiple protocol support (TCP, UDP, HTTP, etc.)
- Probes: Target monitoring and availability checking

##### Implementation Notes

Technical details:
- Python-based implementation
- Modular architecture
- Support for both state-full and state-less fuzzing
- Multiple protocol support
- Extensible plugin system

- The central role of the Job Controller
- The separation between fuzzing and interaction engines
- The modularity of the session and probe systems
- The extensibility through the module system

This design captures the framework's ability to handle both state-full and state-less fuzzing while maintaining a clean separation of concerns between different components.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Engine Components
    JC[Job Controller]:::core
    click JC "https://github.com/ernw/dizzy/blob/master/dizzy/job.py"
    CM[Configuration Manager]:::core
    click CM "https://github.com/ernw/dizzy/blob/master/dizzy/config.py"
    FE[Fuzzing Engine]:::core
    click FE "https://github.com/ernw/dizzy/blob/master/dizzy/dizz.py"
    IE[Interaction Engine]:::core
    click IE "https://github.com/ernw/dizzy/blob/master/dizzy/interaction.py"

    %% Module System
    ML[Module Loader]:::module
    click ML "https://github.com/ernw/dizzy/blob/master/dizzy/module.py"
    LM[Library Manager]:::module
    click LM "https://github.com/ernw/dizzy/blob/master/dizzy/library.py"

    %% Functional Components
    ES[Encodings System]:::functional
    click ES "https://github.com/ernw/dizzy/tree/master/dizzy/encodings/"
    FS[Functions System]:::functional
    click FS "https://github.com/ernw/dizzy/tree/master/dizzy/functions/"
    OS[Objects System]:::functional
    click OS "https://github.com/ernw/dizzy/tree/master/dizzy/objects/"
    SH[Session Handlers]:::functional
    click SH "https://github.com/ernw/dizzy/tree/master/dizzy/session/"
    PS[Probes System]:::functional
    click PS "https://github.com/ernw/dizzy/tree/master/dizzy/probe/"

    %% Additional Components
    WI[Wireshark Integration]:::external
    click WI "https://github.com/ernw/dizzy/blob/master/wireshark/dizzy.lua"
    ME[Module Example]:::external
    click ME "https://github.com/ernw/dizzy/tree/master/modules_src/demo/"
    SL[Standard Library]:::external
    click SL "https://github.com/ernw/dizzy/blob/master/lib/std_string_lib.txt"

    %% Relationships
    JC --> CM
    JC --> FE
    JC --> IE
    JC --> PS
    
    FE --> OS
    OS --> FS
    
    IE --> SH
    IE --> FE
    
    ML --> LM
    
    %% Module Integration
    LM --> SL
    ML --> ME
    SH --> WI

    %% Styles
    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef module fill:#57a773,stroke:#57a773,color:#fff
    classDef functional fill:#ff8c42,stroke:#ff8c42,color:#fff
    classDef external fill:#808080,stroke:#808080,color:#fff

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Module System]:::module
        L3[Functional Components]:::functional
        L4[External Components]:::external
    end
```
