How khan123-code/gmail-phishing-detector works
Gmail Phishing Detector is a Chrome extension backed by a local Python API. Opening an email in Gmail triggers the content script to send its subject, sender, and body to the API; the scoring orchestrator gathers domain, credential, URL, semantic, and email-authentication signals, then returns a risk classification and explanation for the extension banner and popup. The README also describes offline ML training. The sampled runtime scorer shows weighted layer scoring, but does not show use of the trained model; some extension and training relationships are therefore omitted.
Main entry points: smart_predict.py Risk Scorer · content.js Email Scanner · app.py Prediction API · email_auth_checker.py Email Authentication
Components 15
Chrome Extension
- Email Scanner
content.js - Risk Banner
content.js - Saved Result
content.js - Popup Status
popup.js
API Service
- Prediction API
app.py
Detection Layers
- Risk Scorer
smart_predict.py - Domain Verification
domain_checker.py - Credential Detection
credential_detector.py - URL Analysis
url_analyzer.py - Semantic Analysis
semantic_analyzer.py - Email Authentication
email_auth_checker.py
ML Training
- Model Training
train.py
Other components
- Gmail Email
- DNS Resolver
- Phishing Dataset
Connections 15
- Gmail Email → Email Scanner: opens email
content.js - Email Scanner → Prediction API: sends email data
content.js - Prediction API → Risk Scorer: invokes scoring
app.py - Risk Scorer → Domain Verification: checks sender
smart_predict.py - Risk Scorer → Credential Detection: detects requests
smart_predict.py - Risk Scorer → URL Analysis: analyzes links
smart_predict.py - Risk Scorer → Semantic Analysis: classifies intent
smart_predict.py - Risk Scorer → Email Authentication: checks authentication
smart_predict.py - Email Authentication → DNS Resolver: queries records
email_auth_checker.py - Risk Scorer → Prediction API: returns assessment
app.py - Prediction API → Email Scanner: returns result
content.js - Email Scanner → Risk Banner: renders assessment
content.js - Email Scanner → Saved Result: saves result
content.js - Popup Status → Saved Result: reads result
popup.js - Phishing Dataset → Model Training: loads data
train.py