1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/sqlmap.md
Managor 8e09a08059
common*: refresh old pages part 3 (#16257)
Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-04-25 21:19:03 +03:00

906 B

sqlmap

Detect and exploit SQL injection flaws. More information: https://sqlmap.org.

  • Run sqlmap against a single target URL:

python sqlmap.py {{[-u|--url]}} "{{http://www.example.com/vuln.php?id=1}}"

  • Send data in a POST request (--data implies POST request):

python sqlmap.py {{[-u|--url]}} "{{http://www.example.com/vuln.php}}" --data="{{id=1}}"

  • Change the parameter delimiter (& is the default):

python sqlmap.py {{[-u|--url]}} "{{http://www.example.com/vuln.php}}" --data="{{query=foobar;id=1}}" --param-del="{{;}}"

  • Select a random User-Agent from ./txt/user-agents.txt and use it:

python sqlmap.py {{[-u|--url]}} "{{http://www.example.com/vuln.php}}" --random-agent

  • Provide user credentials for HTTP protocol authentication:

python sqlmap.py {{[-u|--url]}} "{{http://www.example.com/vuln.php}}" --auth-type {{Basic}} --auth-cred "{{testuser:testpass}}"