# bitbrute/evillimiter architecture

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

- Interactive diagram: https://gitdiagram.com/bitbrute/evillimiter
- Repository: https://github.com/bitbrute/evillimiter

## Overview

##### Project Type and Purpose
- This is a Python-based command-line tool for network manipulation that uses ARP spoofing and traffic shaping.
- Its purpose is to scan the local network, monitor device bandwidth usage, and apply limitations or blocks on network traffic.

##### Break Down the File Structure into Main Architectural Components
- Executable/Entry Point:
- The top-level bin directory (with the executable “evillimiter”) and the main module in evillimiter/evillimiter.py indicate where the tool starts.
- Console/UI Layer:
- Components in evillimiter/console (banner.py, chart.py, io.py, shell.py) manage user interactions, output formatting, and input handling.
- Menu and Command Parsing:
- The evillimiter/menus folder (main_menu.py, menu.py, parser.py) handles user commands and navigation through the tool’s functionalities.
- Networking Layer:
- The evillimiter/networking folder contains modules (host.py, limit.py, monitor.py, scan.py, spoof.py, watch.py, and utils.py) dedicated to network operations (e.g., scanning hosts, ARP spoofing, traffic limiting, monitoring, and analysis).
- Common Utilities:
- The evillimiter/common directory includes shared code like global configurations or constants (globals.py).

##### Relationships and Data Flow
- The entry point (the executable and main module) initializes the application and routes to the UI layer (console and menus).
- The UI components receive user commands, which are parsed by the menus module.
- Callbacks from the menus/command parser invoke the appropriate functions in the networking layer to perform operations (scanning, spoofing, limiting, etc.).
- There is a clear separation between the user interaction (CLI, menus) and the core functionality (network operations), reflecting a layered design.

##### Architectural Patterns and Design Principles
- Modular Design: Each directory (console, menus, networking) encapsulates a specific responsibility.
- Separation of Concerns: The tool clearly distinguishes between user interface, command parsing, and network actions.
- Reusability & Maintainability: Utilities and common configurations are centralized in a common module.

##### Technologies/Frameworks
- Python 3 is the platform.
- The tool leverages system-level network manipulation (ARP spoofing, traffic shaping) through its networking modules (which likely interface with external utilities such as iptables or tc on Linux).
- Linux is a prerequisite as noted in the README.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Point
    EP1("Executable: evillimiter"):::entry
    EP2("Main Module: evillimiter.py"):::entry

    %% Console/UI Layer
    subgraph "Console/UI Layer"
        CONSOLE1("banner.py"):::console
        CONSOLE2("chart.py"):::console
        CONSOLE3("io.py"):::console
        CONSOLE4("shell.py"):::console
    end

    %% Menus and Command Parsing
    subgraph "Menus/Command Parsing"
        MENUS1("main_menu.py"):::menus
        MENUS2("menu.py"):::menus
        MENUS3("parser.py"):::menus
    end

    %% Networking Layer
    subgraph "Networking Layer"
        NET1("scan.py"):::networking
        NET2("spoof.py"):::networking
        NET3("limit.py"):::networking
        NET4("monitor.py"):::networking
        NET5("watch.py"):::networking
        NET6("host.py"):::networking
        NET7("utils.py"):::networking
    end

    %% Common Utilities
    COMMON("globals.py"):::commonUtilities

    %% External Dependencies
    EXTERNAL("Linux Networking Stack (iptables,tc)"):::external

    %% Connections
    EP1 -->|"starts"| EP2
    EP2 -->|"initialize_UI"| CONSOLE1
    EP2 -->|"initialize_UI"| CONSOLE2
    EP2 -->|"initialize_UI"| CONSOLE3
    EP2 -->|"initialize_UI"| CONSOLE4

    CONSOLE4 -->|"receive_commands"| MENUS3
    MENUS3 -->|"parse_command"| MENUS1
    MENUS3 -->|"parse_command"| MENUS2

    MENUS3 -->|"invoke_network_ops"| NET1
    MENUS3 -->|"invoke_network_ops"| NET2
    MENUS3 -->|"invoke_network_ops"| NET3
    MENUS3 -->|"invoke_network_ops"| NET4
    MENUS3 -->|"invoke_network_ops"| NET5
    MENUS3 -->|"invoke_network_ops"| NET6
    MENUS3 -->|"invoke_network_ops"| NET7

    NET1 -->|"scan_results"| CONSOLE3
    NET2 -->|"action_feedback"| CONSOLE3
    NET3 -->|"action_feedback"| CONSOLE3
    NET4 -->|"monitor_data"| CONSOLE3
    NET5 -->|"monitor_data"| CONSOLE3

    NET2 -->|"ARP_spoofing"| EXTERNAL
    NET3 -->|"traffic_shaping"| EXTERNAL

    EP2 -->|"uses_globals"| COMMON
    CONSOLE1 ---|"uses_globals"| COMMON
    MENUS1 ---|"uses_globals"| COMMON
    NET1 ---|"uses_globals"| COMMON
    NET2 ---|"uses_globals"| COMMON
    NET3 ---|"uses_globals"| COMMON
    NET4 ---|"uses_globals"| COMMON
    NET5 ---|"uses_globals"| COMMON
    NET6 ---|"uses_globals"| COMMON
    NET7 ---|"uses_globals"| COMMON

    %% Click Events
    click EP1 "https://github.com/bitbrute/evillimiter/tree/master/bin/evillimiter"
    click EP2 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/evillimiter.py"
    click CONSOLE1 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/console/banner.py"
    click CONSOLE2 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/console/chart.py"
    click CONSOLE3 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/console/io.py"
    click CONSOLE4 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/console/shell.py"
    click MENUS1 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/menus/main_menu.py"
    click MENUS2 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/menus/menu.py"
    click MENUS3 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/menus/parser.py"
    click NET1 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/scan.py"
    click NET2 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/spoof.py"
    click NET3 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/limit.py"
    click NET4 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/monitor.py"
    click NET5 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/watch.py"
    click NET6 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/host.py"
    click NET7 "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/networking/utils.py"
    click COMMON "https://github.com/bitbrute/evillimiter/blob/master/evillimiter/common/globals.py"

    %% Styles
    classDef entry fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef console fill:#cce5ff,stroke:#003366,stroke-width:2px;
    classDef menus fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef networking fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef commonUtilities fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
    classDef external fill:#fff3cd,stroke:#856404,stroke-width:2px;
```
