@@ -18,21 +18,41 @@ sqlmapWebUI/
1818│ │ ├── api/ # API routes
1919│ │ │ ├── chromeExApi/ # Chrome extension API
2020│ │ │ ├── burpSuiteExApi/ # Burp Suite plugin API
21- │ │ │ └── commonApi/ # Common APIs (auth, headers)
21+ │ │ │ └── commonApi/ # Common APIs (auth, headers, config )
2222│ │ ├── model/ # Data models
23+ │ │ │ ├── requestModel/ # Request DTOs
24+ │ │ │ ├── Task.py # Task model
25+ │ │ │ ├── HeaderScope.py # Header scope configuration
26+ │ │ │ ├── PersistentHeaderRule.py # Persistent header rules
27+ │ │ │ ├── SessionHeader.py # Session-level headers
28+ │ │ │ └── ...
2329│ │ ├── service/ # Business logic layer
30+ │ │ │ ├── taskService.py # Task management
31+ │ │ │ └── headerRuleService.py # Header rules management
2432│ │ ├── utils/ # Utility functions
33+ │ │ │ ├── header_processor.py # Header processing
34+ │ │ │ ├── scope_matcher.py # Scope matching logic
35+ │ │ │ └── task_monitor.py # Task monitoring
2536│ │ ├── third_lib/sqlmap/ # SQLMap integration (git submodule)
2637│ │ ├── app.py # FastAPI application core
2738│ │ └── main.py # Entry point
2839│ ├── frontEnd/ # Vue 3 frontend (TypeScript + Vite)
2940│ │ └── src/
3041│ │ ├── api/ # API request functions
3142│ │ ├── components/# Shared components
43+ │ │ │ ├── TaskFilter.vue # Task filtering component
44+ │ │ │ ├── TaskSummary.vue # Task statistics summary
45+ │ │ │ └── ScopeConfigPanel.vue # Scope configuration UI
3246│ │ ├── stores/ # Pinia state management
47+ │ │ │ ├── task.ts # Task state store
48+ │ │ │ └── config.ts # Config state store
3349│ │ ├── types/ # TypeScript type definitions
3450│ │ ├── utils/ # Utility functions
3551│ │ └── views/ # Page views
52+ │ │ ├── Home/ # Dashboard
53+ │ │ ├── TaskList/ # Task list page
54+ │ │ ├── TaskDetail/ # Task detail page
55+ │ │ └── Config/ # Configuration page
3656│ ├── burpEx/ # Burp Suite extensions
3757│ │ ├── legacy-api/ # Legacy Burp API (Java 11)
3858│ │ └── montoya-api/ # Montoya API (Java 17, Burp 2023.1+)
@@ -49,11 +69,42 @@ sqlmapWebUI/
4969
5070| Component | Technologies |
5171| -----------| -------------|
52- | Backend | Python 3.13+, FastAPI, SQLMap, SQLite |
72+ | Backend | Python 3.13+, FastAPI, SQLMap, SQLite, uv |
5373| Frontend | Vue 3, TypeScript, PrimeVue, Pinia, Vite |
5474| Burp Plugins | Java 11 (Legacy), Java 17 (Montoya) |
5575| Package Managers | uv (Python), pnpm (Node.js), Maven (Java) |
5676
77+ ## Core Features
78+
79+ ### Task Management
80+ - Create/monitor/stop SQL injection scan tasks
81+ - Real-time log viewing
82+ - Batch operations (batch stop, batch delete, flush all)
83+ - Multi-dimensional filtering (URL, message, status, date range, injection status)
84+ - Sorting by multiple fields
85+ - Summary statistics row in task list
86+ - Smart polling (adjusts refresh rate based on task status)
87+
88+ ### Header Rules Management
89+ - ** Persistent Rules** : Long-term header rules stored in database
90+ - Full CRUD operations
91+ - Priority-based ordering (0-100)
92+ - Multiple replace strategies (REPLACE, APPEND, PREPEND, etc.)
93+ - ** Session Headers** : Temporary headers with TTL expiration
94+ - ** Scope Configuration** : URL matching for targeted header application
95+ - Protocol pattern (http/https)
96+ - Hostname pattern (supports wildcards)
97+ - Port pattern (supports multiple values)
98+ - Path pattern (supports wildcards)
99+ - Regex support for complex matching
100+ - ** Batch Import** : Import multiple headers from text
101+
102+ ### VulnShop Lab
103+ - 8 SQL injection vulnerability types
104+ - 3 WAF difficulty levels (Easy/Medium/Hard)
105+ - Light/Dark theme support
106+ - One-click database reset
107+
57108## Development Commands
58109
59110### Backend
@@ -100,12 +151,14 @@ mvn clean package -DskipTests
100151- Follow PEP 8 style guidelines
101152- Use async/await for I/O operations in FastAPI
102153- Models use Pydantic for validation
154+ - Service classes are singletons
103155
104156### TypeScript (Frontend)
105157- Strict TypeScript mode enabled
106158- Use Composition API with ` <script setup> `
107159- State management through Pinia stores
108160- PrimeVue components for UI consistency
161+ - Use computed properties for derived data
109162
110163### Java (Burp Plugins)
111164- Legacy API: Java 11 compatibility
@@ -135,6 +188,19 @@ export const fetchData = async (params: RequestParams): Promise<ResponseType> =>
135188}
136189```
137190
191+ ### Header Rules API Endpoints
192+ ```
193+ GET /commonApi/header/persistent-header-rules # List all rules
194+ GET /commonApi/header/persistent-header-rules/:id # Get single rule
195+ POST /commonApi/header/persistent-header-rules # Create rule
196+ PUT /commonApi/header/persistent-header-rules/:id # Update rule
197+ DELETE /commonApi/header/persistent-header-rules/:id # Delete rule
198+ POST /commonApi/header/session-headers # Set session headers
199+ GET /commonApi/header/session-headers # Get session headers
200+ DELETE /commonApi/header/session-headers # Clear session headers
201+ POST /commonApi/header/header-processing/preview # Preview header processing
202+ ```
203+
138204## Git Workflow
139205
140206### Commit Message Format (Conventional Commits)
@@ -159,6 +225,7 @@ ci: CI/CD changes
159225Automatic build and release is triggered when pushing tags matching:
160226- ` release-v[0-9]+.[0-9]+.[0-9]+* `
161227- ` v[0-9]+.[0-9]+.[0-9]+-release* `
228+ - ` release/v[0-9]+.[0-9]+.[0-9]+* `
162229
163230Release artifacts:
164231- ` sqlmapwebui-{version}.zip ` - Backend with integrated frontend
@@ -180,6 +247,12 @@ Release artifacts:
1802473 . Use PrimeVue components for consistent UI
1812484 . Add state management in Pinia store if needed
182249
250+ ### Adding Header Rule with Scope
251+ 1 . Backend: Rule with scope field (optional, null = global)
252+ 2 . Frontend: Use ScopeConfigPanel component
253+ 3 . Scope supports: protocol, host, port, path patterns
254+ 4 . Scope matching uses AND logic for all configured fields
255+
183256### Modifying VulnShop Lab
1842571 . Backend logic in ` server.py ` route handlers
1852582 . Database operations in ` database.py `
@@ -204,6 +277,11 @@ Backend allows CORS from:
204277- ` localhost:5173-5176 ` (frontend dev)
205278- ` localhost:8775 ` (backend)
206279
280+ ### Database
281+ - Task data stored in memory (DataStore singleton)
282+ - Header rules stored in SQLite (` header_rules.db ` )
283+ - Automatic database migration for schema changes
284+
207285## File Dependencies
208286
209287### Backend Entry Point
@@ -217,3 +295,24 @@ Backend allows CORS from:
217295``` bash
218296git submodule update --remote
219297```
298+
299+ ## Testing
300+
301+ ### Backend Tests
302+ ``` bash
303+ cd src/backEnd
304+ python -m pytest tests/
305+ ```
306+
307+ Test files:
308+ - ` test_scope_matcher.py ` - Scope matching logic tests
309+ - ` test_header_processor_scope.py ` - Header processor tests
310+ - ` test_api_endpoints.py ` - API endpoint tests
311+
312+ ### Frontend Development
313+ ``` bash
314+ cd src/frontEnd
315+ pnpm run dev # Start with hot reload
316+ pnpm run lint # Run linter
317+ pnpm run build # Build production
318+ ```
0 commit comments