Understand Verbosity Levels with the -v Option
In this step, you will learn about the verbosity levels in sqlmap using the -v option. Verbosity levels control the amount of information sqlmap displays during its execution, which can be very useful for debugging or getting more detailed insights into its operations.
The -v option ranges from 0 (silent) to 6 (debug). Let's try a few to see the difference.
First, try a low verbosity level (e.g., 0):
sqlmap -u "http://testphp.vulnweb.com/listproducts.php?cat=1" -v 0 --batch
You will notice very little output, as sqlmap is running silently. The --batch option is added to avoid interactive prompts for this demonstration.
Next, try a higher verbosity level (e.g., 3):
sqlmap -u "http://testphp.vulnweb.com/listproducts.php?cat=1" -v 3 --batch
You will see significantly more output, including HTTP requests, responses, and detailed information about the testing process. This level is often useful for understanding what sqlmap is doing behind the scenes.
_
_ __ _ __| | __ ___ ___
| '_ \| '__| |/ / / __|/ __|
| |_) | | | < \__ \\__ \
| .__/|_| |_|\_\ |___/|___/
|_|
... (truncated output) ...
[HH:MM:SS] [INFO] starting @ HH:MM:SS /YYYY-MM-DD/
[HH:MM:SS] [INFO] fetched data: 'cat=1'
[HH:MM:SS] [INFO] testing connection to the target URL
[HH:MM:SS] [INFO] checking if the target is protected by some kind of WAF/IPS/IDS
[HH:MM:SS] [INFO] the target URL is not protected by any kind of WAF/IPS/IDS
[HH:MM:SS] [INFO] testing if the target URL is stable
[HH:MM:SS] [INFO] target URL is stable
[HH:MM:SS] [INFO] testing for GET parameter 'cat'
[HH:MM:SS] [INFO] GET parameter 'cat' is vulnerable.
... (truncated output) ...
Understanding verbosity levels helps you control the amount of information displayed, which is crucial for efficient analysis during penetration testing.