# drcrypterdotru/smtp-heist architecture

> Architecture diagram of the GitHub repository drcrypterdotru/smtp-heist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/drcrypterdotru/smtp-heist
- Repository: https://github.com/drcrypterdotru/smtp-heist

## Overview

#### Purpose and Entry Point
SMTP Heist is a desktop PyQt6 application for authorized SMTP security testing. It loads credential/host combinations, attempts SMTP authentication against configured or discovered hosts/ports, tracks outcomes, and can report results to Telegram. The executable entry point is `Main.py`; Python dependencies are declared in `requirements.txt`.

#### GUI Application Shell
The application is implemented as a single primary Python module, so UI construction, settings, orchestration, and result presentation are likely colocated rather than separated into packages. The PyQt6 runtime provides the desktop dashboard, real-time status display, configuration controls, and HTML-letter preview described by the README.
- `Main.py`
- `requirements.txt`

#### Input and Target Modeling
The main intake boundary is a user-selected text file containing either explicit targets (`HOST|PORT|EMAIL|PASSWORD`) or credentials (`EMAIL|PASSWORD`). Explicit records can be tested directly; credential-only records require the configured SMTP-host workflow or hostname discovery. Invalid/empty input is skipped.
- `Main.py`
- `Sub_SMTP.txt`

#### SMTP Host Discovery and Configuration
The tool supports two target-selection paths: user-provided SMTP hosts/ports and discovery based on email domains plus SMTP subdomain candidates. `Sub_SMTP.txt` is the repository’s supplied candidate list for names such as `smtp`, `smtpout`, and `webmail`; it forms an important boundary between credential parsing and network authentication attempts.
- `Main.py`
- `Sub_SMTP.txt`

#### Authentication Execution and Result Classification
The core execution stage performs SMTP connectivity/authentication attempts for each parsed target/credential combination. It classifies attempts into successful (“Good”) and unsuccessful (“Bad”/failed) outcomes, while maintaining task, remaining-work, and progress counters for the UI. This is the central network-facing and authorization-sensitive boundary.
- `Main.py`

#### Reporting and Output Flow
Execution results flow back to the GUI for real-time updates and are retained as good/bad result sets. The README identifies Telegram reporting as an external notification path; report delivery is therefore a separate outbound-service boundary from SMTP testing. Custom HTML letter preview and configurable success-result behavior are also exposed through the UI.
- `Main.py`

#### Runtime and Distribution
The project runs on Python with PyQt6 and dependencies installed from `requirements.txt`; it is launched with `python3 Main.py`. The repository also documents distribution as a packaged executable via releases, but packaging artifacts are not present in the tree.
- `Main.py`
- `requirements.txt`
- `README.md`

