# smilymouth/beeprotego architecture

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

- Interactive diagram: https://gitdiagram.com/smilymouth/beeprotego
- Repository: https://github.com/smilymouth/beeprotego

## Overview

Bee Protego is a Python desktop malware-detection toolkit. The user selects a file or directory in the Tkinter interface; the application runs scans, displays and logs findings, and can export reports. The excerpt shows YARA, string, hash-signature, PDF-export, and local Ollama-related code, while the README also describes multi-file scanning and modular YARA rules. BeeProtego.py is the sole substantial runtime module; omitted sections limit certainty about some scan dispatch and AI wiring.

Main entry points: [`BeeProtego.py`](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py) (File scanning), [`malware`](https://github.com/smilymouth/beeprotego/tree/main/malware) (YARA rule sets), [`full_sha256.txt`](https://github.com/smilymouth/beeprotego/blob/main/full_sha256.txt) (Local hash list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Tkinter application<br/>[BeeProtego.py]"]
end

subgraph group_scan["Scanning and detection"]
  node_scan_dispatch["Scan controls<br/>[BeeProtego.py]"]
  node_file_scan["File scanning<br/>[BeeProtego.py]"]
  node_directory_scan["Directory scanning<br/>[BeeProtego.py]"]
  node_string_rules["Suspicious strings<br/>[BeeProtego.py]"]
  node_yara["YARA matching<br/>[BeeProtego.py]"]
  node_yara_rules["YARA rule sets"]
  node_hash_scan["Hash signatures<br/>[BeeProtego.py]"]
  node_hash_db["Local hash list<br/>[full_sha256.txt]"]
  node_remote_sigs["Remote signatures"]
end

subgraph group_results["Results and reporting"]
  node_logs["Scan logs<br/>[BeeProtego.py]"]
  node_pdf["PDF export<br/>[BeeProtego.py]"]
  node_pdf_archive["Saved PDF reports<br/>[BeeProtego.py]"]
end

subgraph group_assist["Threat assistance"]
  node_ai_ui["AI chat interface<br/>[BeeProtego.py]"]
end

node_user(("User"))
node_file["Selected files"]
node_directory["Selected directory"]
node_ollama["Ollama service"]

node_user -->|"uses"| node_app
node_user -->|"selects"| node_file
node_user -->|"selects"| node_directory
node_app -->|"opens"| node_scan_dispatch
node_scan_dispatch -->|"starts"| node_directory_scan
node_scan_dispatch -.->|"starts"| node_file_scan
node_file_scan -.->|"checks"| node_string_rules
node_file_scan -.->|"checks"| node_yara
node_file_scan -.->|"checks"| node_hash_scan
node_directory_scan -->|"scans files"| node_file_scan
node_directory_scan -->|"checks"| node_string_rules
node_directory_scan -->|"checks"| node_yara
node_yara -.->|"matches rules"| node_yara_rules
node_hash_scan -->|"loads"| node_hash_db
node_hash_scan -->|"fetches"| node_remote_sigs
node_file_scan -.->|"records findings"| node_logs
node_directory_scan -->|"writes status"| node_logs
node_logs -->|"exports"| node_pdf
node_pdf -->|"writes report"| node_pdf_archive
node_user -->|"asks"| node_ai_ui
node_ai_ui -.->|"requests explanation"| node_ollama

click node_app "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_scan_dispatch "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_file_scan "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_directory_scan "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_string_rules "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_yara "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_yara_rules "https://github.com/smilymouth/beeprotego/tree/main/malware"
click node_hash_scan "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_hash_db "https://github.com/smilymouth/beeprotego/blob/main/full_sha256.txt"
click node_logs "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_pdf "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_pdf_archive "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py"
click node_ai_ui "https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.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_app,node_user toneBlue
class node_scan_dispatch,node_file_scan,node_directory_scan,node_string_rules,node_yara,node_yara_rules,node_hash_scan,node_hash_db,node_remote_sigs toneAmber
class node_logs,node_pdf,node_pdf_archive toneMint
class node_ai_ui toneRose
class node_file,node_directory,node_ollama toneIndigo
```

## Components

### Desktop interface

- [Tkinter application](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`

### Scanning and detection

- [Scan controls](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [File scanning](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [Directory scanning](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [Suspicious strings](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [YARA matching](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [YARA rule sets](https://github.com/smilymouth/beeprotego/tree/main/malware): `malware`
- [Hash signatures](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [Local hash list](https://github.com/smilymouth/beeprotego/blob/main/full_sha256.txt): `full_sha256.txt`
- **Remote signatures**

### Results and reporting

- [Scan logs](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [PDF export](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`
- [Saved PDF reports](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`

### Threat assistance

- [AI chat interface](https://github.com/smilymouth/beeprotego/blob/main/BeeProtego.py): `BeeProtego.py`

### Other components

- **User**
- **Selected files**
- **Selected directory**
- **Ollama service**

## Connections

- User → Tkinter application: uses (evidence: `README.md`)
- User → Selected files: selects
- User → Selected directory: selects
- Tkinter application → Scan controls: opens (evidence: `BeeProtego.py`)
- Scan controls → Directory scanning: starts (evidence: `BeeProtego.py`)
- Scan controls → File scanning: starts (evidence: `BeeProtego.py`)
- File scanning → Suspicious strings: checks (evidence: `BeeProtego.py`)
- File scanning → YARA matching: checks (evidence: `BeeProtego.py`)
- File scanning → Hash signatures: checks (evidence: `BeeProtego.py`)
- Directory scanning → File scanning: scans files (evidence: `BeeProtego.py`)
- Directory scanning → Suspicious strings: checks (evidence: `BeeProtego.py`)
- Directory scanning → YARA matching: checks (evidence: `BeeProtego.py`)
- YARA matching → YARA rule sets: matches rules
- Hash signatures → Local hash list: loads (evidence: `BeeProtego.py`)
- Hash signatures → Remote signatures: fetches (evidence: `BeeProtego.py`)
- File scanning → Scan logs: records findings (evidence: `BeeProtego.py`)
- Directory scanning → Scan logs: writes status (evidence: `BeeProtego.py`)
- Scan logs → PDF export: exports (evidence: `BeeProtego.py`)
- PDF export → Saved PDF reports: writes report (evidence: `BeeProtego.py`)
- User → AI chat interface: asks (evidence: `README.md`)
- AI chat interface → Ollama service: requests explanation
