ClickSafe is an advanced security tool that helps users identify potentially malicious links and email content. Built with Python Flask and a modern web interface, it provides real-time analysis to protect against phishing attempts, malware, and online scams.
- Comprehensive URL Scanning: Deep analysis of URLs for potential threats
- Risk Assessment: Categorizes links as Safe, Suspicious, or Dangerous
- Detailed Reports: Provides clear explanations for risk assessments
- Confidence Scoring: Indicates the reliability of each analysis
- Batch Processing: Analyze multiple links simultaneously
- Phishing Detection: Identifies common phishing patterns and social engineering attempts
- Spoofing Alerts: Detects email spoofing and impersonation attempts
- Malware Link Detection: Flags suspicious download links and attachments
- Content Analysis: Evaluates email content for suspicious patterns
-
URL Analysis
- URL shortener detection
- Suspicious domain patterns (IDN homograph attacks, typosquatting)
- IP address usage detection
- HTTPS/SSL validation
- URL length and structure analysis
- Query parameter inspection
-
Domain Analysis
- Trusted domain whitelist
- Suspicious TLD detection
- Domain age and reputation checking (future)
- SSL certificate validation (future)
-
Content Analysis
- Phishing keyword detection
- Suspicious file extension identification
- Malware pattern matching
- Social engineering red flags
- Python 3.7 or higher
- Node.js 14+ (for frontend development)
- pip package manager
-
Clone the repository:
git clone https://github.com/yourusername/ClickSafe.git cd ClickSafe -
Create and activate a virtual environment:
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install Python dependencies:
pip install -r requirements.txt
- Install Node.js dependencies:
npm install
-
Start the Flask backend:
python app.py
-
In a new terminal, start the development server:
npm start
-
Access the web interface at
http://localhost:5000
For production deployment, use Gunicorn:
gunicorn --bind 0.0.0.0:5000 app:appOr deploy using Vercel with the included vercel.json configuration.
-
ModuleNotFoundError: No module named 'flask_cors'
- Solution: Ensure you've installed dependencies with
pip install -r requirements.txt - Verify the package is installed with
pip list | grep -i flask
- Solution: Ensure you've installed dependencies with
-
ModuleNotFoundError: No module named 'flask'
- Solution: Ensure you've installed dependencies with
pip install -r requirements.txt - Verify the package is installed with
pip list | grep -i flask
- Solution: Ensure you've installed dependencies with
-
FileNotFoundError: [Errno 2] No such file or directory: 'index.html'
- Solution: Ensure the index.html file is in the same directory as app.py
- Verify with
ls -la(Linux/Mac) ordir(Windows)
-
Port already in use
- Solution: Stop any existing instances of the app or change the port in app.py
- Kill existing processes:
lsof -i :5000(Linux/Mac) ornetstat -ano | findstr :5000(Windows)
To verify all dependencies are installed correctly:
pip install -r requirements.
python -c "import flask; import flask_cors; print('All dependencies installed successfully')"- POST /api/analyze - Analyze a single URL
- POST /api/batch-analyze - Analyze multiple URLs
- GET /api/health - Health check endpoint
- GET /api/stats - Get detector statistics
Health Check:
curl -X GET http://localhost:5000/api/healthSingle URL Analysis:
curl -X POST http://localhost:5000/api/analyze \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Batch URL Analysis:
curl -X POST http://localhost:5000/api/batch-analyze \
-H "Content-Type: application/json" \
-d '{"urls": ["https://google.com", "https://github.com"]}'Run the test suite using either:
# Run JavaScript tests
npm test
# Or run Python tests
python test-clicksafe.pyTest coverage includes:
- URL analysis accuracy
- Email content parsing
- Risk assessment logic
- API endpoint functionality
- Edge case handling
The application is configured for deployment on Vercel through the vercel.json configuration file.
For production deployment, you can use Gunicorn:
gunicorn --bind 0.0.0.0:5000 app:app-
Enhanced Detection
- Real-time threat intelligence integration
- Machine learning for pattern recognition
- Browser extension for on-the-fly analysis
- Mobile application for on-the-go protection
-
Advanced Analytics
- Historical analysis and trend tracking
- Custom threat intelligence feeds
- User reporting system
- Community-driven threat database
-
Enterprise Features
- API rate limiting and authentication
- Detailed audit logs
- Custom rule configuration
- Team collaboration tools
We welcome contributions! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ❤️ using Python, Flask, and modern web technologies
- Inspired by the need for better online security tools
- Thanks to all contributors who have helped improve this project