Main entry points: [`Main.py`](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py) (PyQt6 Dashboard), [`requirements.txt`](https://github.com/drcrypterdotru/smtp-heist/blob/main/requirements.txt) (Python Dependencies), [`Sub_SMTP.txt`](https://github.com/drcrypterdotru/smtp-heist/blob/main/Sub_SMTP.txt) (SMTP Candidate List)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Application"]
  node_entry["Application Entry<br/>Python entry point<br/>[Main.py]"]
  node_gui["PyQt6 Dashboard<br/>desktop UI<br/>[Main.py]"]
  node_settings["Test Settings<br/>UI configuration<br/>[Main.py]"]
  node_html_preview["HTML Letter Preview<br/>UI preview<br/>[Main.py]"]
  node_dependencies["Python Dependencies<br/>runtime manifest<br/>[requirements.txt]"]
end

subgraph group_inputs["Inputs &amp; Targeting"]
  node_input_file["Target List<br/>user-selected text file"]
  node_parser["Record Parser<br/>input parsing<br/>[Main.py]"]
  node_smtp_candidates["SMTP Candidate List<br/>host dictionary<br/>[Sub_SMTP.txt]"]
  node_target_resolution["Target Resolution<br/>host selection<br/>[Main.py]"]
end

subgraph group_execution["SMTP Execution"]
  node_attempt_queue["Authentication Work<br/>attempt workload<br/>[Main.py]"]
  node_smtp_auth{{"SMTP Authentication<br/>network execution<br/>[Main.py]"}}
  node_smtp_endpoints{{"SMTP Servers<br/>external SMTP service"}}
end

subgraph group_reporting["Results &amp; Reporting"]
  node_classification["Outcome Classification<br/>result processing<br/>[Main.py]"]
  node_results[("Good / Bad Results<br/>result sets<br/>[Main.py]")]
  node_status["Progress &amp; Status<br/>live UI state<br/>[Main.py]"]
  node_telegram{{"Telegram Reporting<br/>external notification<br/>[Main.py]"}}
end

node_entry -->|"starts"| node_gui
node_dependencies -.->|"runtime packages"| node_entry
node_gui -->|"configures"| node_settings
node_gui -->|"selects"| node_input_file
node_input_file -->|"records"| node_parser
node_parser -->|"credentials and targets"| node_target_resolution
node_settings -->|"configured host/port"| node_target_resolution
node_smtp_candidates -->|"discovery candidates"| node_target_resolution
node_target_resolution -->|"builds attempts"| node_attempt_queue
node_attempt_queue -->|"executes"| node_smtp_auth
node_smtp_auth -->|"connects and authenticates"| node_smtp_endpoints
node_smtp_auth -->|"attempt outcome"| node_classification
node_classification -->|"stores good or bad"| node_results
node_classification -->|"updates counters"| node_status
node_status -->|"live display"| node_gui
node_results -->|"configured report"| node_telegram
node_settings -->|"letter content"| node_html_preview
node_html_preview -->|"renders in"| node_gui

click node_entry "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_gui "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_settings "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_parser "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_smtp_candidates "https://github.com/drcrypterdotru/smtp-heist/blob/main/Sub_SMTP.txt"
click node_target_resolution "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_attempt_queue "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_smtp_auth "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_classification "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_results "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_status "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_telegram "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_html_preview "https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py"
click node_dependencies "https://github.com/drcrypterdotru/smtp-heist/blob/main/requirements.txt"

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_gui,node_settings,node_html_preview,node_dependencies toneBlue
class node_input_file,node_parser,node_smtp_candidates,node_target_resolution toneAmber
class node_attempt_queue,node_smtp_auth,node_smtp_endpoints toneMint
class node_classification,node_results,node_status,node_telegram toneRose
```

## Components

### Desktop Application

- [Application Entry](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): Python entry point · `Main.py`
- [PyQt6 Dashboard](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): desktop UI · Controls execution and presents live status. · `Main.py`
- [Test Settings](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): UI configuration · Captures SMTP host, port, and result behavior settings. · `Main.py`
- [HTML Letter Preview](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): UI preview · `Main.py`
- [Python Dependencies](https://github.com/drcrypterdotru/smtp-heist/blob/main/requirements.txt): runtime manifest · Declares PyQt6 and other required packages. · `requirements.txt`

### Inputs & Targeting

- **Target List**: user-selected text file · Contains explicit targets or email/password credentials.
- [Record Parser](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): input parsing · Skips invalid or empty records. · `Main.py`
- [SMTP Candidate List](https://github.com/drcrypterdotru/smtp-heist/blob/main/Sub_SMTP.txt): host dictionary · Supplies SMTP subdomain candidates for discovery. · `Sub_SMTP.txt`
- [Target Resolution](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): host selection · Uses explicit targets, configured hosts, or domain discovery. · `Main.py`

### SMTP Execution

- [Authentication Work](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): attempt workload · Credential and host/port combinations awaiting testing. · `Main.py`
- [SMTP Authentication](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): network execution · Connects to SMTP endpoints and attempts authentication. · `Main.py`
- **SMTP Servers**: external SMTP service

### Results & Reporting

- [Outcome Classification](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): result processing · Separates successful Good results from failed Bad results. · `Main.py`
- [Good / Bad Results](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): result sets · Retains classified authentication outcomes. · `Main.py`
- [Progress & Status](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): live UI state · Tracks tasks, remaining work, and progress counters. · `Main.py`
- [Telegram Reporting](https://github.com/drcrypterdotru/smtp-heist/blob/main/Main.py): external notification · Sends configured result reports outbound. · `Main.py`

## Connections

- Application Entry → PyQt6 Dashboard: starts
- Python Dependencies → Application Entry: runtime packages
- PyQt6 Dashboard → Test Settings: configures
- PyQt6 Dashboard → Target List: selects
- Target List → Record Parser: records
- Record Parser → Target Resolution: credentials and targets
- Test Settings → Target Resolution: configured host/port
- SMTP Candidate List → Target Resolution: discovery candidates
- Target Resolution → Authentication Work: builds attempts
- Authentication Work → SMTP Authentication: executes
- SMTP Authentication → SMTP Servers: connects and authenticates
- SMTP Authentication → Outcome Classification: attempt outcome
- Outcome Classification → Good / Bad Results: stores good or bad
- Outcome Classification → Progress & Status: updates counters
- Progress & Status → PyQt6 Dashboard: live display
- Good / Bad Results → Telegram Reporting: configured report
- Test Settings → HTML Letter Preview: letter content
- HTML Letter Preview → PyQt6 Dashboard: renders in
