sqlmap_rs/lib.rs
1//! # Sqlmap-RS
2//!
3//! An asynchronous, strictly-typed Rust wrapper for the `sqlmapapi` REST Server.
4//!
5//! Communicates with a **localhost-only** `sqlmapapi` daemon (`127.0.0.1`) over
6//! sqlmap's native REST API instead of parsing CLI output.
7//!
8//! ## Features
9//!
10//! - **Core API coverage**: start, stop, kill, log, data, option introspection.
11//! - **Builder pattern**: Fluent `SqlmapOptions::builder()` with 40+ sqlmap options.
12//! - **Multi-format output**: JSON, CSV, Markdown, and plain text.
13//! - **RAII cleanup**: Best-effort task and daemon cleanup on drop (requires an active Tokio runtime for task deletion).
14//! - **Port conflict detection**: Prevents silent connection to wrong daemons.
15//! - **Configurable polling**: Custom intervals and HTTP timeouts.
16//!
17//! ## Architecture
18//!
19//! The library spawns `sqlmapapi.py` on `127.0.0.1` and uses HTTP polling to
20//! track scan lifecycles. When the engine drops, the daemon subprocess is killed
21//! best-effort. When a task drops, it is deleted from the daemon if a Tokio
22//! runtime is available.
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, SqlmapTask};
34pub use error::SqlmapError;
35pub use types::{
36 format_findings, DataResponse, LogEntry, LogResponse, OutputFormat, SqlmapDataChunk,
37 SqlmapFinding, SqlmapOptions, SqlmapOptionsBuilder,
38};