# blackhatethicalhacking/secretopt1c architecture

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

- Interactive diagram: https://gitdiagram.com/blackhatethicalhacking/secretopt1c
- Repository: https://github.com/blackhatethicalhacking/secretopt1c

## Overview

SecretOpt1c is a secret-exposure scanner for authorized red-team and bug-bounty work. Its principal workflow accepts a target or supplied file, harvests and deduplicates URLs, fetches content, detects and filters candidate secrets, optionally validates them, and produces reports. The README documents these capabilities, but the Python implementation was not sampled; edges therefore reflect documented behavior rather than inspected calls. The legacy Bash workflow is a separate supported path.

Main entry points: [`secretopt1c.py`](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py) (URL Harvesting), [`SecretOpt1c.sh`](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/SecretOpt1c.sh) (Classic Bash Workflow), [`secrethub.json`](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secrethub.json) (Provider Rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_cli["CLI and Menu<br/>[secretopt1c.py]"]
  node_fileinput["File Scanning<br/>[secretopt1c.py]"]
end

subgraph group_recon["Reconnaissance"]
  node_harvest["URL Harvesting<br/>[secretopt1c.py]"]
  node_crawler["Built-in Crawler<br/>[secretopt1c.py]"]
  node_sources["Harvest Sources<br/>[secretopt1c.py]"]
  node_fetch["Concurrent Fetching<br/>[secretopt1c.py]"]
  node_content["Target Content"]
end

subgraph group_engine["Detection and Validation"]
  node_rules["Provider Rules<br/>[secrethub.json]"]
  node_detect["Secret Detection<br/>[secretopt1c.py]"]
  node_entropy["Entropy Scoring<br/>[secretopt1c.py]"]
  node_filter["False-Positive Filtering<br/>[secretopt1c.py]"]
  node_validate["Live Validation<br/>[secretopt1c.py]"]
  node_providerapi{{"Provider APIs"}}
end

subgraph group_results["Results and Legacy"]
  node_findings["Secret Findings"]
  node_reports["Report Outputs<br/>[secretopt1c.py]"]
  node_legacy["Classic Bash Workflow<br/>[SecretOpt1c.sh]"]
  node_legacytools{{"Legacy Recon Tools"}}
end

node_user(("Operator"))

node_user -->|"starts scan"| node_cli
node_user -->|"supplies file"| node_fileinput
node_cli -->|"selects sources"| node_harvest
node_harvest -->|"crawls pages"| node_crawler
node_harvest -.->|"uses sources"| node_sources
node_crawler -->|"discovers URLs"| node_harvest
node_harvest -->|"provides URLs"| node_fetch
node_fetch -->|"retrieves content"| node_content
node_fileinput -->|"provides content"| node_content
node_content -->|"scanned by"| node_detect
node_rules -->|"defines patterns"| node_detect
node_detect -->|"scores candidates"| node_entropy
node_entropy -->|"filters candidates"| node_filter
node_filter -->|"retains matches"| node_findings
node_cli -->|"enables validation"| node_validate
node_findings -->|"checks keys"| node_validate
node_validate -->|"checks against"| node_providerapi
node_findings -->|"formats results"| node_reports
node_user -->|"starts classic scan"| node_legacy
node_legacy -->|"runs recon tools"| node_legacytools

click node_cli "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_fileinput "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_harvest "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_crawler "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_sources "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_fetch "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_rules "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secrethub.json"
click node_detect "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_entropy "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_filter "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_validate "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_reports "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py"
click node_legacy "https://github.com/blackhatethicalhacking/secretopt1c/blob/main/SecretOpt1c.sh"

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_cli,node_fileinput toneBlue
class node_harvest,node_crawler,node_sources,node_fetch,node_content toneAmber
class node_rules,node_detect,node_entropy,node_filter,node_validate,node_providerapi toneMint
class node_findings,node_reports,node_legacy,node_legacytools toneRose
class node_user toneIndigo
```

## Components

### User Interface

- [CLI and Menu](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [File Scanning](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`

### Reconnaissance

- [URL Harvesting](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Built-in Crawler](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Harvest Sources](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Concurrent Fetching](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- **Target Content**

### Detection and Validation

- [Provider Rules](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secrethub.json): `secrethub.json`
- [Secret Detection](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Entropy Scoring](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [False-Positive Filtering](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Live Validation](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- **Provider APIs**

### Results and Legacy

- **Secret Findings**
- [Report Outputs](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/secretopt1c.py): `secretopt1c.py`
- [Classic Bash Workflow](https://github.com/blackhatethicalhacking/secretopt1c/blob/main/SecretOpt1c.sh): `SecretOpt1c.sh`
- **Legacy Recon Tools**

### Other components

- **Operator**

## Connections

- Operator → CLI and Menu: starts scan (evidence: `README.md`)
- Operator → File Scanning: supplies file (evidence: `README.md`)
- CLI and Menu → URL Harvesting: selects sources (evidence: `README.md`)
- URL Harvesting → Built-in Crawler: crawls pages (evidence: `README.md`)
- URL Harvesting → Harvest Sources: uses sources (evidence: `README.md`)
- Built-in Crawler → URL Harvesting: discovers URLs (evidence: `README.md`)
- URL Harvesting → Concurrent Fetching: provides URLs (evidence: `README.md`)
- Concurrent Fetching → Target Content: retrieves content (evidence: `README.md`)
- File Scanning → Target Content: provides content (evidence: `README.md`)
- Target Content → Secret Detection: scanned by (evidence: `README.md`)
- Provider Rules → Secret Detection: defines patterns (evidence: `README.md`)
- Secret Detection → Entropy Scoring: scores candidates (evidence: `README.md`)
- Entropy Scoring → False-Positive Filtering: filters candidates (evidence: `README.md`)
- False-Positive Filtering → Secret Findings: retains matches (evidence: `README.md`)
- CLI and Menu → Live Validation: enables validation (evidence: `README.md`)
- Secret Findings → Live Validation: checks keys (evidence: `README.md`)
- Live Validation → Provider APIs: checks against (evidence: `README.md`)
- Secret Findings → Report Outputs: formats results (evidence: `README.md`)
- Operator → Classic Bash Workflow: starts classic scan (evidence: `README.md`)
- Classic Bash Workflow → Legacy Recon Tools: runs recon tools (evidence: `README.md`)
