🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101

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. 1

    Data

    A public phishing URL dataset (for example from PhishTank-derived research datasets or UCI) plus legitimate URLs.

  2. 2

    Features

    Length, number of dots, "@" present, IP address as host, hyphens in domain, https, suspicious words (login, verify), TLD, subdomain depth.

  3. 3

    Parse safely

    Use urllib.parse and tldextract; never visit the URLs while building features.

  4. 4

    Train

    RandomForestClassifier; stratified split; precision and recall for the phishing class.

  5. 5

    Explain

    Return the top signs for each prediction ("uses an IP address instead of a domain").

  6. 6

    API

    FastAPI endpoint POST /check {url} → {score, signs}.

  7. 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