# desaivraj8740/phishing-detector architecture

> Architecture diagram of the GitHub repository desaivraj8740/phishing-detector, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/desaivraj8740/phishing-detector
- Repository: https://github.com/desaivraj8740/phishing-detector

## Overview

##### Project type and purpose
- This is a standalone, command-line Python tool (not a web or full-stack app).
- Its sole purpose is to let a human operator supply a URL and either (a) check it against known phishing DBs or (b) insert it into a local dataset.

##### File structure
- Top-level files only:
- phish.py – main script (CLI entry point)
- data.csv (users-link.csv) – local storage of user-submitted phishing URLs
- phishing-domains-ACTIVE.txt – local static feed of known phishing domains
- README.md – documentation
- No separate module folders or web server code.

##### README for additional insights
- The tool has two modes: “Check a suspicious URL” and “Insert a phishing URL.”
- It fetches remote data from the OpenPhish GitHub feed (using the `requests` library).
- Local datasets are merged on each run (static + user CSV + remote feed).

##### Detailed but focused guidance
- Input Parser → Data Loader → Merger → Matcher → Persistence & Output

## Diagram (Mermaid)

```mermaid
flowchart TB
    User["User (CLI)"]:::ui
    Detector["Detector Engine\n(phish.py)"]:::core
    Static["Static Phish File\n(phishing-domains-ACTIVE.txt)"]:::local
    CSV["User CSV Store\n(data.csv)"]:::local
    Feed["OpenPhish Feed\n(HTTPS)"]:::external
    Console["Console Output"]:::ui
    Doc["Documentation\n(README.md)"]:::doc

    User -->|"URL + mode"| Detector
    Detector -->|"read"| Static
    Detector -->|"read"| CSV
    Detector -->|"fetch"| Feed
    Detector -->|"append"| CSV
    Detector -->|"output"| Console
    Console -->|"result: phishing/safe"| User

    %% Click Events
    click Detector "https://github.com/desaivraj8740/phishing-detector/blob/main/phish.py"
    click Static "https://github.com/desaivraj8740/phishing-detector/blob/main/phishing-domains-ACTIVE.txt"
    click CSV "https://github.com/desaivraj8740/phishing-detector/blob/main/data.csv"
    click Doc "https://github.com/desaivraj8740/phishing-detector/blob/main/README.md"

    classDef local fill:#D6E6FF,stroke:#1F618D,color:#1F618D
    classDef external fill:#D5F5E3,stroke:#28B463,color:#1D8348
    classDef core fill:#FEF9E7,stroke:#B7950B,color:#7D6608
    classDef ui fill:#E5E7E9,stroke:#566573,color:#1C2833
    classDef doc fill:#FADBD8,stroke:#C0392B,color:#922B21
```
