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

Uploaded Python 3

File details

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

File metadata

  • Download URL: isphishing-2.0.1.tar.gz
  • Upload date:
  • Size: 16.7 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.1.tar.gz
Algorithm Hash digest
SHA256 24b2f10b6323f82018fc2ad1a2f4378945375a0f4862a48c41ee563ff52e24a4
MD5 7ce62452e92e8cef61c2835b64325c12
BLAKE2b-256 92fcb058c191f8b1c942a52173a2b810ddd0fd4cd3f717f5d0119696e294c667

See more details on using hashes here.

File details

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

File metadata

  • Download URL: isphishing-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff2234334de76123a34a2646db7b3f7399a1db86ba02b0fe0ad5a346ee423f6c
MD5 c1e59d2105f1fdf5fbeacffe6c856163
BLAKE2b-256 78c17947e409c44953574bcc28fdde397bc0051fda2617e378192433317d8ad7

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