| Crates.io | redstr |
| lib.rs | redstr |
| version | 0.2.6 |
| created_at | 2025-11-22 20:55:21.233764+00 |
| updated_at | 2025-12-13 21:38:23.428486+00 |
| description | Red team string obfuscation and transformation for offensive security, WAF bypass, XSS, SQL injection, phishing, and evasion testing |
| homepage | https://github.com/arvid-berndtsson/redstr |
| repository | https://github.com/arvid-berndtsson/redstr |
| max_upload_size | |
| id | 1945729 |
| size | 2,085,424 |
Red team string transformation library for offensive security operations, penetration testing, and evasion techniques.
A comprehensive Rust library providing 60+ string obfuscation and transformation functions for red team, blue team, and purple team security operations. Perfect for building security tools like Caido and Burp Suite extensions, phishing frameworks, WAF bypass testing, and bot detection evasion.
π View Detailed Use Cases - Comprehensive security testing scenarios
TransformBuilderπ Performance Benchmarks | π§ API Reference
Advantages:
Add this to your Cargo.toml:
[dependencies]
redstr = "0.2.3"
[dependencies]
redstr = { version = "0.2.3", features = ["serde"] }
API Server (Recommended for all languages):
# Install the HTTP API server
cargo install redstr-server
# Or use Docker
docker pull arvid-berndtsson/redstr-server
See API Server Documentation for usage examples in JavaScript, Python, Go, Ruby, and more.
Coming Soon:
brew install redstr (macOS/Linux)npm install @redstr/core (JavaScript/TypeScript)pip install redstr (Python)go get github.com/arvid-berndtsson/redstr-goTrack progress in our roadmap.
use redstr::{
randomize_capitalization, leetspeak, homoglyph_substitution,
base64_encode, random_user_agent, domain_typosquat
};
fn main() {
// Random capitalization
let result = randomize_capitalization("Hello World");
println!("{}", result); // "HeLlO wOrLd"
// Leetspeak for filter testing
let obfuscated = leetspeak("password");
println!("{}", obfuscated); // "p@55w0rd"
// Homoglyph substitution for phishing tests
let spoofed = homoglyph_substitution("admin@example.com");
println!("{}", spoofed); // "Π°dmΡn@Π΅xΠ°mple.com" (Cyrillic)
// Random user agent for bot evasion
let ua = random_user_agent();
}
Chain multiple transformations:
use redstr::TransformBuilder;
// Complex payload generation
let payload = TransformBuilder::new("SELECT * FROM users")
.case_swap()
.base64()
.build();
π View More Examples | π§ API Reference
use redstr::{random_user_agent, domain_typosquat, TransformBuilder};
// Web security testing - randomize requests
let ua = random_user_agent();
// Phishing detection - generate domain variations
let suspicious = domain_typosquat("paypal.com");
// WAF bypass - chain transformations
let payload = TransformBuilder::new("SELECT * FROM users")
.case_swap()
.url_encode()
.build();
π Detailed Integration Examples - Caido, Burp Suite, EvilJinx, and more
An optional CLI is available for quick testing:
# Install with CLI feature
cargo install redstr --features cli
# Usage
redstr [mode] <text>
redstr leetspeak "password" # β "p@55w0rd"
redstr base64 "hello" # β "aGVsbG8="
π Complete CLI Reference - All transformation modes and examples
All functions accept &str and return String. Key functions include:
Encoding: base64_encode, url_encode, hex_encode, html_entity_encode
Obfuscation: leetspeak, homoglyph_substitution, case_swap, unicode_variations
Injection Testing: sql_comment_injection, xss_tag_variations, path_traversal
Web Security: random_user_agent, domain_typosquat, js_string_concat
Case Conversion: to_camel_case, to_snake_case, to_kebab_case
π Complete API Reference - All 60+ functions with examples
Zero required dependencies - Core library uses only Rust's standard library.
Optional: serde feature for serialization support.
# Build library
cargo build --release
# Build with CLI
cargo build --release --features cli
# Run tests
cargo test
Official integrations (separate repositories):
Building your own integration? See Integration Guidelines
Contributions are welcome! This library is designed for the security community. Whether you're adding new transformation functions, improving documentation, or reporting issues, your input helps make security testing more effective.
See CONTRIBUTING.md for development guidelines and docs/INTEGRATION_GUIDELINES.md for integration guidance.
This library is intended for authorized security testing, research, and defensive security purposes only. Users are responsible for ensuring they have proper authorization before using these techniques on systems they do not own or have explicit permission to test.
This project is licensed under the MIT License. See the LICENSE file for details.