sqlmap-ai

Installation

Prerequisites

Step 1: Install SQLMap

First, install SQLMap globally on your system:

# Kali/Debian/Ubuntu
sudo apt install sqlmap

# macOS
brew install sqlmap

# Or from source
git clone https://github.com/sqlmapproject/sqlmap.git
cd sqlmap
sudo python setup.py install

# Verify installation
sqlmap --version

Step 2: Install SQLMap AI

# Clone the repository
git clone https://github.com/atiilla/sqlmap-ai.git
cd sqlmap-ai

# Install the package
pip install -e .

# Or install from PyPI
pip install sqlmap-ai

# Run installation check (creates config files)
sqlmap-ai --install-check

Step 3: Configure AI Providers

Choose one or more AI providers to use:

  1. Get a free API key from https://console.groq.com
  2. Add to your .env file:
    GROQ_API_KEY=your_groq_api_key_here
    

Option B: DeepSeek (Affordable)

  1. Get an API key from https://platform.deepseek.com
  2. Add to your .env file:
    DEEPSEEK_API_KEY=your_deepseek_api_key_here
    

Option C: OpenAI

  1. Get an API key from https://platform.openai.com
  2. Add to your .env file:
    OPENAI_API_KEY=your_openai_api_key_here
    

Option D: Anthropic (Claude)

  1. Get an API key from https://console.anthropic.com
  2. Add to your .env file:
    ANTHROPIC_API_KEY=your_anthropic_api_key_here
    

Option E: Ollama (Local AI - Privacy Focused)

  1. Install Ollama: https://ollama.ai/download
  2. Start Ollama service:
    ollama serve
    
  3. Download a model:
    ollama pull llama3.2
    
  4. Enable in your .env file:
    ENABLE_OLLAMA=true
    OLLAMA_MODEL=llama3.2
    

Ollama Model Selection

If using Ollama, you can select different models:

# List available models
sqlmap-ai --list-ollama-models

# Interactive model selection
sqlmap-ai --config-wizard

Popular models:

Step 4: Run Configuration Wizard

# Interactive setup
sqlmap-ai --config-wizard

This will:

Step 5: Test Your Setup

# Check if everything is working
sqlmap-ai --check-providers

# List available Ollama models (if using Ollama)
sqlmap-ai --list-ollama-models

AI Providers Comparison

Provider Setup Speed Privacy Cost
Groq API Key Fastest Cloud Free tier available
DeepSeek API Key Fast Cloud Affordable
OpenAI API Key Fast Cloud Pay per use
Anthropic API Key Fast Cloud Pay per use
Ollama Local install Fast Local Free