sqlmap Discord Webhook Addition
This project automates SQL injection testing using SQLMap and sends alerts to a Discord webhook when a vulnerability is detected. It supports testing individual URLs as well as multiple URLs from a file.
- SQLMap installed on your system.
curl
installed for sending HTTP requests to Discord.- Bash shell for running the provided scripts.
-
Set Up Your Discord Webhook
Replace
YOUR_WEBHOOK_URL
in thewebhook.sh
andsqlmap.sh
script with your actual Discord webhook URL. You can find this URL in your Discord server settings. -
Update bash File Scripts
Edit the
webhook.sh
file to include your Discord webhook URL: Edit thesqlmap.sh
file to include your Discord webhook URL:WEBHOOK_URL="WEBHOOK Here"
Ensure sqlmap.sh and webhook.sh is executable using chmod +x sqlmap.sh / webhook.sh
Testing a Single URL To test a single URL and receive alerts, use the following command:
./sqlmap.sh -u "http://example.com/vuln.php?id=1" --dbs --batch --hostname --alert="./webhook.sh $$" This command runs SQLMap on the specified URL, and if a vulnerability is detected, the webhook.sh script will send an alert to your Discord webhook with the URL being tested.
To test multiple URLs from a file, ensure your urls.txt file has one URL per line:
Run SQLMap with the following command:
./sqlmap.sh -f urls.txt --dbs --level=3 --risk=3 --alert="./webhook.sh $$" This command will iterate through each URL in the urls.txt file and run SQLMap on each one. Alerts will be sent to your Discord webhook for each detected vulnerability.
./sqlmap.sh -f urls.txt --dbs --batch --level=5 --risk=3 --random-agent --dump --hostname
waybackurls domain.com | gf sqli | ./sqlmap.sh --dbs --batch --level=5 --risk=3 --random-agent --dump --hostname
Make sure that webhook.sh has execution permissions. You can set this with chmod +x webhook.sh. Ensure that sqlmap.sh has execution permissions. You can set this with chmod +x sqlmap.sh. Adjust the SQLMap options according to your needs. Refer to SQLMap's documentation for more details on available options. Using the --alert=./webhook.sh /$/$" is not needed if you are using the ./sqlmap.sh there is no issues if you use it or dont
Feel free to contact me below if there is any issues or additions you would like to see. Twitter: https://x.com/Shad0wH3x