# king04aman/keylogger architecture

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

- Interactive diagram: https://gitdiagram.com/king04aman/keylogger
- Repository: https://github.com/king04aman/keylogger

## Overview

Advance Keylogger is a Windows-oriented monitoring script that captures keystrokes and other device data, stores files locally, and sends selected files by email. Its main workflow is implemented as top-level calls in `main.py`, followed by timed keyboard capture, repeated collection, attempted encryption, and cleanup. The repository also provides separate key-generation and decryption scripts. The README discusses broader keylogger capabilities, but does not establish additional implementations here. Evidence is limited to the README and the three excerpted source files.

Main entry points: [`main.py`](https://github.com/king04aman/keylogger/blob/main/main.py) (Local log files), [`Cryptography/DecryptFile.py`](https://github.com/king04aman/keylogger/blob/main/Cryptography/DecryptFile.py) (File decryption), [`Cryptography/GenerateKey.py`](https://github.com/king04aman/keylogger/blob/main/Cryptography/GenerateKey.py) (Key generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Data capture"]
  node_system_info["System information<br/>[main.py]"]
  node_clipboard["Clipboard capture<br/>[main.py]"]
  node_microphone["Microphone recording<br/>[main.py]"]
  node_screenshots["Screen capture<br/>[main.py]"]
  node_webcam["Webcam capture<br/>[main.py]"]
  node_keylogger["Keystroke logging<br/>[main.py]"]
end

subgraph group_processing["Storage and cryptography"]
  node_local_files[("Local log files<br/>[main.py]")]
  node_key_generation["Key generation<br/>[GenerateKey.py]"]
  node_encryption["Log encryption<br/>[main.py]"]
  node_decryption["File decryption<br/>[DecryptFile.py]"]
  node_cleanup["File cleanup<br/>[main.py]"]
end

subgraph group_delivery["Network delivery"]
  node_email_delivery["Email delivery<br/>[main.py]"]
  node_smtp["SMTP email service"]
  node_ip_lookup["Public IP lookup"]
end

node_operator(("Device user"))
node_keyboard(("Keyboard input"))

node_operator -->|"runs script"| node_keylogger
node_keyboard -->|"provides keystrokes"| node_keylogger
node_keylogger -->|"writes logs"| node_local_files
node_system_info -->|"writes details"| node_local_files
node_system_info -->|"queries public IP"| node_ip_lookup
node_clipboard -->|"writes contents"| node_local_files
node_microphone -->|"writes recording"| node_local_files
node_screenshots -->|"saves image"| node_local_files
node_webcam -->|"saves image"| node_local_files
node_keylogger -->|"repeats capture"| node_screenshots
node_keylogger -->|"repeats capture"| node_webcam
node_keylogger -->|"repeats capture"| node_clipboard
node_keylogger -->|"sends captured images"| node_email_delivery
node_local_files -->|"reads log files"| node_encryption
node_key_generation -->|"provides configured key"| node_encryption
node_encryption -->|"writes encrypted logs"| node_local_files
node_encryption -->|"sends encrypted logs"| node_email_delivery
node_local_files -->|"reads encrypted files"| node_decryption
node_decryption -->|"appends decrypted data"| node_local_files
node_email_delivery -->|"sends mail"| node_smtp
node_cleanup -->|"deletes files"| node_local_files

click node_system_info "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_clipboard "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_microphone "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_screenshots "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_webcam "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_keylogger "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_local_files "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_key_generation "https://github.com/king04aman/keylogger/blob/main/Cryptography/GenerateKey.py"
click node_encryption "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_decryption "https://github.com/king04aman/keylogger/blob/main/Cryptography/DecryptFile.py"
click node_cleanup "https://github.com/king04aman/keylogger/blob/main/main.py"
click node_email_delivery "https://github.com/king04aman/keylogger/blob/main/main.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_system_info,node_clipboard,node_microphone,node_screenshots,node_webcam,node_keylogger,node_operator toneBlue
class node_local_files,node_key_generation,node_encryption,node_decryption,node_cleanup toneAmber
class node_email_delivery,node_smtp,node_ip_lookup toneMint
class node_keyboard toneIndigo
```

## Components

### Data capture

- [System information](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Clipboard capture](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Microphone recording](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Screen capture](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Webcam capture](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Keystroke logging](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`

### Storage and cryptography

- [Local log files](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [Key generation](https://github.com/king04aman/keylogger/blob/main/Cryptography/GenerateKey.py): `Cryptography/GenerateKey.py`
- [Log encryption](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- [File decryption](https://github.com/king04aman/keylogger/blob/main/Cryptography/DecryptFile.py): `Cryptography/DecryptFile.py`
- [File cleanup](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`

### Network delivery

- [Email delivery](https://github.com/king04aman/keylogger/blob/main/main.py): `main.py`
- **SMTP email service**
- **Public IP lookup**

### Other components

- **Device user**
- **Keyboard input**

## Connections

- Device user → Keystroke logging: runs script (evidence: `main.py`)
- Keyboard input → Keystroke logging: provides keystrokes (evidence: `main.py`)
- Keystroke logging → Local log files: writes logs (evidence: `main.py`)
- System information → Local log files: writes details (evidence: `main.py`)
- System information → Public IP lookup: queries public IP (evidence: `main.py`)
- Clipboard capture → Local log files: writes contents (evidence: `main.py`)
- Microphone recording → Local log files: writes recording (evidence: `main.py`)
- Screen capture → Local log files: saves image (evidence: `main.py`)
- Webcam capture → Local log files: saves image (evidence: `main.py`)
- Keystroke logging → Screen capture: repeats capture (evidence: `main.py`)
- Keystroke logging → Webcam capture: repeats capture (evidence: `main.py`)
- Keystroke logging → Clipboard capture: repeats capture (evidence: `main.py`)
- Keystroke logging → Email delivery: sends captured images (evidence: `main.py`)
- Local log files → Log encryption: reads log files (evidence: `main.py`)
- Key generation → Log encryption: provides configured key (evidence: `main.py`)
- Log encryption → Local log files: writes encrypted logs (evidence: `main.py`)
- Log encryption → Email delivery: sends encrypted logs (evidence: `main.py`)
- Local log files → File decryption: reads encrypted files (evidence: `Cryptography/DecryptFile.py`)
- File decryption → Local log files: appends decrypted data (evidence: `Cryptography/DecryptFile.py`)
- Email delivery → SMTP email service: sends mail (evidence: `main.py`)
- File cleanup → Local log files: deletes files (evidence: `main.py`)
