This project is a server-side solution that provides seamless URL redirection upon scanning a QR code. It not only redirects the user to a specified URL but also issues a Discord webhook notification, capturing and sending the IP address information of the client who scanned the QR code.
- Server-Side QR Code Redirection: Redirects users to a specific URL after scanning the QR code.
- Discord Webhook Integration: Sends a notification to a Discord channel with the IP address and other metadata of the client who scanned the QR code.
- IP Address Logging: Captures the client's IP address for each scan and includes it in the webhook message.
- Optional MySQL Logging: Stores scan metadata (IP, OS, device info, etc.) in a MySQL database.
- Optional Scan Dashboard: Web-based interface to view and search historical scan data with filtering and pagination (
/scans/). The dashboard is fully responsive and works on both desktop and mobile devices.
- PHP
- HTML
- MySQL (Optional)
-
Ensure that PHP is installed on your system.
-
Set up a web server, such as Apache.
-
Clone the repository:
git clone https://github.com/jbohack/DEFCON-QR-Scan.git cd DEFCON-QR-Scan -
Edit the
config.phpfile to set your redirect URL, Discord webhook(s), and other options. MySQL logging can be optionally enabled in this file. -
Place the project files in your web server's root directory (e.g.,
/var/www/htmlfor Apache). -
Start your web server to run the application.
When MySQL logging is enabled, access the scan dashboard at /scans/ (example: defcon.lullaby.cafe/scans/) to:
- View historical scan data in a clean, sortable interface
- Search across all scan metadata (IP, device, location, etc.)
- Filter and paginate through scan results
- View detailed device and location information for each scan
- Fully responsive design that works on both desktop and mobile devices
All settings are centralized in config.php:
- redirectUrl: The URL to which users should be redirected after scanning the QR code.
- webhookUrls: One or more Discord webhook URL(s) where notifications will be sent.
- webhookUsername: The display name used in the Discord webhook.
- webhookAvatar: The avatar URL used for the webhook sender.
- webhookThumbnail: The image shown in the Discord embed (typically the hosted QR code).
- enableMySQLLogging: Set to
trueto log scan data to a MySQL database. - mysql: Configure MySQL connection details (host, user, password, database, and table name).
- Deploy the server to your preferred hosting solution.
- Generate a QR code that points to your server's URL.
- Distribute the QR code to users.
- Monitor the Discord channel for webhook notifications that include IP address information of users who scan the QR code.
Contributions are welcome! Please submit issues or pull requests for any improvements or features.
This project is licensed under the MIT License. Please see the LICENSE file for more details.

