Skip to content

A powerful browser extension and web application that helps protect users from phishing websites by analyzing URLs and website content in real-time. This project combines machine learning with web security to provide an extra layer of protection against malicious websites.

License

Notifications You must be signed in to change notification settings

phoenixdev100/PhishGuard

Repository files navigation

🛡️ Phishing Website Detection

Python Version Flask License

🌟 Overview

A powerful browser extension and web application that helps protect users from phishing websites by analyzing URLs and website content in real-time. This project combines machine learning with web security to provide an extra layer of protection against malicious websites.

✨ Features

  • 🔍 Real-time URL analysis
  • 🤖 Machine learning-based phishing detection
  • 🛡️ Browser extension integration
  • 📊 Detailed threat analysis
  • 🚀 Fast and efficient processing
  • 🔒 Privacy-focused design
  • 🔄 Auto-check functionality for real-time protection
  • 📈 Confidence score display with percentage accuracy
  • 📝 URL scanning history with clear functionality
  • 🎨 Compact, modern user interface
  • 🔔 Smart notifications system
  • ⚡ Efficient retry mechanism for reliable scanning

🛠️ Installation

Prerequisites

  • Python 3.8 or higher
  • Modern web browser (Chrome, Firefox, or Edge)

Setup

  1. Clone the repository:
git clone https://github.com/phoenixdev100/phishing-website-detection.git
cd phishing-website-detection
  1. Create and activate a virtual environment:
# On Windows
python -m venv venv
.\venv\Scripts\activate

# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies with specific versions to avoid compatibility issues:
pip install Flask==2.2.2
pip install Werkzeug==2.2.2
pip install -r requirements.txt
  1. Steps to load the browser extension (optional):

    • Open your browser's extension management page
    • Enable "Developer mode"
    • Click "Load unpacked" and select the project directory
  2. Make sure to run the flask server before using the extension if you are trying to run extension locally.

🚀 Usage

  1. Start the Flask server:
# Make sure you're in the virtual environment
python app.py
  1. The browser extension will automatically analyze websites you visit and display warnings for potential phishing attempts.

Troubleshooting

If you encounter the error ImportError: cannot import name 'url_quote' from 'werkzeug.urls', try these steps:

  1. Deactivate and reactivate your virtual environment:
deactivate
.\venv\Scripts\activate  # On Windows
# or
source venv/bin/activate  # On macOS/Linux
  1. Reinstall the dependencies with specific versions:
pip uninstall Flask Werkzeug
pip install Flask==2.2.2 Werkzeug==2.2.2
  1. Open your browser and navigate to:
http://localhost:5000

🧠 How It Works

The system uses multiple features to detect phishing websites:

  • URL analysis
  • Domain age and registration details
  • Website content analysis
  • Machine learning model predictions
  • SSL certificate verification
  • Real-time confidence scoring
  • Smart retry mechanism
  • Automated URL validation
  • Historical data analysis
  • Pattern recognition

📁 Project Structure

phishing-website-detection/
├── app.py                 # Flask application
├── extension/            # Chrome extension files
│   ├── background.js     # Background service worker
│   ├── popup.html       # Extension popup interface
│   ├── popup.js         # Popup functionality
│   ├── content.js       # Content script
│   ├── content.css      # Content styles
│   └── manifest.json    # Extension configuration
├── train_model.py        # Model training script
├── phishing_model.pkl    # Trained model
└── requirements.txt      # Python dependencies

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Thanks to all contributors who have helped improve this project
  • Special thanks to the open-source community for their valuable tools and libraries

Made with ❤️ by Deepak

About

A powerful browser extension and web application that helps protect users from phishing websites by analyzing URLs and website content in real-time. This project combines machine learning with web security to provide an extra layer of protection against malicious websites.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published