How axd99999/phishing-detection-extension works
The product is a privacy-oriented Chrome extension that extracts phishing indicators in the browser, classifies them locally with a downloaded random-forest model, and warns users while showing feature scores. Its supporting backend prepares the UCI dataset and trains/exports the model. The runtime path is supported by sampled JavaScript; README documents dataset preparation and model training/export, though some backend and extension wiring was not sampled. The remote model source is an optional first-use fallback; subsequent classification can use the local cache.
Main entry points: background.js Message and classify · preprocess.py Dataset preprocessing · features.js Feature extraction · plugin_ui.js Popup interface
Components 15
Browser Detection
- Feature extraction
frontend/js/features.js - Message and classify
frontend/js/background.js - Forest predictor
frontend/js/classifier.js - Chrome local storage
- Exported classifier
static/classifier.json
Extension UI
- Popup interface
frontend/js/plugin_ui.js - Popup document
frontend/plugin_ui.html
Model Preparation
- Phishing dataset
backend/dataset/dataset.arff - Dataset preprocessing
backend/dataset/preprocess.py - Forest training
backend/classifier/training.py - Tree JSON exporter
backend/classifier/dump.py - Test data export
static/testdata.json
Other components
- Browser user
- Visited page
- GitHub raw model
Connections 20
- Browser user → Visited page: visits
- Visited page → Feature extraction: provides DOM
- Feature extraction → Message and classify: sends features
- Message and classify → Chrome local storage: reads cache
- Message and classify → Chrome local storage: writes cache
- Message and classify → GitHub raw model: fetches model
- GitHub raw model → Message and classify: returns model
- Exported classifier → Message and classify: cached model data
- Message and classify → Forest predictor: calls predict
- Forest predictor → Message and classify: returns classification
- Message and classify → Feature extraction: sends warning
- Message and classify → Popup interface: exposes results
- Browser user → Popup document: opens popup
- Popup document → Popup interface: loads script
- Popup interface → Message and classify: reads tab result
- Phishing dataset → Dataset preprocessing: input data
- Dataset preprocessing → Forest training: writes training splits
- Dataset preprocessing → Test data export: writes test export
- Forest training → Tree JSON exporter: exports forest
- Tree JSON exporter → Exported classifier: serializes model