# arhmfaculty/emailpicker--email-recon-tool architecture

> Architecture diagram of the GitHub repository arhmfaculty/emailpicker--email-recon-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arhmfaculty/emailpicker--email-recon-tool
- Repository: https://github.com/arhmfaculty/emailpicker--email-recon-tool

## Overview

##### Project type and purpose
- EmailPicker is a standalone, command-line Python tool for OSINT email reconnaissance.
- Its purpose is to harvest e-mail addresses from search engines and certificate transparency logs, optionally using proxies and multithreading to scale.

##### File structure
- The project consists of two files at the root:
- EmailPicker.py  (the entire application)
- README.md       (documentation)
- No separate “frontend” or “backend” folders: all logic lives in EmailPicker.py.
- Configuration and dependency management happen in-code (via argparse and requests), no external config files.

##### README for additional insights
- The tool:
- Queries Google, Bing, DuckDuckGo, LinkedIn, crt.sh
- Optionally rotates through a proxy list
- Runs fetch-and-parse steps in parallel threads
- Applies regex filtering to each page’s HTML
- Writes results to stdout or a file
- No persistent database; output is a simple text file.

##### Diagramming the architecture
a. Main components to represent:
- **User / CLI** – origin of commands
- **Arg Parser** – processes flags (-d, -t, -p, -o)
- **Recon Controller** – orchestrator that kicks off the workflow
- **Thread Manager** – spawns/coordinates worker threads
- **Proxy Manager** (optional) – fetches & rotates HTTP proxies
- **Fetcher Module** – issues HTTP requests to external services
- **External Services** – Google, Bing, DuckDuckGo, LinkedIn, crt.sh
- **HTML Parser & Email Extractor** – regex-based email filtering
- **Output Writer** – writes to console or file
b. Relationships and interactions:
- User → CLI → Arg Parser → Recon Controller
- Recon Controller → Thread Manager
- Thread Manager → Worker Threads (each thread uses Proxy Manager → Fetcher → Parser → Output Writer)
- Fetcher → External Services (outbound HTTP calls)
- Parser → filtered email list → back to Recon Controller → Output Writer
c. Architectural patterns/design principles:
- **Pipeline/Producer-Consumer**: threads fetch pages and produce email results into a shared collector.
- **Modular layering**: separation between input (CLI), orchestration, network I/O (Fetcher + Proxy Manager), parsing, and output.
- **Optional component injection**: proxy support is toggled via a flag.
d. Key technologies & libraries:
- Python 3.x runtime
- argparse (CLI parsing)
- requests (HTTP/HTTPS calls)
- threading (concurrency)
- re (regex email extraction)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Input Layer
    CLI["User / CLI"]:::internal
    ArgParser["Arg Parser"]:::internal
    Docs["Documentation"]:::external

    %% Orchestration Layer
    Recon["Recon Controller"]:::internal
    ThreadMgr["Thread Manager"]:::internal

    %% Worker Thread Subgraph
    subgraph "Worker Thread"
        direction TB
        ProxyMgr["Proxy Manager"]:::optional
        Fetcher["Fetcher Module"]:::internal
        Parser["HTML Parser & Email Extractor"]:::internal
        OutWriter["Output Writer"]:::internal
    end

    %% External Services
    subgraph "External Services"
        direction TB
        Google["Google API (HTTP)"]:::external
        Bing["Bing API (HTTP)"]:::external
        DDG["DuckDuckGo API (HTTP)"]:::external
        LinkedIn["LinkedIn (HTTP)"]:::external
        Crtsh["crt.sh (HTTP)"]:::external
    end

    %% Data Flow
    CLI --> ArgParser --> Recon --> ThreadMgr
    ThreadMgr --> ProxyMgr
    ThreadMgr -.-> Fetcher
    ProxyMgr --> Fetcher
    Fetcher --> Google
    Fetcher --> Bing
    Fetcher --> DDG
    Fetcher --> LinkedIn
    Fetcher --> Crtsh
    Fetcher --> Parser --> OutWriter

    %% Documentation reference
    CLI -.-> Docs

    %% Click Events
    click CLI "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click ArgParser "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click Recon "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click ThreadMgr "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click ProxyMgr "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click Fetcher "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click Parser "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click OutWriter "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/EmailPicker.py"
    click Docs "https://github.com/arhmfaculty/emailpicker--email-recon-tool/blob/main/README.md"

    %% Styles
    classDef internal fill:#cce5ff,stroke:#004085,color:#004085;
    classDef external fill:#d4edda,stroke:#155724,color:#155724;
    classDef optional fill:#fff3cd,stroke:#856404,color:#856404;
```
