# sakshamgupta154/phishingwebsitedetection architecture

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

- Interactive diagram: https://gitdiagram.com/sakshamgupta154/phishingwebsitedetection
- Repository: https://github.com/sakshamgupta154/phishingwebsitedetection

## Overview

This is a Flask phishing-URL scoring app. A user submits a URL to the root route; the app extracts 30 URL and website features, passes them to a loaded classifier, and renders a safety score in the page. Feature extraction includes URL/page checks and domain or reputation signals. The excerpts establish the app-to-extractor and app-to-model flow, plus several external lookups; the template contents and most feature implementations were not sampled, so those details are kept at subsystem level.

Main entry points: [`link--master/feature.py`](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py) (Feature extraction), [`link--master/app.py`](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/app.py) (Scoring route), [`link--master/templates/index.html`](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/templates/index.html) (Result page), [`link--master/pickle/model.pkl`](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/pickle/model.pkl) (Phishing classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_flask["Scoring route<br/>[app.py]"]
  node_page["Result page<br/>[index.html]"]
end

subgraph group_analysis["URL analysis"]
  node_extract["Feature extraction<br/>[feature.py]"]
  node_urlchecks["URL heuristics<br/>[feature.py]"]
  node_pagechecks["Page checks<br/>[feature.py]"]
  node_domainchecks["Domain signals<br/>[feature.py]"]
  node_reputation["Reputation checks<br/>[feature.py]"]
end

subgraph group_inference["Classification"]
  node_classifier["Phishing classifier<br/>[model.pkl]"]
end

node_user(("URL submitter"))
node_targetsite(("Submitted website"))
node_whois(("WHOIS service"))
node_ranking(("Ranking services"))
node_search(("Search service"))

node_user -->|"submits URL"| node_flask
node_flask -->|"extracts features"| node_extract
node_extract -->|"evaluates URL"| node_urlchecks
node_extract -->|"checks page"| node_pagechecks
node_extract -->|"checks domain"| node_domainchecks
node_extract -->|"checks reputation"| node_reputation
node_extract -->|"fetches page"| node_targetsite
node_extract -->|"queries WHOIS"| node_whois
node_extract -->|"queries rankings"| node_ranking
node_extract -->|"searches URL"| node_search
node_flask -->|"predicts with"| node_classifier
node_flask -->|"renders result"| node_page

click node_flask "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/app.py"
click node_page "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/templates/index.html"
click node_extract "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py"
click node_urlchecks "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py"
click node_pagechecks "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py"
click node_domainchecks "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py"
click node_reputation "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py"
click node_classifier "https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/pickle/model.pkl"

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_flask,node_page toneBlue
class node_extract,node_urlchecks,node_pagechecks,node_domainchecks,node_reputation toneAmber
class node_classifier toneMint
class node_user,node_targetsite,node_whois,node_ranking,node_search toneIndigo
```

## Components

### Web interface

- [Scoring route](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/app.py): `link--master/app.py`
- [Result page](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/templates/index.html): `link--master/templates/index.html`

### URL analysis

- [Feature extraction](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py): `link--master/feature.py`
- [URL heuristics](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py): `link--master/feature.py`
- [Page checks](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py): `link--master/feature.py`
- [Domain signals](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py): `link--master/feature.py`
- [Reputation checks](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/feature.py): `link--master/feature.py`

### Classification

- [Phishing classifier](https://github.com/sakshamgupta154/phishingwebsitedetection/blob/main/link--master/pickle/model.pkl): `link--master/pickle/model.pkl`

### Other components

- **URL submitter**
- **Submitted website**
- **WHOIS service**
- **Ranking services**
- **Search service**

## Connections

- URL submitter → Scoring route: submits URL (evidence: `link--master/app.py`)
- Scoring route → Feature extraction: extracts features (evidence: `link--master/app.py`)
- Feature extraction → URL heuristics: evaluates URL (evidence: `link--master/feature.py`)
- Feature extraction → Page checks: checks page (evidence: `link--master/feature.py`)
- Feature extraction → Domain signals: checks domain (evidence: `link--master/feature.py`)
- Feature extraction → Reputation checks: checks reputation (evidence: `link--master/feature.py`)
- Feature extraction → Submitted website: fetches page (evidence: `link--master/feature.py`)
- Feature extraction → WHOIS service: queries WHOIS (evidence: `link--master/feature.py`)
- Feature extraction → Ranking services: queries rankings (evidence: `link--master/feature.py`)
- Feature extraction → Search service: searches URL (evidence: `link--master/feature.py`)
- Scoring route → Phishing classifier: predicts with (evidence: `link--master/app.py`)
- Scoring route → Result page: renders result (evidence: `link--master/app.py`)
