Skip to main content

Crate sqlmap_rs

Crate sqlmap_rs 

Source
Expand description

§Sqlmap-RS

An asynchronous, strictly-typed Rust wrapper for the sqlmapapi REST Server.

Communicates with a localhost-only sqlmapapi daemon (127.0.0.1) over sqlmap’s native REST API instead of parsing CLI output.

§Features

  • Core API coverage: start, stop, kill, log, data, option introspection.
  • Builder pattern: Fluent SqlmapOptions::builder() with 40+ sqlmap options.
  • Multi-format output: JSON, CSV, Markdown, and plain text.
  • RAII cleanup: Best-effort task and daemon cleanup on drop (requires an active Tokio runtime for task deletion).
  • Port conflict detection: Prevents silent connection to wrong daemons.
  • Configurable polling: Custom intervals and HTTP timeouts.

§Architecture

The library spawns sqlmapapi.py on 127.0.0.1 and uses HTTP polling to track scan lifecycles. When the engine drops, the daemon subprocess is killed best-effort. When a task drops, it is deleted from the daemon if a Tokio runtime is available.

Re-exports§

pub use client::SqlmapEngine;
pub use client::SqlmapTask;
pub use error::SqlmapError;
pub use types::format_findings;
pub use types::DataResponse;
pub use types::LogEntry;
pub use types::LogResponse;
pub use types::OutputFormat;
pub use types::SqlmapDataChunk;
pub use types::SqlmapFinding;
pub use types::SqlmapOptions;
pub use types::SqlmapOptionsBuilder;

Modules§

client
REST API Client Orchestration. Orchestrator for the sqlmapapi.py subprocess and its RESTful interface.
error
Typed Error Variants. Error definitions for the sqlmapapi binding.
types
Deserialization payloads, options builder, and output formatting. Core type definitions for SQLMap REST API (sqlmapapi) payloads.