A Python-based system for decoding and auditing QR codes to detect potential security threats. This tool analyzes QR codes, validates their content, and categorizes URLs while integrating with the urlscan.io API for advanced threat detection. Users can interact with the system through a user-friendly Gradio interface, and visual reports are generated for easy interpretation.
- QR Code Decoding: Extracts text or URLs from QR codes using OpenCV.
- URL Validation: Ensures the content is a valid URL and categorizes it (e.g., Social Media, File Downloads).
- Threat Detection: Integrates with the urlscan.io API to identify phishing, malware, and other cyber threats.
- Report Generation: Creates visual summaries of analysis results using Matplotlib.
- Web Interface: A Gradio-powered interface for real-time interaction.
qr-code-exploit-detector/
│
├── README.md # Documentation for the repository
├── requirements.txt # Python dependencies for the project
├── main.py # Main script to launch the Gradio app
├── qr_decoder.py # QR code decoding logic using OpenCV
├── url_validator.py # URL validation and categorization module
├── threat_detector.py # Threat analysis using urlscan.io API
├── report_generator.py # Matplotlib-based report generation
└── static/ # Contains static assets (images, diagrams, etc.)
git clone https://github.com/deveshpujnabi/QR-Code-Exploit-Detector.git
cd qr-code-audit-detectorpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateInstall the required Python libraries listed in requirements.txt:
pip install -r requirements.txtRegister at urlscan.io to get an API key. Add your API key to an environment variable or directly into the code where required.
Run the main script to start the Gradio interface:
python main.py- Upload or capture a QR code image.
- View the decoded content, URL analysis, and threat detection results.
- Generate visual audit reports for comprehensive insights.
- Endpoint:
https://urlscan.io/api/v1/scan/ - Features:
- Submits URLs for real-time analysis.
- Detects phishing, malware, and other threats.
- Provides a detailed scan report with tags and threat details.
This project is licensed under the MIT License. See the LICENSE file for more details.
- OpenCV Documentation: https://docs.opencv.org
- urlscan.io API Guide: https://urlscan.io/docs/api/
- Matplotlib Documentation: https://matplotlib.org/stable/contents.html