An AI-powered web application for detecting phishing emails using Google's Gemini API with function calling capabilities.
- Gemini AI-Powered Analysis: Leverages Google's Gemini AI models to analyze email content for phishing indicators
- Multi-factor Detection: Examines sender information, links, urgency language, threats, and manipulation tactics
- Comprehensive Reporting: Provides a risk assessment with confidence score and detailed explanations
- User-Friendly Interface: Clean, intuitive UI for easy analysis of suspicious emails
- Backend: Flask (Python)
- AI Integration: Google Gemini API with function calling
- Frontend: HTML, CSS, JavaScript
- Styling: TailwindCSS and Font Awesome
- Python 3.8 or higher
- Google Gemini API key
- pip (Python package installer)
-
Clone this repository:
git clone https://github.com/yourusername/phishai-detector.git cd phishai-detector -
Create a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile in the root directory with your Google Gemini API key:GOOGLE_API_KEY=your_gemini_api_key_here FLASK_ENV=development
-
Start the Flask application:
python app.py -
Open your web browser and navigate to:
http://127.0.0.1:5000
phishai-detector/
├── static/
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── app.js
├── templates/
│ └── index.html
├── app.py
├── requirements.txt
├── README.md
└── .env
- Paste a suspicious email into the text area
- Click "Analyze Email" to start the AI analysis
- Review the risk assessment and detailed indicators
- Alternatively, try one of the example phishing emails
If you don't have a Google Gemini API key, the application will run in mock mode with simulated analysis. This is useful for development and testing.
- Visit the Google AI Developer Portal
- Sign in with your Google account
- Navigate to the API section
- Create a new API key
- Add the key to your
.envfile
- Add user authentication
- Implement email forwarding for automatic checking
- Create a database to store analysis history
- Build a browser extension for quick analysis
- Add reporting and sharing features
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational purposes only. Always exercise caution with suspicious emails and follow your organization's security policies.