Automatic SQL injection and database takeover tool
Go to file
Wilbert Chandra 2270c8981b Add UI and utility functions for SQL injection testing
- Implemented a new UI module (sql_cli/ui.py) for displaying banners and scan results using the Rich library.
- Created utility functions in sql_cli/utils.py for generating log filenames and saving logs.
- Refactored sqlmapcli.py to utilize the new UI and utility functions, enhancing the interactive mode and scan processes.
- Added support for custom headers and POST data in the interactive mode.
- Introduced a test endpoints JSON file (test_endpoints.json) for batch testing.
2026-01-07 12:49:14 +00:00
.github Bump python-version for GitHub tests 2025-02-10 22:06:10 +01:00
data Minor update 2026-01-05 00:31:50 +01:00
doc Adding credits for --tui (#5965) 2026-01-02 01:35:56 +01:00
extra Year bump 2026-01-01 19:12:07 +01:00
lib Minor update 2026-01-05 00:31:50 +01:00
plugins Year bump 2026-01-01 19:12:07 +01:00
sql_cli Add UI and utility functions for SQL injection testing 2026-01-07 12:49:14 +00:00
tamper Year bump 2026-01-01 19:12:07 +01:00
thirdparty Getting rid of the codecs.open (python3.14) 2025-08-11 17:10:31 +02:00
.gitattributes Renaming Twitter to X 2024-03-01 13:08:03 +01:00
.gitignore Add batch processing with concurrency and automatic log saving to logs folder 2026-01-07 12:30:45 +00:00
endpoints.json.example Add UI and utility functions for SQL injection testing 2026-01-07 12:49:14 +00:00
EXAMPLES.md Add batch processing with concurrency and automatic log saving to logs folder 2026-01-07 12:30:45 +00:00
IMPLEMENTATION_SUMMARY.md Add implementation summary documentation 2026-01-05 18:21:51 +00:00
LICENSE Year bump 2026-01-01 19:12:07 +01:00
README.md Add batch processing with concurrency and automatic log saving to logs folder 2026-01-07 12:30:45 +00:00
sqlmap.conf Adding switch --http1.0 2025-08-18 11:53:30 +02:00
sqlmap.py Year bump 2026-01-01 19:12:07 +01:00
sqlmapapi.py Year bump 2026-01-01 19:12:07 +01:00
sqlmapapi.yaml Trivial update 2021-07-23 11:04:30 +02:00
sqlmapcli.py Add UI and utility functions for SQL injection testing 2026-01-07 12:49:14 +00:00
test_endpoints.json Add UI and utility functions for SQL injection testing 2026-01-07 12:49:14 +00:00

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