How kalkitarun1120/phishcatcher works
PhishCatcher is a Chrome extension backed by a Flask phishing-classification API. Its main workflow inspects a loaded page, derives URL and page-form features, requests a model prediction, then warns the user and may block form submissions; the popup also supports manual checks and displays recent results and statistics. A separate training workflow builds a logistic-regression model from the dataset and saves the artifact loaded by the API. The supplied source excerpts omit parts of the content script and training pipeline, so uncertain internal wiring is not shown.
Main entry points: content.js Page Analyzer · popup.js Popup UI · app.py Prediction API · background.js Background Worker
Components 13
Chrome Extension
- Popup UI
extension/popup.js - Page Analyzer
extension/content.js - Warning and Form Guard
extension/content.js - Background Worker
extension/background.js
Detection Backend
- Prediction API
backend/app.py - Classifier
backend/app.py - Model Artifact
backend/phishing_model.pkl
Model Training
- Model Trainer
backend/train_model.py - Phishing Dataset
backend/phishing_dataset.csv
Extension State
- Extension Storage
Other components
- User
- Web Page
- Chrome APIs
Connections 17
- User → Popup UI: opens or checks
- Popup UI → Chrome APIs: queries active tab
- Popup UI → Page Analyzer: sends check request
- Web Page → Page Analyzer: provides page content
- Page Analyzer → Prediction API: posts features
- Prediction API → Classifier: predicts probability
- Model Artifact → Prediction API: loads at startup
- Prediction API → Page Analyzer: returns prediction
- Page Analyzer → Extension Storage: writes last result
- Popup UI → Extension Storage: reads results and stats
- Page Analyzer → Warning and Form Guard: shows warning and blocks forms
- Page Analyzer → Background Worker: sends detection message
- Background Worker → Extension Storage: updates settings and stats
- Background Worker → Chrome APIs: updates badge and tabs
- Model Trainer → Phishing Dataset: reads samples
- Model Trainer → Model Artifact: saves trained model
- Popup UI → Prediction API: checks health