Skip to main content

TransformBuilder

Struct TransformBuilder 

Source
pub struct TransformBuilder { /* private fields */ }
Expand description

Creates a transformer builder for chaining multiple transformations.

§Examples

use redstr::TransformBuilder;
let result = TransformBuilder::new("test")
    .leetspeak()
    .base64()
    .build();
assert!(result.len() > 0);

Implementations§

Source§

impl TransformBuilder

Source

pub fn new(input: &str) -> Self

Creates a new transformer with the given input text.

Source

pub fn leetspeak(self) -> Self

Applies leetspeak transformation.

Source

pub fn base64(self) -> Self

Applies base64 encoding.

Source

pub fn url_encode(self) -> Self

Applies URL encoding.

Source

pub fn redstrs(self) -> Self

Applies random capitalization.

Source

pub fn homoglyphs(self) -> Self

Applies homoglyph substitution.

Source

pub fn case_swap(self) -> Self

Applies case swapping.

Source

pub fn hex_encode(self) -> Self

Applies hex encoding.

Source

pub fn rot13(self) -> Self

Applies ROT13 cipher.

Source

pub fn advanced_domain_spoof(self) -> Self

Applies advanced domain spoofing (for EvilJinx).

Source

pub fn email_obfuscation(self) -> Self

Applies email obfuscation (for EvilJinx).

Source

pub fn powershell_obfuscate(self) -> Self

Applies PowerShell obfuscation (for Windows pentesting).

Source

pub fn bash_obfuscate(self) -> Self

Applies bash obfuscation (for Linux pentesting).

Source

pub fn cloudflare_challenge(self) -> Self

Applies Cloudflare challenge variation.

Source

pub fn cloudflare_turnstile(self) -> Self

Applies Cloudflare Turnstile challenge variation.

Source

pub fn cloudflare_challenge_response(self) -> Self

Applies Cloudflare challenge response pattern.

Source

pub fn graphql_obfuscate(self) -> Self

Applies GraphQL obfuscation (for Caido).

Source

pub fn build(self) -> String

Returns the transformed text.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.