How aditya15128/phish-guard works
PhishGuard is a browser extension for manually scanning the active tab’s URL and presenting a phishing-risk verdict, scan totals, and recent history. The popup gets the active tab URL, sends a scan request to the background worker, and displays the returned result. The worker scores the URL with heuristic rules, updates local statistics and scan history, and serves statistics/reset requests. The content script and blocklist module are placeholders in the sampled source, so they are not shown as functioning detection stages.
Main entry points: background.js Background worker · popup.js Popup UI · heuristics.js Heuristic scoring
Components 6
Popup interface
- Popup UI
popup/popup.js
URL analysis
- Background worker
background.js - Heuristic scoring
rules/heuristics.js
Scan state
- Local extension storage
Other components
- Extension user
- Browser APIs
Connections 9
- Extension user → Popup UI: requests scan
- Popup UI → Browser APIs: queries active tab
- Popup UI → Background worker: sends scan request
- Background worker → Heuristic scoring: scores URL
- Background worker → Local extension storage: updates scan state
- Local extension storage → Background worker: returns stored state
- Popup UI → Local extension storage: reads scan history
- Background worker → Popup UI: returns verdict or stats
- Browser APIs → Background worker: dispatches messages