How tarequesyed/phishing-detector works
AI Phishing Detector accepts email text in a browser dashboard and returns heuristic, URL, and LLM risk scores plus an explanation. The Flask analysis route coordinates URL extraction and the three analysis channels, combines their scores, attempts to persist a scan, and returns the results for display. Scan history is the documented audit capability. The README also documents PostgreSQL as the persistent store. Source excerpts show the scoring and persistence calls; other README-described deployment details are not runtime product components here.
Main entry points: analyze.py Analysis route · script.js Dashboard behavior · index.html Analysis dashboard · llm_detector.py LLM analysis
Components 14
Browser interface
- Analysis dashboard
frontend/index.html - Dashboard behavior
frontend/script.js
Flask API
- Flask application
backend/app.py - Analysis route
backend/routes/analyze.py
Phishing analysis
- URL extraction
backend/analyser/url_detector.py - Keyword scoring
backend/analyser/heuristic.py - URL risk scoring
backend/analyser/url_risk.py - LLM analysis
backend/analyser/llm_detector.py - Score combination
backend/analyser/scoring.py
Scan persistence
- Scan record
backend/models/scan.py - SQLAlchemy database
backend/database.py
Other components
- Email submitter
- Hugging Face API
- PostgreSQL
Connections 14
- Email submitter → Analysis dashboard: enters email
- Analysis dashboard → Dashboard behavior: runs analysis
- Dashboard behavior → Analysis route: POST email
- Flask application → Analysis route: registers route
- Analysis route → URL extraction: extracts URLs
- Analysis route → Keyword scoring: scores keywords
- Analysis route → URL risk scoring: scores URLs
- Analysis route → LLM analysis: requests analysis
- LLM analysis → Hugging Face API: queries model
- Analysis route → Score combination: combines scores
- Analysis route → Scan record: creates record
- Analysis route → SQLAlchemy database: commits scan
- SQLAlchemy database → PostgreSQL: persists data
- Analysis route → Dashboard behavior: returns results