pub struct SecurityPayload {
pub payload: String,
pub category: SecurityCategory,
pub description: String,
pub high_risk: bool,
pub location: PayloadLocation,
pub header_name: Option<String>,
}Expand description
A security testing payload
Fields§
§payload: StringThe payload string to inject
category: SecurityCategoryCategory of the payload
description: StringDescription of what this payload tests
high_risk: boolWhether this is considered a high-risk payload
location: PayloadLocationWhere to inject the payload (uri, header, body)
header_name: Option<String>Header name if location is Header (e.g., “User-Agent”, “Cookie”)
Implementations§
Source§impl SecurityPayload
impl SecurityPayload
Sourcepub fn new(
payload: String,
category: SecurityCategory,
description: String,
) -> Self
pub fn new( payload: String, category: SecurityCategory, description: String, ) -> Self
Create a new security payload
Sourcepub fn with_location(self, location: PayloadLocation) -> Self
pub fn with_location(self, location: PayloadLocation) -> Self
Set the injection location
Sourcepub fn with_header_name(self, name: String) -> Self
pub fn with_header_name(self, name: String) -> Self
Set header name for header payloads
Trait Implementations§
Source§impl Clone for SecurityPayload
impl Clone for SecurityPayload
Source§fn clone(&self) -> SecurityPayload
fn clone(&self) -> SecurityPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityPayload
impl Debug for SecurityPayload
Source§impl<'de> Deserialize<'de> for SecurityPayload
impl<'de> Deserialize<'de> for SecurityPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SecurityPayload
impl RefUnwindSafe for SecurityPayload
impl Send for SecurityPayload
impl Sync for SecurityPayload
impl Unpin for SecurityPayload
impl UnwindSafe for SecurityPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more