Skip to main content

AI-powered phishing detector for URLs and emails

Project description

Phishing Detector

Detecteur de phishing base sur le Machine Learning et la Programmation Orientee Objet en Python. Detecte les URLs et emails de phishing en temps reel depuis nimporte ou dans le terminal.

Installation via PyPI (recommande)

pip install isphishing
isphishing-setup
isphishing

Installation via GitHub

Linux / Mac

git clone https://github.com/f3d4yn/phishing-detector.git
cd phishing-detector
chmod +x install.sh
./install.sh
source ~/.bashrc

Windows

git clone https://github.com/f3d4yn/phishing-detector.git
cd phishing-detector
install.bat

Redemarre le terminal apres installation puis tape : isphishing

Performance des modeles

Deux modeles specialises sont utilises : un pour les URLs et un pour les emails.

Modele URL

Metrique Score
Exactitude 92.33%
Precision 93.87%
Rappel 90.57%
F1 Score 92.19%
ROC AUC 97.85%

Modele Email

Metrique Score
Exactitude 98.17%
Precision 97.69%
Rappel 98.67%
F1 Score 98.18%
ROC AUC 99.82%

Entraine sur 663 766 echantillons (564 970 URLs + 98 796 Emails)

Architecture POO

  • BaseInput : Classe abstraite (ABC)
  • EmailInput : Heritage + validate()
  • URLInput : Heritage + extract_domain()
  • FeatureExtractor : Extraction de 38 features (URL + texte)
  • MLModel : XGBoost (2000 arbres, early stopping)
  • PhishingDetector : Orchestrateur principal + whitelist
  • ThreatReport : Score + Label + Raisons
  • AlertSystem : Alertes colorees + Logs JSON

Fonctionnalites

  • Detection d URLs et emails de phishing en temps reel
  • Deux modeles XGBoost specialises (URL et Email)
  • 38 features extraites par analyse (longueur URL, entropie domaine, mots suspects, etc.)
  • Whitelist de domaines et expéditeurs de confiance
  • Logs JSON automatiques des alertes detectees
  • Interface terminal coloree

Lancer les tests

source venv/bin/activate
python -m unittest discover tests/

Reentrainer le modele

Les datasets ne sont pas inclus dans le depot.

  1. Telecharge les datasets sur Kaggle :

    • URLs : Web Page Phishing Detection Dataset
    • Emails: Phishing Email Dataset
  2. Place-les dans data/ :

    • data/all_urls.csv
    • data/all_emails.csv
  3. Lance l entrainement :

    python train.py
    

    Deux modeles seront generes :

    • models/model_url.pkl
    • models/model_email.pkl

Auteurs

Habib Ilyas et Boukyod Abdessamad Module : Programmation Avancee (Python POO)

PyPI

https://pypi.org/project/isphishing/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isphishing-2.0.4.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isphishing-2.0.4-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file isphishing-2.0.4.tar.gz.

File metadata

  • Download URL: isphishing-2.0.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for isphishing-2.0.4.tar.gz
Algorithm Hash digest
SHA256 b7f217ac280ada942e8727515dc620424a0f46c434b112feb38a17b32afc8a40
MD5 74be796a63bed81a9b6abfcb4d0496bf
BLAKE2b-256 814d8e812927abf2491fcc0db203528c318287a9b80ca2e16562cfd3d42c3f81

See more details on using hashes here.

File details

Details for the file isphishing-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: isphishing-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for isphishing-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a1137125a8cfe1fb7725084c991f2198c268534ce5815bface9c429fa73910
MD5 f852940df7b79d781f20b12f6a72a63a
BLAKE2b-256 d56c3de7cf1e3facfd6d0e7c51ba7d0344e7b1234cebb7856b0e5b257a229031

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page