sqlmap-ai 2.0.7__tar.gz → 2.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. sqlmap_ai-2.0.8/PKG-INFO +157 -0
  2. sqlmap_ai-2.0.8/README.md +88 -0
  3. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/pyproject.toml +2 -1
  4. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/setup.cfg +4 -4
  5. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/__init__.py +1 -1
  6. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/config_manager.py +15 -4
  7. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/enhanced_cli.py +17 -12
  8. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/html_reporter.py +116 -4
  9. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/main.py +333 -61
  10. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/parser.py +2 -1
  11. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/run.py +2 -2
  12. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/runner.py +242 -66
  13. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/security_manager.py +10 -6
  14. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/startup.py +6 -4
  15. sqlmap_ai-2.0.8/sqlmap_ai.egg-info/PKG-INFO +157 -0
  16. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai.egg-info/requires.txt +1 -0
  17. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/tests/test_security_manager.py +34 -6
  18. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/utils/ai_providers.py +68 -0
  19. sqlmap_ai-2.0.7/PKG-INFO +0 -670
  20. sqlmap_ai-2.0.7/README.md +0 -602
  21. sqlmap_ai-2.0.7/sqlmap_ai.egg-info/PKG-INFO +0 -670
  22. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/LICENSE +0 -0
  23. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/setup.py +0 -0
  24. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/adaptive_testing.py +0 -0
  25. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/advanced_reporting.py +0 -0
  26. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/ai_analyzer.py +0 -0
  27. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/cli.py +0 -0
  28. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/evasion_engine.py +0 -0
  29. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/templates/report_template.html +0 -0
  30. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/timeout_handler.py +0 -0
  31. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai/ui.py +0 -0
  32. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai.egg-info/SOURCES.txt +0 -0
  33. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai.egg-info/dependency_links.txt +0 -0
  34. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai.egg-info/entry_points.txt +0 -0
  35. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/sqlmap_ai.egg-info/top_level.txt +0 -0
  36. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/tests/test_config_manager.py +0 -0
  37. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/utils/__init__.py +0 -0
  38. {sqlmap_ai-2.0.7 → sqlmap_ai-2.0.8}/utils/groq_utils.py +0 -0
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlmap-ai
3
+ Version: 2.0.8
4
+ Summary: AI-powered SQL injection testing tool with multiple AI providers
5
+ Home-page: https://github.com/atiilla/sqlmap-ai
6
+ Author: Atilla
7
+ Author-email: Atilla <attilla@tuta.io>
8
+ Maintainer-email: Atilla <attilla@tuta.io>
9
+ License-Expression: MIT
10
+ Project-URL: Homepage, https://github.com/atiilla/sqlmap-ai
11
+ Project-URL: Documentation, https://github.com/atiilla/sqlmap-ai#readme
12
+ Project-URL: Repository, https://github.com/atiilla/sqlmap-ai.git
13
+ Project-URL: Issues, https://github.com/atiilla/sqlmap-ai/issues
14
+ Keywords: sqlmap,sql-injection,security,ai,penetration-testing,cybersecurity
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: Intended Audience :: System Administrators
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Topic :: Security
26
+ Classifier: Topic :: System :: Systems Administration
27
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
28
+ Classifier: Topic :: Software Development :: Testing
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: groq>=0.4.0
34
+ Requires-Dist: requests>=2.31.0
35
+ Requires-Dist: openai>=1.3.0
36
+ Requires-Dist: anthropic>=0.8.0
37
+ Requires-Dist: pyyaml>=6.0.1
38
+ Requires-Dist: rich>=13.0.0
39
+ Requires-Dist: jinja2>=3.1.2
40
+ Requires-Dist: cryptography>=3.4.0
41
+ Requires-Dist: colorama>=0.4.6
42
+ Requires-Dist: waitress>=2.1.0
43
+ Provides-Extra: dev
44
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
45
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
46
+ Requires-Dist: black>=23.0.0; extra == "dev"
47
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
48
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
49
+ Provides-Extra: local-llm
50
+ Requires-Dist: transformers>=4.35.0; extra == "local-llm"
51
+ Requires-Dist: torch>=2.1.0; extra == "local-llm"
52
+ Provides-Extra: reporting
53
+ Requires-Dist: plotly>=5.0.0; extra == "reporting"
54
+ Requires-Dist: pandas>=2.0.0; extra == "reporting"
55
+ Provides-Extra: all
56
+ Requires-Dist: pytest>=7.0.0; extra == "all"
57
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
58
+ Requires-Dist: black>=23.0.0; extra == "all"
59
+ Requires-Dist: flake8>=6.0.0; extra == "all"
60
+ Requires-Dist: mypy>=1.0.0; extra == "all"
61
+ Requires-Dist: transformers>=4.35.0; extra == "all"
62
+ Requires-Dist: torch>=2.1.0; extra == "all"
63
+ Requires-Dist: plotly>=5.0.0; extra == "all"
64
+ Requires-Dist: pandas>=2.0.0; extra == "all"
65
+ Dynamic: author
66
+ Dynamic: home-page
67
+ Dynamic: license-file
68
+ Dynamic: requires-python
69
+
70
+ # SQLMap AI Assistant
71
+
72
+ An AI-powered wrapper around SQLMap that makes SQL injection testing more accessible and automated.
73
+
74
+ ## Features
75
+
76
+ ### Core Features
77
+ - **AI-Assisted Testing** - Intelligent vulnerability analysis and recommendations
78
+ - **Adaptive Testing** - Step-by-step testing that adapts to target responses
79
+ - **Enhanced HTML Reports** - Beautiful, detailed reports with vulnerability details
80
+ - **Parameter Targeting** - Test specific parameters with `-p` option (like original SQLMap)
81
+ - **WAF Bypass** - Automatic tamper script selection for firewall evasion
82
+ - **Database Enumeration** - Complete database, table, and column discovery
83
+ - **Request File Support** - Test from Burp Suite, ZAP, or browser captures
84
+
85
+ ### AI Providers
86
+ - **Groq** - Fastest AI analysis (recommended)
87
+ - **DeepSeek** - Affordable and capable analysis
88
+ - **OpenAI** - GPT-4 powered analysis
89
+ - **Anthropic Claude** - Advanced reasoning
90
+ - **Ollama** - Local, private AI (no cloud required)
91
+
92
+ ### New in v2.0.6
93
+ - [x] **Private Network Scanning** - Local/private IP targets now allowed by default
94
+ - [x] **Configurable Network Policy** - New `allow_private_networks` security setting
95
+ - [x] **Improved Test Coverage** - Added dedicated tests for private network validation
96
+
97
+ > See the full [Changelog](docs/CHANGELOG.md) for previous versions.
98
+
99
+ <img src="sqlmap.gif"/>
100
+
101
+ ## Quick Start
102
+
103
+ **1. Install SQLMap:**
104
+ ```bash
105
+ sudo apt install sqlmap # Debian/Ubuntu/Kali
106
+ brew install sqlmap # macOS
107
+ ```
108
+
109
+ **2. Install SQLMap AI:**
110
+ ```bash
111
+ pip install sqlmap-ai
112
+ sqlmap-ai --install-check
113
+ ```
114
+
115
+ **3. Set an API key** in your `.env` file (e.g., Groq - free & fastest):
116
+ ```bash
117
+ GROQ_API_KEY=your_groq_api_key_here
118
+ ```
119
+
120
+ **4. Run:**
121
+ ```bash
122
+ sqlmap-ai -u "http://example.com/page.php?id=1"
123
+ ```
124
+
125
+ > See the full [Installation Guide](docs/INSTALLATION.md) for all providers and options.
126
+
127
+ ## Documentation
128
+
129
+ | Guide | Description |
130
+ |-------|-------------|
131
+ | [Installation](docs/INSTALLATION.md) | Prerequisites, setup, AI provider configuration |
132
+ | [Usage](docs/USAGE.md) | Examples, testing modes, request files, workflows |
133
+ | [Configuration](docs/CONFIGURATION.md) | `.env`, `config.yaml`, command-line reference |
134
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | Common issues and getting help |
135
+ | [Changelog](docs/CHANGELOG.md) | Version history |
136
+
137
+ ## Requirements
138
+
139
+ - Python 3.8+
140
+ - SQLMap (must be installed globally on your system)
141
+ - Kali/Debian/Ubuntu: `sudo apt install sqlmap`
142
+ - macOS: `brew install sqlmap`
143
+ - From source: [github.com/sqlmapproject/sqlmap](https://github.com/sqlmapproject/sqlmap)
144
+ - Internet connection (for cloud AI providers)
145
+ - 2GB+ RAM (for Ollama local models)
146
+
147
+ ## License
148
+
149
+ This project is licensed under the MIT License.
150
+
151
+ ## Disclaimer
152
+
153
+ This tool is intended for educational and ethical hacking purposes only. Always obtain permission before testing any system or application. The developers are not responsible for any misuse or damage caused by this tool.
154
+
155
+ ## Star History
156
+
157
+ [![Star History Chart](https://api.star-history.com/svg?repos=atiilla/sqlmap-ai&type=Date)](https://www.star-history.com/#atiilla/sqlmap-ai&Date)
@@ -0,0 +1,88 @@
1
+ # SQLMap AI Assistant
2
+
3
+ An AI-powered wrapper around SQLMap that makes SQL injection testing more accessible and automated.
4
+
5
+ ## Features
6
+
7
+ ### Core Features
8
+ - **AI-Assisted Testing** - Intelligent vulnerability analysis and recommendations
9
+ - **Adaptive Testing** - Step-by-step testing that adapts to target responses
10
+ - **Enhanced HTML Reports** - Beautiful, detailed reports with vulnerability details
11
+ - **Parameter Targeting** - Test specific parameters with `-p` option (like original SQLMap)
12
+ - **WAF Bypass** - Automatic tamper script selection for firewall evasion
13
+ - **Database Enumeration** - Complete database, table, and column discovery
14
+ - **Request File Support** - Test from Burp Suite, ZAP, or browser captures
15
+
16
+ ### AI Providers
17
+ - **Groq** - Fastest AI analysis (recommended)
18
+ - **DeepSeek** - Affordable and capable analysis
19
+ - **OpenAI** - GPT-4 powered analysis
20
+ - **Anthropic Claude** - Advanced reasoning
21
+ - **Ollama** - Local, private AI (no cloud required)
22
+
23
+ ### New in v2.0.6
24
+ - [x] **Private Network Scanning** - Local/private IP targets now allowed by default
25
+ - [x] **Configurable Network Policy** - New `allow_private_networks` security setting
26
+ - [x] **Improved Test Coverage** - Added dedicated tests for private network validation
27
+
28
+ > See the full [Changelog](docs/CHANGELOG.md) for previous versions.
29
+
30
+ <img src="sqlmap.gif"/>
31
+
32
+ ## Quick Start
33
+
34
+ **1. Install SQLMap:**
35
+ ```bash
36
+ sudo apt install sqlmap # Debian/Ubuntu/Kali
37
+ brew install sqlmap # macOS
38
+ ```
39
+
40
+ **2. Install SQLMap AI:**
41
+ ```bash
42
+ pip install sqlmap-ai
43
+ sqlmap-ai --install-check
44
+ ```
45
+
46
+ **3. Set an API key** in your `.env` file (e.g., Groq - free & fastest):
47
+ ```bash
48
+ GROQ_API_KEY=your_groq_api_key_here
49
+ ```
50
+
51
+ **4. Run:**
52
+ ```bash
53
+ sqlmap-ai -u "http://example.com/page.php?id=1"
54
+ ```
55
+
56
+ > See the full [Installation Guide](docs/INSTALLATION.md) for all providers and options.
57
+
58
+ ## Documentation
59
+
60
+ | Guide | Description |
61
+ |-------|-------------|
62
+ | [Installation](docs/INSTALLATION.md) | Prerequisites, setup, AI provider configuration |
63
+ | [Usage](docs/USAGE.md) | Examples, testing modes, request files, workflows |
64
+ | [Configuration](docs/CONFIGURATION.md) | `.env`, `config.yaml`, command-line reference |
65
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | Common issues and getting help |
66
+ | [Changelog](docs/CHANGELOG.md) | Version history |
67
+
68
+ ## Requirements
69
+
70
+ - Python 3.8+
71
+ - SQLMap (must be installed globally on your system)
72
+ - Kali/Debian/Ubuntu: `sudo apt install sqlmap`
73
+ - macOS: `brew install sqlmap`
74
+ - From source: [github.com/sqlmapproject/sqlmap](https://github.com/sqlmapproject/sqlmap)
75
+ - Internet connection (for cloud AI providers)
76
+ - 2GB+ RAM (for Ollama local models)
77
+
78
+ ## License
79
+
80
+ This project is licensed under the MIT License.
81
+
82
+ ## Disclaimer
83
+
84
+ This tool is intended for educational and ethical hacking purposes only. Always obtain permission before testing any system or application. The developers are not responsible for any misuse or damage caused by this tool.
85
+
86
+ ## Star History
87
+
88
+ [![Star History Chart](https://api.star-history.com/svg?repos=atiilla/sqlmap-ai&type=Date)](https://www.star-history.com/#atiilla/sqlmap-ai&Date)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sqlmap-ai"
7
- version = "2.0.7"
7
+ version = "2.0.8"
8
8
  description = "AI-powered SQL injection testing tool with multiple AI providers"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -43,6 +43,7 @@ dependencies = [
43
43
  "jinja2>=3.1.2",
44
44
  "cryptography>=3.4.0",
45
45
  "colorama>=0.4.6",
46
+ "waitress>=2.1.0",
46
47
  ]
47
48
 
48
49
  [project.optional-dependencies]
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,4 +1,4 @@
1
- __version__ = "2.0.7"
1
+ __version__ = "2.0.8"
2
2
  __author__ = "Atilla"
3
3
  __email__ = "atilla@tuta.io"
4
4
  __description__ = "AI-powered SQL injection testing tool with multiple AI providers"
@@ -35,6 +35,7 @@ class SecurityConfig:
35
35
  enable_audit_logging: bool = True
36
36
  safe_mode: bool = True
37
37
  require_confirmation: bool = True
38
+ allow_private_networks: bool = True
38
39
 
39
40
 
40
41
  @dataclass
@@ -138,6 +139,16 @@ class ConfigManager:
138
139
  rate_limit=0.5,
139
140
  priority=1
140
141
  ),
142
+ "deepseek": AIProviderConfig(
143
+ name="deepseek",
144
+ enabled=bool(os.getenv("DEEPSEEK_API_KEY")),
145
+ api_key_env="DEEPSEEK_API_KEY",
146
+ model="deepseek-chat",
147
+ max_tokens=4096,
148
+ timeout=30,
149
+ rate_limit=1.0,
150
+ priority=2
151
+ ),
141
152
  "openai": AIProviderConfig(
142
153
  name="openai",
143
154
  enabled=bool(os.getenv("OPENAI_API_KEY")),
@@ -146,7 +157,7 @@ class ConfigManager:
146
157
  max_tokens=4096,
147
158
  timeout=30,
148
159
  rate_limit=1.0,
149
- priority=2
160
+ priority=3
150
161
  ),
151
162
  "anthropic": AIProviderConfig(
152
163
  name="anthropic",
@@ -156,7 +167,7 @@ class ConfigManager:
156
167
  max_tokens=4096,
157
168
  timeout=30,
158
169
  rate_limit=1.0,
159
- priority=3
170
+ priority=4
160
171
  ),
161
172
  "local": AIProviderConfig(
162
173
  name="local",
@@ -166,7 +177,7 @@ class ConfigManager:
166
177
  max_tokens=512,
167
178
  timeout=60,
168
179
  rate_limit=0.1,
169
- priority=5
180
+ priority=6
170
181
  ),
171
182
  "ollama": AIProviderConfig(
172
183
  name="ollama",
@@ -176,7 +187,7 @@ class ConfigManager:
176
187
  max_tokens=4096,
177
188
  timeout=60,
178
189
  rate_limit=0.5,
179
- priority=4
190
+ priority=5
180
191
  )
181
192
  }
182
193
 
@@ -94,7 +94,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
94
94
  ai_group = parser.add_argument_group('AI Configuration')
95
95
  ai_group.add_argument(
96
96
  '--ai-provider',
97
- choices=['groq', 'openai', 'anthropic', 'local', 'ollama', 'auto'],
97
+ choices=['groq', 'deepseek', 'openai', 'anthropic', 'local', 'ollama', 'auto'],
98
98
  default='auto',
99
99
  help='AI provider to use (default: auto)'
100
100
  )
@@ -296,25 +296,27 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
296
296
 
297
297
  provider_options = [
298
298
  ("1", "Groq", "Fast and free API (recommended for beginners)"),
299
- ("2", "OpenAI", "GPT models (requires paid API key)"),
300
- ("3", "Anthropic", "Claude models (requires paid API key)"),
301
- ("4", "Ollama", "Local AI provider (free, requires Ollama installation)"),
299
+ ("2", "DeepSeek", "DeepSeek models (affordable API key)"),
300
+ ("3", "OpenAI", "GPT models (requires paid API key)"),
301
+ ("4", "Anthropic", "Claude models (requires paid API key)"),
302
+ ("5", "Ollama", "Local AI provider (free, requires Ollama installation)"),
302
303
  ]
303
304
 
304
305
  for num, name, desc in provider_options:
305
306
  self.console.print(f" [bold]{num}.[/bold] {name} - {desc}")
306
307
 
307
308
  while True:
308
- choice = Prompt.ask("\nSelect provider (1-4)", default="1")
309
- if choice in ["1", "2", "3", "4"]:
309
+ choice = Prompt.ask("\nSelect provider (1-5)", default="1")
310
+ if choice in ["1", "2", "3", "4", "5"]:
310
311
  break
311
- self.console.print("[red]Invalid choice. Please enter 1, 2, 3, or 4.[/red]")
312
+ self.console.print("[red]Invalid choice. Please enter 1, 2, 3, 4, or 5.[/red]")
312
313
 
313
314
  provider_map = {
314
315
  "1": ("groq", "Groq", "GROQ_API_KEY"),
315
- "2": ("openai", "OpenAI", "OPENAI_API_KEY"),
316
- "3": ("anthropic", "Anthropic", "ANTHROPIC_API_KEY"),
317
- "4": ("ollama", "Ollama", None)
316
+ "2": ("deepseek", "DeepSeek", "DEEPSEEK_API_KEY"),
317
+ "3": ("openai", "OpenAI", "OPENAI_API_KEY"),
318
+ "4": ("anthropic", "Anthropic", "ANTHROPIC_API_KEY"),
319
+ "5": ("ollama", "Ollama", None)
318
320
  }
319
321
 
320
322
  selected_provider, provider_name, env_var = provider_map[choice]
@@ -328,7 +330,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
328
330
  # Update config to set Ollama as primary provider
329
331
  config_manager.update_ai_provider("ollama", enabled=True, priority=1)
330
332
  # Disable other providers or set lower priority
331
- for other_provider in ["groq", "openai", "anthropic"]:
333
+ for other_provider in ["groq", "deepseek", "openai", "anthropic"]:
332
334
  config_manager.update_ai_provider(other_provider, enabled=False)
333
335
  else:
334
336
  # Handle API key-based providers
@@ -342,7 +344,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
342
344
  # Key exists and user doesn't want to change it, just enable the provider
343
345
  config_manager.update_ai_provider(selected_provider, enabled=True, priority=1)
344
346
  # Disable other providers
345
- for other_provider in ["groq", "openai", "anthropic", "ollama"]:
347
+ for other_provider in ["groq", "deepseek", "openai", "anthropic", "ollama"]:
346
348
  if other_provider != selected_provider:
347
349
  config_manager.update_ai_provider(other_provider, enabled=False)
348
350
  self.console.print(f"[green]✓ {provider_name} is now configured as your primary AI provider[/green]")
@@ -355,6 +357,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
355
357
 
356
358
  api_urls = {
357
359
  "groq": "https://console.groq.com/keys",
360
+ "deepseek": "https://platform.deepseek.com/api_keys",
358
361
  "openai": "https://platform.openai.com/api-keys",
359
362
  "anthropic": "https://console.anthropic.com/settings/keys"
360
363
  }
@@ -619,6 +622,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
619
622
 
620
623
  providers = {
621
624
  'Groq': 'GROQ_API_KEY',
625
+ 'DeepSeek': 'DEEPSEEK_API_KEY',
622
626
  'OpenAI': 'OPENAI_API_KEY',
623
627
  'Anthropic': 'ANTHROPIC_API_KEY',
624
628
  'Ollama': 'ENABLE_OLLAMA'
@@ -639,6 +643,7 @@ For more information, visit: https://github.com/atiilla/sqlmap-ai
639
643
  print("\nAI Provider Status:")
640
644
  providers = {
641
645
  'Groq': 'GROQ_API_KEY',
646
+ 'DeepSeek': 'DEEPSEEK_API_KEY',
642
647
  'OpenAI': 'OPENAI_API_KEY',
643
648
  'Anthropic': 'ANTHROPIC_API_KEY',
644
649
  'Ollama': 'ENABLE_OLLAMA'
@@ -184,6 +184,13 @@ class HTMLReporter:
184
184
  # Calculate scan summary
185
185
  scan_summary = self._generate_scan_summary(scan_data, assessed_vulnerabilities)
186
186
 
187
+ # Collect extracted data from scan_data and scan_history
188
+ extracted_data = dict(scan_data.get('extracted_data', {}))
189
+ for step in scan_data.get('scan_history', []):
190
+ step_extracted = step.get('result', {}).get('extracted', {})
191
+ if step_extracted:
192
+ extracted_data.update(step_extracted)
193
+
187
194
  # Generate HTML content
188
195
  html_content = self._create_html_template(
189
196
  vulnerabilities=assessed_vulnerabilities,
@@ -192,7 +199,8 @@ class HTMLReporter:
192
199
  dbms=dbms,
193
200
  raw_result=raw_result,
194
201
  scan_data=scan_data,
195
- scan_summary=scan_summary
202
+ scan_summary=scan_summary,
203
+ extracted_data=extracted_data
196
204
  )
197
205
 
198
206
  # Write HTML file
@@ -242,9 +250,10 @@ class HTMLReporter:
242
250
  'total_requests': total_steps
243
251
  }
244
252
 
245
- def _create_html_template(self, vulnerabilities: List[Dict[str, Any]], techniques: List[str],
246
- databases: List[str], dbms: str, raw_result: str,
247
- scan_data: Dict[str, Any], scan_summary: Dict[str, Any]) -> str:
253
+ def _create_html_template(self, vulnerabilities: List[Dict[str, Any]], techniques: List[str],
254
+ databases: List[str], dbms: str, raw_result: str,
255
+ scan_data: Dict[str, Any], scan_summary: Dict[str, Any],
256
+ extracted_data: Dict[str, Any] = None) -> str:
248
257
 
249
258
 
250
259
  # Use scan summary statistics
@@ -348,6 +357,9 @@ class HTMLReporter:
348
357
  <!-- Database Information -->
349
358
  {self._generate_database_section(databases, dbms, scan_data)}
350
359
 
360
+ <!-- Extracted/Dumped Data -->
361
+ {self._generate_extracted_data_section(extracted_data or {})}
362
+
351
363
  <!-- Scan History -->
352
364
  {self._generate_scan_history_section(scan_data.get('scan_history', []))}
353
365
 
@@ -587,6 +599,98 @@ class HTMLReporter:
587
599
  </div>
588
600
  """
589
601
 
602
+ def _generate_extracted_data_section(self, extracted_data: Dict[str, Any]) -> str:
603
+ """Generate HTML section showing dumped table data."""
604
+ if not extracted_data:
605
+ return ""
606
+
607
+ table_cards = ""
608
+ for table_key, data in extracted_data.items():
609
+ columns = data.get("columns", [])
610
+ entry_count = data.get("entry_count", 0)
611
+ raw_result = data.get("raw_result", "")
612
+
613
+ if not columns:
614
+ continue
615
+
616
+ # Parse rows from ASCII table
617
+ rows = self._parse_ascii_rows(raw_result, columns)
618
+
619
+ # Build HTML table header
620
+ th_cells = "".join(
621
+ f'<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">{col}</th>'
622
+ for col in columns
623
+ )
624
+
625
+ # Build HTML table rows (show up to 50 rows)
626
+ tr_rows = ""
627
+ display_rows = rows[:50]
628
+ for i, row in enumerate(display_rows):
629
+ row_bg = "bg-white" if i % 2 == 0 else "bg-gray-50"
630
+ td_cells = "".join(
631
+ f'<td class="px-4 py-2 text-sm text-gray-700 break-all max-w-xs">{cell}</td>'
632
+ for cell in row
633
+ )
634
+ tr_rows += f'<tr class="{row_bg}">{td_cells}</tr>'
635
+
636
+ truncation_note = ""
637
+ if len(rows) > 50:
638
+ truncation_note = f'<p class="text-xs text-gray-500 mt-2 italic">Showing 50 of {len(rows)} rows. Full data available in CSV export.</p>'
639
+
640
+ table_cards += f"""
641
+ <div class="mb-6">
642
+ <div class="flex items-center justify-between mb-2">
643
+ <h3 class="text-lg font-semibold text-gray-800">{table_key}</h3>
644
+ <span class="text-sm text-gray-500">{entry_count} entries</span>
645
+ </div>
646
+ <div class="overflow-x-auto border border-gray-200 rounded-lg">
647
+ <table class="min-w-full divide-y divide-gray-200">
648
+ <thead class="bg-gray-100">
649
+ <tr>{th_cells}</tr>
650
+ </thead>
651
+ <tbody class="divide-y divide-gray-200">
652
+ {tr_rows}
653
+ </tbody>
654
+ </table>
655
+ </div>
656
+ {truncation_note}
657
+ </div>
658
+ """
659
+
660
+ if not table_cards:
661
+ return ""
662
+
663
+ return f"""
664
+ <div class="mb-8">
665
+ <div class="bg-white rounded-lg shadow-lg p-6 card-hover">
666
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">📥 Dumped Table Data</h2>
667
+ <div class="mb-2">
668
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
669
+ {len(extracted_data)} table(s) dumped
670
+ </span>
671
+ </div>
672
+ {table_cards}
673
+ </div>
674
+ </div>
675
+ """
676
+
677
+ def _parse_ascii_rows(self, raw_table: str, columns: list) -> list:
678
+ """Parse data rows from a sqlmap ASCII table."""
679
+ rows = []
680
+ for line in raw_table.split("\n"):
681
+ line = line.strip()
682
+ if not line or line.startswith("+") or line.startswith("-"):
683
+ continue
684
+ if "|" not in line:
685
+ continue
686
+ cells = [c.strip() for c in line.split("|")]
687
+ cells = [c for c in cells if c != ""]
688
+ if cells == columns:
689
+ continue
690
+ if len(cells) == len(columns):
691
+ rows.append(cells)
692
+ return rows
693
+
590
694
  def _generate_scan_history_section(self, scan_history: List[Dict[str, Any]]) -> str:
591
695
 
592
696
  if not scan_history:
@@ -617,6 +721,14 @@ class HTMLReporter:
617
721
  if payloads:
618
722
  findings.append(f'<span class="text-yellow-600">• {len(payloads)} payload(s) tested</span>')
619
723
 
724
+ # Show extracted/dumped data in findings
725
+ extracted = result.get('extracted', {})
726
+ if extracted:
727
+ for tbl_key, tbl_data in extracted.items():
728
+ entry_count = tbl_data.get('entry_count', 0)
729
+ col_count = len(tbl_data.get('columns', []))
730
+ findings.append(f'<span class="text-green-600">• Dumped {tbl_key}: {entry_count} entries, {col_count} columns</span>')
731
+
620
732
  findings_html = "<br>".join(findings) if findings else '<span class="text-gray-500 italic">No significant findings</span>'
621
733
 
622
734
  # Build payload section