A hybrid fraud detection system that analyzes URLs and QR codes to identify potential phishing or fraudulent links. This project leverages machine learning and rule-based analysis to classify links as safe or fraudulent, providing a confidence score and risk level.
✅ URL Analysis - Detects malicious or suspicious URLs based on domain characteristics, patterns, and ML models.
✅ QR Code Analysis - Extracts and scans URLs from QR codes for potential fraud.
✅ Risk Level & Confidence Score - Displays fraud probability with a risk level (Low/Medium/High).
✅ History Tracking - Saves previously analyzed URLs and QR codes for reference.
✅ Real-Time Detection - Provides instant feedback on URLs & QR codes.
✅ Cross-Origin Support (CORS) - Allows frontend (JavaScript) to communicate with backend (Flask).
- Frontend: HTML, CSS, JavaScript
- Backend: Python (Flask)
- Machine Learning: Scikit-learn, Pandas, NumPy
- QR Code Processing: OpenCV, pyzbar, Pillow
- CORS Handling: Flask-CORS
precision recall f1-score support
0 0.87 0.83 0.85 172
1 0.79 0.84 0.81 128
accuracy 0.83 300
macro avg 0.83 0.83 0.83 300
weighted avg 0.84 0.83 0.83 300
precision recall f1-score support
0 0.85 0.90 0.88 162
1 0.88 0.82 0.85 138
accuracy 0.86 300
macro avg 0.86 0.86 0.86 300
weighted avg 0.86 0.86 0.86 300
git clone https://github.com/yourusername/fraud-detection.git
cd fraud-detection
pip install -r requirements.txt
To avoid DLL-related errors (e.g., when using pyzbar
or OpenCV
), please install the Microsoft Visual C++ Redistributable packages from 2008 to 2015.
🔗 Download Links:
-
Visual C++ 2008 Redistributable (x64/x86): Download
-
Visual C++ 2010 Redistributable (x64/x86): Download
-
Visual C++ 2012 Redistributable (x64/x86): Download
-
Visual C++ 2013 Redistributable (x64/x86): Download
-
Visual C++ 2015-2022 Redistributable (x64): Download
-
Visual C++ 2015-2022 Redistributable (x86): Download
Make sure to install both x86 and x64 versions if you are running a 64-bit operating system.
python app.py
(Runs on http://127.0.0.1:5000/ by default)
Open index.html
in a browser or use Live Server (VS Code).
Endpoint: POST /analyze-url
{
"url": "https://example.com"
}
{
"is_fraud": true,
"confidence": 85.6,
"risk_level": "High",
"risk_factors": ["Suspicious domain", "Contains unusual characters"]
}
Endpoint: POST /analyze-qr
Upload an image containing a QR code
{
"is_fraud": false,
"confidence": 32.4,
"risk_level": "Low"
}
- Ritesh Brahmachari
- Satyabrata Panigrahi
- Tanisha Dutta