Phishing URL detector
Score whether a link looks like phishing from features of the URL itself, and explain the warning signs.
Intermediateâą 8â12 hoursđĒ 7 stepsPythonscikit-learnFeature engineering
What you'll learn
- âEngineering features from URLs
- âClassification and evaluation
- âExplaining security warnings to users
What you'll build
- âFeature extraction from any URL
- âTrained classifier with probability
- âShows the risky signs found
- âBrowser-friendly API
Step-by-step guide
- 1
Data
A public phishing URL dataset (for example from PhishTank-derived research datasets or UCI) plus legitimate URLs.
- 2
Features
Length, number of dots, "@" present, IP address as host, hyphens in domain, https, suspicious words (login, verify), TLD, subdomain depth.
- 3
Parse safely
Use urllib.parse and tldextract; never visit the URLs while building features.
- 4
Train
RandomForestClassifier; stratified split; precision and recall for the phishing class.
- 5
Explain
Return the top signs for each prediction ("uses an IP address instead of a domain").
- 6
API
FastAPI endpoint POST /check {url} â {score, signs}.
- 7
Limits
Explain that attackers adapt; this is one signal, not a guarantee.
đ Make it stand out
- +Add domain age (WHOIS) features
- +Chrome extension that calls your API
- +Check against a live blocklist