The QR-Based Fake URL Detection System is an intelligent tool designed to analyze QR codes, extract URLs, and classify them as either genuine or fake. Using a combination of image processing, feature engineering, and machine learning.
-
User Uploads QR Code Image
- The user uploads a QR code image via a Vite + React-based frontend.
-
Image Sent to Flask API for Processing
- The uploaded image is sent to a Flask backend for further processing.
-
QR Code Decoding
- The Flask API extracts the URL from the QR code using libraries like OpenCV and Pyzbar.
-
URL Analysis
- Checks if the URL is shortened and resolves it if necessary.
- Extracts URL features (length, keywords, patterns, etc.) through feature engineering.
-
Prediction
- A machine learning model (XGBoost classifier) predicts whether the URL is real or fake based on extracted features.
-
Response Generation
- The system sends the prediction result (in JSON format) to the frontend for user feedback.
-
Frontend:
- User-friendly interface for uploading QR code images.
- Built with Vite and React for fast and interactive performance.
-
Backend:
- Flask-based API for processing images and handling predictions.
- Image decoding powered by OpenCV and Pyzbar.
-
Machine Learning:
- Utilizes an XGBoost classification model to predict URL authenticity.
- Feature engineering extracts meaningful patterns for accurate predictions.
-
Short URL Resolution:
- Handles shortened URLs by expanding them before analysis.
-
JSON Response:
- Provides structured and concise feedback to the user.
- Frontend: React, Vite, Tailwind CSS
- Backend: Flask, OpenCV, Pyzbar
- Machine Learning: XGBoost
- Feature Engineering: URL pattern analysis, length detection, and keyword extraction
- Data Exchange: RESTful API with JSON responses
- Python 3.8+
- Node.js 16+
- pipenv (for Python dependencies)
- Clone the repository:
git clone https://github.com/yourusername/qr-fake-url-detector.git
2.Navigate to the backend folder
cd back
3.Start the Flask API (Verify to install the dependencies
python server.py
1.Navigate to the frontend folder & Install dependencies
npm install
2.Start the React application
npm run dev