A modern web-based tool that combines AI analysis and threat intelligence to detect phishing attempts. Built with vanilla JavaScript, it provides real-time URL analysis using GPT models and VirusTotal's comprehensive threat database.
- π Dual Analysis: AI-powered URL analysis + threat intelligence
- π· OCR Support: Extract URLs from images using Tesseract.js
- π€ Multiple AI Models: Support for GPT-4, Claude, Gemini, and more
- π‘οΈ Real-time Scanning: Live threat detection via VirusTotal
- π± Responsive Design: Works on desktop and mobile devices
- π Privacy-Focused: No data storage, client-side processing
- β‘ Fast & Lightweight: No heavy frameworks, pure JavaScript
git clone https://github.com/yourusername/smart-phishing-detector.git
cd smart-phishing-detectorEdit api-key.js and add your API keys:
// Get your OpenRouter key from: https://openrouter.ai/keys
const OPENROUTER_API_KEY = 'your_openrouter_api_key_here';
// Get your VirusTotal key from: https://www.virustotal.com/gui/join-us
const VIRUSTOTAL_API_KEY = 'your_virustotal_api_key_here';
// Optional: Choose your preferred AI model
const GPT_MODEL = 'openai/gpt-4'; // or 'anthropic/claude-3-opus', etc.Simply open index.html in your web browser. No server setup required!
- Visit OpenRouter
- Sign up for a free account
- Generate an API key
- Add funds to your account (pay-per-use)
- Visit VirusTotal
- Create a free account
- Get your API key from the profile section
- Modern browser with ES6+ support
- Internet connection for API calls
- JavaScript enabled
- Paste or type a URL in the input field
- Click "Check URL"
- View AI analysis and threat intelligence results
- Upload an image containing a URL (screenshot, email, etc.)
- Click "Extract & Check URL"
- The tool will extract the URL and analyze it automatically
- Risk Level: Low/Medium/High assessment
- Key Findings: Main concerns identified
- Analysis: Detailed explanation
- Recommendation: What you should do
- Detection Rate: How many security vendors flagged the URL
- Vendor Results: Specific threats detected
- Scan Date: When the URL was last analyzed
- Full Report: Link to detailed VirusTotal report
- Clear "SAFE" or "DANGEROUS" badge
- Combined analysis from both sources
- Actionable advice
smart-phishing-detector/
βββ index.html # Main UI
βββ style.css # Modern, responsive styles
βββ api-key.js # API key configuration (local only)
βββ scripts/
β βββ ocr.js # Tesseract.js OCR functionality
β βββ gpt-check.js # OpenRouter GPT analysis
β βββ vt-check.js # VirusTotal threat intelligence
βββ assets/ # Icons and sample images
βββ docs/ # Documentation
β βββ walkthrough.md # How it works guide
β βββ model-info.md # Technical details
βββ README.md # This file
Choose your preferred AI model in api-key.js:
// Available models:
const GPT_MODEL = 'openai/gpt-4'; // Best analysis, higher cost
const GPT_MODEL = 'anthropic/claude-3-opus'; // Advanced reasoning
const GPT_MODEL = 'google/gemini-pro'; // Cost-effective
const GPT_MODEL = 'mistralai/mistral-large'; // Open model- Modify
style.cssfor custom styling - Edit prompts in
scripts/gpt-check.jsfor different analysis focus - Adjust OCR settings in
scripts/ocr.jsfor better text extraction
- β No URLs are stored or logged
- β All processing happens in real-time
- β API keys kept local and secure
- β No personal data collection
- β Client-side OCR processing
- β HTTPS-only API calls
- β Input validation and sanitization
- β Rate limiting compliance
- β Error handling without data exposure
- GPT-4: ~$0.03 per 1K input tokens
- Claude-3 Opus: ~$0.015 per 1K input tokens
- Gemini Pro: ~$0.0005 per 1K input tokens
- Free Tier: 4 requests/minute, 500 requests/day
- Paid Plans: Starting at $10/month
- Use appropriate model for your use case
- Monitor usage to stay within budget
- Consider caching for repeated checks
- Add your API keys to
api-key.js - Ensure keys are valid and have proper permissions
- Check for typos in the configuration
- Try a clearer image with better contrast
- Ensure the URL is clearly visible
- Check that the image format is supported
- Check your internet connection
- Verify API services are available
- Try again in a few minutes
- Check the browser console for detailed error messages
- Verify your API keys are working
- Test with known safe URLs first
- Consult the documentation in
docs/
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Additional AI models
- More threat intelligence sources
- Browser extension version
- Server-side API endpoint
- Machine learning enhancements
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenRouter for AI model access
- VirusTotal for threat intelligence
- Tesseract.js for OCR functionality
- Font Awesome for icons
If you need help or have questions:
- Check the documentation in
docs/ - Open an issue on GitHub
- Test with known URLs first