# th3gr1ff/scambait architecture

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

- Interactive diagram: https://gitdiagram.com/th3gr1ff/scambait
- Repository: https://github.com/th3gr1ff/scambait

## Overview

scambait-skill is a Claude Skill backed by local Python scripts that runs a one-target scam-reporting engagement: send a persona-based opener, report the domain to its registrar, monitor for the scam pitch, report the pitch to Zoho, then check MX records at 24 and 48 hours. The README documents this overall sequence; the sampled scripts show the mail, evidence, and state-handling details. SKILL.md and several documented subsystems were not sampled, so their internal behavior is not expanded here.

Main entry points: [`scripts/send_zoho_abuse.py`](https://github.com/th3gr1ff/scambait/blob/main/scripts/send_zoho_abuse.py) (Zoho abuse report), [`SKILL.md`](https://github.com/th3gr1ff/scambait/blob/main/SKILL.md) (Claude Skill), [`scripts/send_registrar_abuse.py`](https://github.com/th3gr1ff/scambait/blob/main/scripts/send_registrar_abuse.py) (Registrar report), [`scripts/_common.py`](https://github.com/th3gr1ff/scambait/blob/main/scripts/_common.py) (Engagement log)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_engagement["Engagement workflow"]
  node_claude["Claude Skill<br/>[SKILL.md]"]
  node_opener["Send opener<br/>[send_opener.py]"]
  node_opener_template["Opener template<br/>[opener.txt]"]
end

subgraph group_reports["Abuse reporting"]
  node_registrar_report["Registrar report"]
  node_registrar_template["Registrar template"]
  node_zoho_report["Zoho abuse report<br/>[send_zoho_abuse.py]"]
  node_zoho_template["Zoho template<br/>[zoho_abuse.txt]"]
  node_ticket_followup["Ticket follow-up"]
end

subgraph group_monitoring["Monitoring"]
  node_inbox["Poll inbox<br/>[check_inbox.py]"]
  node_mx_check["MX verification<br/>[mx_check.py]"]
end

subgraph group_shared["Shared state"]
  node_shared_helpers["Env and logging<br/>[_common.py]"]
  node_engagement_log[("Engagement log<br/>[_common.py]")]
end

node_operator(("Operator"))
node_gmail["Sockpuppet Gmail"]
node_registrar["Registrar abuse desk"]
node_zoho["Zoho abuse desk"]
node_dns["DNS / MX"]

node_operator -->|"starts engagement"| node_claude
node_claude -->|"runs workflow"| node_opener
node_claude -->|"runs workflow"| node_registrar_report
node_claude -->|"polls replies"| node_inbox
node_claude -->|"runs workflow"| node_zoho_report
node_claude -->|"checks takedown"| node_mx_check
node_opener -->|"reads template"| node_opener_template
node_opener -->|"sends message"| node_gmail
node_gmail -->|"receives replies"| node_inbox
node_registrar_report -->|"reads template"| node_registrar_template
node_registrar_report -->|"emails report"| node_registrar
node_registrar_report -->|"queries DNS"| node_dns
node_registrar_report -->|"loads config"| node_shared_helpers
node_inbox -->|"scans folders"| node_gmail
node_inbox -->|"loads config"| node_shared_helpers
node_zoho_report -->|"reads template"| node_zoho_template
node_zoho_report -->|"fetches pitch"| node_gmail
node_zoho_report -->|"queries DNS"| node_dns
node_zoho_report -->|"emails report"| node_zoho
node_zoho_report -->|"loads config"| node_shared_helpers
node_ticket_followup -->|"fetches ticket and pitch"| node_gmail
node_ticket_followup -->|"replies with evidence"| node_zoho
node_ticket_followup -->|"loads config"| node_shared_helpers
node_mx_check -->|"queries MX"| node_dns
node_mx_check -->|"reads and logs events"| node_shared_helpers
node_shared_helpers -->|"appends events"| node_engagement_log
node_inbox -->|"reads and appends"| node_engagement_log
node_mx_check -->|"reads and appends"| node_engagement_log
node_opener -->|"records send"| node_engagement_log
node_registrar_report -->|"records report"| node_engagement_log
node_zoho_report -->|"records report"| node_engagement_log
node_ticket_followup -->|"records follow-up"| node_engagement_log
node_zoho -->|"report prompts check"| node_mx_check

click node_claude "https://github.com/th3gr1ff/scambait/blob/main/SKILL.md"
click node_opener "https://github.com/th3gr1ff/scambait/blob/main/scripts/send_opener.py"
click node_opener_template "https://github.com/th3gr1ff/scambait/blob/main/templates/opener.txt"
click node_registrar_report "https://github.com/th3gr1ff/scambait/blob/main/scripts/send_registrar_abuse.py"
click node_registrar_template "https://github.com/th3gr1ff/scambait/blob/main/templates/registrar_abuse.txt"
click node_inbox "https://github.com/th3gr1ff/scambait/blob/main/scripts/check_inbox.py"
click node_zoho_report "https://github.com/th3gr1ff/scambait/blob/main/scripts/send_zoho_abuse.py"
click node_zoho_template "https://github.com/th3gr1ff/scambait/blob/main/templates/zoho_abuse.txt"
click node_ticket_followup "https://github.com/th3gr1ff/scambait/blob/main/scripts/zoho_ticket_followup.py"
click node_mx_check "https://github.com/th3gr1ff/scambait/blob/main/scripts/mx_check.py"
click node_shared_helpers "https://github.com/th3gr1ff/scambait/blob/main/scripts/_common.py"
click node_engagement_log "https://github.com/th3gr1ff/scambait/blob/main/scripts/_common.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_claude,node_opener,node_opener_template toneBlue
class node_registrar_report,node_registrar_template,node_zoho_report,node_zoho_template,node_ticket_followup toneAmber
class node_inbox,node_mx_check toneMint
class node_shared_helpers,node_engagement_log toneRose
class node_operator,node_gmail,node_registrar,node_zoho,node_dns toneIndigo
```

## Components

### Engagement workflow

- [Claude Skill](https://github.com/th3gr1ff/scambait/blob/main/SKILL.md): `SKILL.md`
- [Send opener](https://github.com/th3gr1ff/scambait/blob/main/scripts/send_opener.py): `scripts/send_opener.py`
- [Opener template](https://github.com/th3gr1ff/scambait/blob/main/templates/opener.txt): `templates/opener.txt`

### Abuse reporting

- [Registrar report](https://github.com/th3gr1ff/scambait/blob/main/scripts/send_registrar_abuse.py): `scripts/send_registrar_abuse.py`
- [Registrar template](https://github.com/th3gr1ff/scambait/blob/main/templates/registrar_abuse.txt): `templates/registrar_abuse.txt`
- [Zoho abuse report](https://github.com/th3gr1ff/scambait/blob/main/scripts/send_zoho_abuse.py): `scripts/send_zoho_abuse.py`
- [Zoho template](https://github.com/th3gr1ff/scambait/blob/main/templates/zoho_abuse.txt): `templates/zoho_abuse.txt`
- [Ticket follow-up](https://github.com/th3gr1ff/scambait/blob/main/scripts/zoho_ticket_followup.py): `scripts/zoho_ticket_followup.py`

### Monitoring

- [Poll inbox](https://github.com/th3gr1ff/scambait/blob/main/scripts/check_inbox.py): `scripts/check_inbox.py`
- [MX verification](https://github.com/th3gr1ff/scambait/blob/main/scripts/mx_check.py): `scripts/mx_check.py`

### Shared state

- [Env and logging](https://github.com/th3gr1ff/scambait/blob/main/scripts/_common.py): `scripts/_common.py`
- [Engagement log](https://github.com/th3gr1ff/scambait/blob/main/scripts/_common.py): `scripts/_common.py`

### Other components

- **Operator**
- **Sockpuppet Gmail**
- **Registrar abuse desk**
- **Zoho abuse desk**
- **DNS / MX**

## Connections

- Operator → Claude Skill: starts engagement (evidence: `README.md`)
- Claude Skill → Send opener: runs workflow (evidence: `README.md`)
- Claude Skill → Registrar report: runs workflow (evidence: `README.md`)
- Claude Skill → Poll inbox: polls replies (evidence: `README.md`)
- Claude Skill → Zoho abuse report: runs workflow (evidence: `README.md`)
- Claude Skill → MX verification: checks takedown (evidence: `README.md`)
- Send opener → Opener template: reads template (evidence: `scripts/send_opener.py`)
- Send opener → Sockpuppet Gmail: sends message (evidence: `scripts/send_opener.py`)
- Sockpuppet Gmail → Poll inbox: receives replies (evidence: `README.md`)
- Registrar report → Registrar template: reads template (evidence: `scripts/send_registrar_abuse.py`)
- Registrar report → Registrar abuse desk: emails report (evidence: `scripts/send_registrar_abuse.py`)
- Registrar report → DNS / MX: queries DNS (evidence: `scripts/send_registrar_abuse.py`)
- Registrar report → Env and logging: loads config (evidence: `scripts/send_registrar_abuse.py`)
- Poll inbox → Sockpuppet Gmail: scans folders (evidence: `scripts/check_inbox.py`)
- Poll inbox → Env and logging: loads config (evidence: `scripts/check_inbox.py`)
- Zoho abuse report → Zoho template: reads template (evidence: `scripts/send_zoho_abuse.py`)
- Zoho abuse report → Sockpuppet Gmail: fetches pitch (evidence: `scripts/send_zoho_abuse.py`)
- Zoho abuse report → DNS / MX: queries DNS (evidence: `scripts/send_zoho_abuse.py`)
- Zoho abuse report → Zoho abuse desk: emails report (evidence: `scripts/send_zoho_abuse.py`)
- Zoho abuse report → Env and logging: loads config (evidence: `scripts/send_zoho_abuse.py`)
- Ticket follow-up → Sockpuppet Gmail: fetches ticket and pitch (evidence: `scripts/zoho_ticket_followup.py`)
- Ticket follow-up → Zoho abuse desk: replies with evidence (evidence: `scripts/zoho_ticket_followup.py`)
- Ticket follow-up → Env and logging: loads config (evidence: `scripts/zoho_ticket_followup.py`)
- MX verification → DNS / MX: queries MX (evidence: `scripts/mx_check.py`)
- MX verification → Env and logging: reads and logs events (evidence: `scripts/mx_check.py`)
- Env and logging → Engagement log: appends events (evidence: `scripts/_common.py`)
- Poll inbox → Engagement log: reads and appends (evidence: `scripts/check_inbox.py`)
- MX verification → Engagement log: reads and appends (evidence: `scripts/mx_check.py`)
- Send opener → Engagement log: records send (evidence: `scripts/send_opener.py`)
- Registrar report → Engagement log: records report (evidence: `scripts/send_registrar_abuse.py`)
- Zoho abuse report → Engagement log: records report (evidence: `scripts/send_zoho_abuse.py`)
- Ticket follow-up → Engagement log: records follow-up (evidence: `scripts/zoho_ticket_followup.py`)
- Zoho abuse desk → MX verification: report prompts check (evidence: `README.md`)
