# err0r-ica/scanter architecture

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

- Interactive diagram: https://gitdiagram.com/err0r-ica/scanter
- Repository: https://github.com/err0r-ica/scanter

## Overview

##### Main Components

a. Core System Components:
- Scanner Engine (core/scanner.py)
- Request Handler (core/requester.py)
- Report Generator (core/reporter.py)
- Configuration Manager (core/config.py)
- Logging System (core/logger.py)
- Encoding Service (core/encoder.py)

b. Scanning Modules:
- Dumper Module (modules/dumper.py)
- HTTP Response Analyzer (modules/httpre.py)
- Nmap Integration (modules/nmaper.py)
- Robot.txt Scanner (modules/robot.py)
- Custom Scanner Maker (modules/scant3r_maker.py)

##### Component Relationships

**[User Input/CLI] → [Configuration Manager]**
- ↓
**[Scanner Engine] ← → [Request Handler] → [Target Website]**
- ↓
**[Scanning Modules] → [Vulnerability Detectors]**
- ↓
**[Report Generator] → [Output/Results]**

##### Important Elements to Highlight

- Remote Code Execution (Linux)
- XSS Reflected
- Template Injection (Multiple engines)
- SQL Injection

b. Key Features:
- Multi-threading support
- Proxy integration
- Custom user-agent handling
- Cookie management
- Payload encoding

##### Architectural Patterns to Emphasize

- Modular Design: Show clear separation between core functionality and scanning modules
- Pipeline Architecture: Illustrate the flow from input → scanning → reporting
- Plugin System: Highlight the ability to add custom modules

##### Technical Details

- Input Methods:
- Single URL scanning
- Batch URL processing
- POST data handling
- Custom headers

- Configuration Options:
- Timeout settings
- Thread management
- Proxy settings
- Redirect handling

##### Integration Points

- External tool integration (Nmap)
- Points where custom modules can be plugged in
- HTTP(S) interaction points

Remember to indicate the cross-platform support (Linux, Android-Termux, Windows) in a notes section, as this affects deployment considerations.

This security-focused architecture should emphasize the tool's primary purpose of vulnerability detection while showing the extensible and modular nature of the system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        CLI[User Input/CLI]
    end

    subgraph Core
        Config["Configuration Manager"]:::core
        Scanner["Scanner Engine"]:::core
        Request["Request Handler"]:::core
        Report["Report Generator"]:::core
        Logger["Logging System"]:::core
        Encoder["Encoding Service"]:::core
    end

    subgraph "Scanning Modules"
        Dumper["Dumper Module"]:::module
        HTTPAnalyzer["HTTP Response Analyzer"]:::module
        Nmap["Nmap Integration"]:::module
        Robot["Robot.txt Scanner"]:::module
        CustomScanner["Custom Scanner Maker"]:::module
    end

    subgraph "Vulnerability Detection"
        RCE["Remote Code Execution"]:::vuln
        XSS["XSS Reflected"]:::vuln
        Template["Template Injection"]:::vuln
        SQL["SQL Injection"]:::vuln
    end

    subgraph External
        Target["Target Website"]:::external
    end

    subgraph "Configuration Options"
        Timeout["Timeout Settings"]:::config
        Threads["Thread Management"]:::config
        Proxy["Proxy Settings"]:::config
        Redirect["Redirect Handling"]:::config
    end

    CLI --> Config
    Config --> Scanner
    Scanner --> Request
    Request --> Target
    Scanner --> Dumper
    Scanner --> HTTPAnalyzer
    Scanner --> Nmap
    Scanner --> Robot
    Scanner --> CustomScanner
    
    Dumper & HTTPAnalyzer & Nmap & Robot & CustomScanner --> RCE & XSS & Template & SQL
    
    Scanner --> Report
    Logger --> Report
    Encoder --> Request

    Config --> Timeout & Threads & Proxy & Redirect

    %% Click Events
    click Scanner "https://github.com/Err0r-ICA/SCANter/blob/master/core/scanner.py"
    click Request "https://github.com/Err0r-ICA/SCANter/blob/master/core/requester.py"
    click Report "https://github.com/Err0r-ICA/SCANter/blob/master/core/reporter.py"
    click Config "https://github.com/Err0r-ICA/SCANter/blob/master/core/config.py"
    click Logger "https://github.com/Err0r-ICA/SCANter/blob/master/core/logger.py"
    click Encoder "https://github.com/Err0r-ICA/SCANter/blob/master/core/encoder.py"
    click Dumper "https://github.com/Err0r-ICA/SCANter/blob/master/modules/dumper.py"
    click HTTPAnalyzer "https://github.com/Err0r-ICA/SCANter/blob/master/modules/httpre.py"
    click Nmap "https://github.com/Err0r-ICA/SCANter/blob/master/modules/nmaper.py"
    click Robot "https://github.com/Err0r-ICA/SCANter/blob/master/modules/robot.py"
    click CustomScanner "https://github.com/Err0r-ICA/SCANter/blob/master/modules/scant3r_maker.py"

    %% Styling
    classDef core fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef module fill:#90EE90,stroke:#333,stroke-width:2px
    classDef vuln fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef external fill:#FFA500,stroke:#333,stroke-width:2px
    classDef config fill:#E6E6FA,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Scanning Modules"]:::module
        L3["Vulnerability Types"]:::vuln
        L4["External Systems"]:::external
        L5["Configuration"]:::config
    end
```
