# ab0lfazlrm/xui-finder architecture

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

- Interactive diagram: https://gitdiagram.com/ab0lfazlrm/xui-finder
- Repository: https://github.com/ab0lfazlrm/xui-finder

## Overview

XUI-Finder is a PyQt5 desktop tool for authorized, single-host TCP discovery and passive HTTP fingerprinting. The user configures a quick, custom, or full scan, starts or stops it, and receives live progress and fingerprinted open-port results; results can be searched and exported as JSON or TXT. The graph preserves the scan stages and result views documented by the README. Some MainWindow implementation is omitted, so only relationships visible in excerpts or explicitly documented are drawn.

Main entry points: [`gui/main_window.py`](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py) (Main window), [`core/scanner.py`](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/scanner.py) (Scan worker), [`main.py`](https://github.com/ab0lfazlrm/xui-finder/blob/main/main.py) (App entry), [`core/port_scanner.py`](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py) (TCP port scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_entry["App entry<br/>[main.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_scan_controls["Scan controls<br/>[main_window.py]"]
end

subgraph group_scan["Scan orchestration"]
  node_worker["Scan worker<br/>[scanner.py]"]
  node_target_validation["Target validation<br/>[scanner.py]"]
end

subgraph group_discovery["Discovery and fingerprinting"]
  node_port_selection["Port selection<br/>[port_scanner.py]"]
  node_tcp_scan["TCP port scan<br/>[port_scanner.py]"]
  node_tcp_probe["TCP probe<br/>[port_scanner.py]"]
  node_fingerprint["HTTP fingerprint<br/>[fingerprint.py]"]
end

subgraph group_results["Results and export"]
  node_result_state["Result state<br/>[main_window.py]"]
  node_results_table["Results table<br/>[components.py]"]
  node_result_filter["Result filter<br/>[main_window.py]"]
  node_export["JSON/TXT export<br/>[main_window.py]"]
end

node_user(("Authorized user"))
node_target_host(("Target host"))
node_http_service(("HTTP service"))
node_local_files[("Local files")]

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_window
node_user -->|"configures"| node_scan_controls
node_window -->|"displays"| node_scan_controls
node_window -->|"starts"| node_worker
node_worker -->|"scans ports"| node_tcp_scan
node_tcp_scan -->|"submits probes"| node_tcp_probe
node_tcp_probe -->|"connects to"| node_target_host
node_worker -->|"fingerprints open ports"| node_fingerprint
node_fingerprint -->|"sends GET"| node_http_service
node_worker -->|"emits results"| node_result_state
node_window -->|"collects results"| node_result_state
node_window -->|"adds results"| node_results_table
node_results_table -->|"filters display"| node_result_filter
node_window -->|"exports results"| node_export
node_export -->|"writes files"| node_local_files

click node_entry "https://github.com/ab0lfazlrm/xui-finder/blob/main/main.py"
click node_window "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py"
click node_scan_controls "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py"
click node_worker "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/scanner.py"
click node_target_validation "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/scanner.py"
click node_port_selection "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py"
click node_tcp_scan "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py"
click node_tcp_probe "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py"
click node_fingerprint "https://github.com/ab0lfazlrm/xui-finder/blob/main/core/fingerprint.py"
click node_result_state "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py"
click node_results_table "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/components.py"
click node_result_filter "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py"
click node_export "https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.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_entry,node_window,node_scan_controls,node_user toneBlue
class node_worker,node_target_validation,node_local_files toneAmber
class node_port_selection,node_tcp_scan,node_tcp_probe,node_fingerprint toneMint
class node_result_state,node_results_table,node_result_filter,node_export toneRose
class node_target_host,node_http_service toneIndigo
```

## Components

### Desktop interface

- [App entry](https://github.com/ab0lfazlrm/xui-finder/blob/main/main.py): `main.py`
- [Main window](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py): `gui/main_window.py`
- [Scan controls](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py): `gui/main_window.py`

### Scan orchestration

- [Scan worker](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/scanner.py): `core/scanner.py`
- [Target validation](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/scanner.py): `core/scanner.py`

### Discovery and fingerprinting

- [Port selection](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py): `core/port_scanner.py`
- [TCP port scan](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py): `core/port_scanner.py`
- [TCP probe](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/port_scanner.py): `core/port_scanner.py`
- [HTTP fingerprint](https://github.com/ab0lfazlrm/xui-finder/blob/main/core/fingerprint.py): `core/fingerprint.py`

### Results and export

- [Result state](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py): `gui/main_window.py`
- [Results table](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/components.py): `gui/components.py`
- [Result filter](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py): `gui/main_window.py`
- [JSON/TXT export](https://github.com/ab0lfazlrm/xui-finder/blob/main/gui/main_window.py): `gui/main_window.py`

### Other components

- **Authorized user**
- **Target host**
- **HTTP service**
- **Local files**

## Connections

- Authorized user → App entry: launches (evidence: `README.md`)
- App entry → Main window: creates (evidence: `main.py`)
- Authorized user → Scan controls: configures (evidence: `README.md`)
- Main window → Scan controls: displays (evidence: `gui/main_window.py`)
- Main window → Scan worker: starts (evidence: `gui/main_window.py`)
- Scan worker → TCP port scan: scans ports (evidence: `core/scanner.py`)
- TCP port scan → TCP probe: submits probes (evidence: `core/port_scanner.py`)
- TCP probe → Target host: connects to (evidence: `core/port_scanner.py`)
- Scan worker → HTTP fingerprint: fingerprints open ports (evidence: `core/scanner.py`)
- HTTP fingerprint → HTTP service: sends GET (evidence: `core/fingerprint.py`)
- Scan worker → Result state: emits results (evidence: `core/scanner.py`)
- Main window → Result state: collects results (evidence: `gui/main_window.py`)
- Main window → Results table: adds results (evidence: `gui/main_window.py`)
- Results table → Result filter: filters display (evidence: `gui/main_window.py`)
- Main window → JSON/TXT export: exports results (evidence: `gui/main_window.py`)
- JSON/TXT export → Local files: writes files (evidence: `gui/main_window.py`)
