# rk-000/log4j_scan_advance architecture

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

- Interactive diagram: https://gitdiagram.com/rk-000/log4j_scan_advance
- Repository: https://github.com/rk-000/log4j_scan_advance

## Overview

log4j-scan is a single-file command-line scanner for detecting Log4j vulnerabilities. Users provide one or more URLs; the scanner builds fuzzing payloads, sends HTTP probes, then checks DNS out-of-band callbacks to validate findings. The README also documents header, form/JSON, WAF-bypass, and CVE-2021-45046 scan modes. The runtime is largely in one script, so nodes represent responsibilities within that file rather than separate modules. Relationships for some modes are documented in the README; unsampled implementation details are not inferred.

Main entry points: [`log4j-scan.py`](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py) (Scan coordinator), [`headers.txt`](https://github.com/rk-000/log4j_scan_advance/blob/main/headers.txt) (Header lists), [`headers-large.txt`](https://github.com/rk-000/log4j_scan_advance/blob/main/headers-large.txt) (Large header list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Scan orchestration"]
  node_cli["CLI options<br/>[log4j-scan.py]"]
  node_target_selection["URL selection<br/>[log4j-scan.py]"]
  node_scan_coordinator["Scan coordinator<br/>[log4j-scan.py]"]
end

subgraph group_probes["Probe generation"]
  node_header_list["Header lists<br/>[headers.txt]"]
  node_large_header_list["Large header list<br/>[headers-large.txt]"]
  node_payload_modes["Payload modes<br/>[log4j-scan.py]"]
  node_header_fuzzing["Header fuzzing<br/>[log4j-scan.py]"]
  node_body_fuzzing["Body fuzzing<br/>[log4j-scan.py]"]
  node_http_dispatch["HTTP dispatch<br/>[log4j-scan.py]"]
end

subgraph group_verification["Callback verification"]
  node_callback_client["DNS callback client<br/>[log4j-scan.py]"]
  node_callback_results["Callback results<br/>[log4j-scan.py]"]
end

node_operator(("Security team"))
node_target(("Target hosts"))
node_callback_service["DNS callback service"]

node_operator -->|"sets options"| node_cli
node_cli -->|"selects URLs"| node_target_selection
node_target_selection -->|"provides URLs"| node_scan_coordinator
node_scan_coordinator -->|"selects probes"| node_payload_modes
node_header_list -.->|"supplies headers"| node_header_fuzzing
node_large_header_list -.->|"supplies headers"| node_header_fuzzing
node_payload_modes -.->|"generates probes"| node_header_fuzzing
node_payload_modes -.->|"generates probes"| node_body_fuzzing
node_scan_coordinator -->|"calls scan"| node_http_dispatch
node_header_fuzzing -.->|"provides headers"| node_http_dispatch
node_body_fuzzing -->|"provides bodies"| node_http_dispatch
node_http_dispatch -->|"sends requests"| node_target
node_callback_client -->|"registers and polls"| node_callback_service
node_scan_coordinator -.->|"checks callbacks"| node_callback_client
node_callback_client -->|"returns records"| node_callback_results

click node_cli "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_target_selection "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_scan_coordinator "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_header_list "https://github.com/rk-000/log4j_scan_advance/blob/main/headers.txt"
click node_large_header_list "https://github.com/rk-000/log4j_scan_advance/blob/main/headers-large.txt"
click node_payload_modes "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_header_fuzzing "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_body_fuzzing "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_http_dispatch "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_callback_client "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"
click node_callback_results "https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py"

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_cli,node_target_selection,node_scan_coordinator toneBlue
class node_header_list,node_large_header_list,node_payload_modes,node_header_fuzzing,node_body_fuzzing,node_http_dispatch toneAmber
class node_callback_client,node_callback_results toneMint
class node_operator,node_target,node_callback_service toneIndigo
```

## Components

### Scan orchestration

- [CLI options](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [URL selection](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [Scan coordinator](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`

### Probe generation

- [Header lists](https://github.com/rk-000/log4j_scan_advance/blob/main/headers.txt): `headers.txt`
- [Large header list](https://github.com/rk-000/log4j_scan_advance/blob/main/headers-large.txt): `headers-large.txt`
- [Payload modes](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [Header fuzzing](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [Body fuzzing](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [HTTP dispatch](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`

### Callback verification

- [DNS callback client](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`
- [Callback results](https://github.com/rk-000/log4j_scan_advance/blob/main/log4j-scan.py): `log4j-scan.py`

### Other components

- **Security team**
- **Target hosts**
- **DNS callback service**

## Connections

- Security team → CLI options: sets options (evidence: `README.md`)
- CLI options → URL selection: selects URLs (evidence: `log4j-scan.py`)
- URL selection → Scan coordinator: provides URLs (evidence: `log4j-scan.py`)
- Scan coordinator → Payload modes: selects probes (evidence: `log4j-scan.py`)
- Header lists → Header fuzzing: supplies headers (evidence: `README.md`)
- Large header list → Header fuzzing: supplies headers (evidence: `README.md`)
- Payload modes → Header fuzzing: generates probes (evidence: `README.md`)
- Payload modes → Body fuzzing: generates probes (evidence: `README.md`)
- Scan coordinator → HTTP dispatch: calls scan (evidence: `log4j-scan.py`)
- Header fuzzing → HTTP dispatch: provides headers (evidence: `README.md`)
- Body fuzzing → HTTP dispatch: provides bodies (evidence: `log4j-scan.py`)
- HTTP dispatch → Target hosts: sends requests (evidence: `log4j-scan.py`)
- DNS callback client → DNS callback service: registers and polls (evidence: `log4j-scan.py`)
- Scan coordinator → DNS callback client: checks callbacks (evidence: `README.md`)
- DNS callback client → Callback results: returns records (evidence: `log4j-scan.py`)
