sqlmap_rs/lib.rs
1//! # Sqlmap-RS
2//!
3//! An asynchronous, strictly-typed Rust wrapper for the `sqlmapapi` REST Server.
4//!
5//! Provides a panic-free API for orchestrating SQL injection scans using the
6//! world's most powerful detection engine. Instead of parsing messy CLI outputs,
7//! this library communicates via sqlmap's native REST API.
8//!
9//! ## Features
10//!
11//! - **Full API coverage**: start, stop, kill, log, data, option introspection.
12//! - **Builder pattern**: Fluent `SqlmapOptions::builder()` with 40+ sqlmap options.
13//! - **Multi-format output**: JSON, CSV, Markdown, and plain text.
14//! - **RAII cleanup**: Tasks and daemon processes are cleaned up on drop.
15//! - **Port conflict detection**: Prevents silent connection to wrong daemons.
16//! - **Configurable polling**: Custom intervals and HTTP timeouts.
17//!
18//! ## Architecture
19//!
20//! The library spawns `sqlmapapi.py` under a Tokio background thread and uses
21//! HTTP polling to track scan lifecycles. When the engine drops, the daemon
22//! is killed. When a task drops, it is deleted from the daemon.
23
24#![warn(missing_docs)]
25
26/// REST API Client Orchestration.
27pub mod client;
28/// Typed Error Variants.
29pub mod error;
30/// Deserialization payloads, options builder, and output formatting.
31pub mod types;
32
33pub use client::SqlmapEngine;
34pub use error::SqlmapError;
35pub use types::{
36 DataResponse, LogEntry, LogResponse, OutputFormat, SqlmapDataChunk, SqlmapFinding,
37 SqlmapOptions, SqlmapOptionsBuilder,
38};