sqlmap/README.md
copilot-swe-agent[bot] 9803ef57df Add batch processing with concurrency and automatic log saving to logs folder
Co-authored-by: GilbertKrantz <90319182+GilbertKrantz@users.noreply.github.com>
2026-01-07 12:30:45 +00:00

8.0 KiB

sqlmap

.github/workflows/tests.yml Python 2.7|3.x License x

sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester, and a broad range of switches including database fingerprinting, over data fetching from the database, accessing the underlying file system, and executing commands on the operating system via out-of-band connections.

Screenshots

Screenshot

You can visit the collection of screenshots demonstrating some of the features on the wiki.

Installation

You can download the latest tarball by clicking here or latest zipball by clicking here.

Preferably, you can download sqlmap by cloning the Git repository:

git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev

sqlmap works out of the box with Python version 2.7 and 3.x on any platform.

Usage

SQLMap CLI - Beautiful Automated Testing 🎨

NEW: We now have a beautiful CLI wrapper that automates comprehensive SQL injection testing in a single command!

Quick Start

Install dependencies:

pip install -r requirements.txt

Examples

Quick scan (default settings):

python sqlmapcli.py -u "https://demo.owasp-juice.shop/rest/products/search?q=test"

Comprehensive scan (tests all risk and level combinations):

python sqlmapcli.py -u "https://demo.owasp-juice.shop/rest/products/search?q=test" --comprehensive

Custom level and risk:

python sqlmapcli.py -u "https://demo.owasp-juice.shop/rest/products/search?q=test" --level 3 --risk 2

Interactive mode:

python sqlmapcli.py --interactive

Interactive mode now prompts for POST data/body, supporting both JSON and form data.

Features

Beautiful output with Rich library - panels, tables, progress bars
One-line comprehensive testing - test all risk/level combinations automatically
📊 Clear result summaries - vulnerability tables with color-coded findings
🎯 Interactive mode - guided prompts for easy testing, including POST data support
⏱️ Progress tracking - see exactly what's being tested in real-time
🔄 Batch processing - test multiple endpoints with configurable concurrency
📝 Automatic logging - saves all scan results to logs/ folder

CLI Options

-u, --url              Target URL
-b, --batch-file       JSON file with multiple endpoints
-c, --concurrency      Concurrent scans for batch mode (default: 5)
--comprehensive        Run all risk/level combinations (1-3 risk, 1-5 levels)
--level {1-5}         Test level (default: 1)
--risk {1-3}          Test risk (default: 1)
--max-level {1-5}     Maximum level for comprehensive scan
--max-risk {1-3}      Maximum risk for comprehensive scan
--technique           SQL injection techniques (default: BEUSTQ)
--data                POST data string (JSON or form data)
--raw                 Show raw sqlmap output (bypasses formatting)
--verbose {0-6}       Sqlmap verbosity level (default: 1)
--no-logs             Disable automatic log saving
-i, --interactive     Interactive mode

Note: Use --raw flag to see the exact same output as running sqlmap directly. This ensures you get all details that sqlmap provides without any formatting or parsing.

Batch Mode: Test multiple endpoints from a JSON file with concurrent scanning. See endpoints.json.example for format.


Original SQLMap Usage

To get a list of basic options and switches use:

python sqlmap.py -h

To get a list of all options and switches use:

python sqlmap.py -hh

You can find a sample run here. To get an overview of sqlmap capabilities, a list of supported features, and a description of all options and switches, along with examples, you are advised to consult the user's manual.

Translations