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.2.tar.gz (17.1 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.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: isphishing-2.0.2.tar.gz
  • Upload date:
  • Size: 17.1 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.2.tar.gz
Algorithm Hash digest
SHA256 324b731a706a60c32f5843a6a5c18f6f86e22bfdcaff2f6ce1ecddffe7a2b0d9
MD5 25b1e2dcbda4389a734287211a720d52
BLAKE2b-256 0d1809f6e000eed3837085a2d828c4077f72717d3061f69518e0d7ee42024850

See more details on using hashes here.

File details

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

File metadata

  • Download URL: isphishing-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46b505cec748271fc086d4313b4130f8444310e7bc4a79ecf3f1edcf8ae1c0f0
MD5 e8d292bbe4a0a6bd89df21ca2c977526
BLAKE2b-256 2c47f1394c7db8036ae0e470eca997129b6531401b309fe4e1145f96c52a4e87

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