AutoPhishingDetector is a machine learning-based API that detects phishing messages and identifies suspicious links.
- Detects phishing messages with XGBoost model.
- Analyzes messages for suspicious links.
- Provides REST API for easy integration.
-
Clone the repository:
git clone https://github.com/MNafari/AutoPhishingDetector.git cd AutoPhishingDetector -
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
-
Start the API server:
python src/app.py
-
Test API with curl:
curl -X POST http://127.0.0.1:5000/detect -H "Content-Type: application/json" -d '{"message": "Congratulations! You have won a $500 Amazon gift card. Click here to claim it now."}'
-
Expected response:
{ "message": "Congratulations! You have won a $500 Amazon gift card. Click here to claim it now.", "phishing_probability": 61.67, "is_phishing": true, "contains_suspicious_links": false, "extracted_links": [] }
-
Build Docker image:
docker build -t phishing-detector . -
Run the container:
docker run -p 5000:5000 phishing-detector
This project is licensed under the MIT License.