Struct webscan::UriScanner
source · [−]pub struct UriScanner { /* private fields */ }
Expand description
Structure for uri scan
Should be constructed using UriScanner::new
Implementations
sourceimpl UriScanner
impl UriScanner
sourcepub fn new() -> Result<UriScanner, String>
pub fn new() -> Result<UriScanner, String>
Construct new UriScanner
sourcepub fn set_base_uri(&mut self, base_uri: String)
pub fn set_base_uri(&mut self, base_uri: String)
Set base URI of scan target.
sourcepub fn set_request_method(&mut self, method: RequestMethod)
pub fn set_request_method(&mut self, method: RequestMethod)
Set request method
sourcepub fn set_timeout(&mut self, timeout: Duration)
pub fn set_timeout(&mut self, timeout: Duration)
Set scan timeout
sourcepub fn set_accept_invalid_certs(&mut self, accept: bool)
pub fn set_accept_invalid_certs(&mut self, accept: bool)
Set option to accept invalid certificates
sourcepub fn add_content(&mut self, content: Vec<u8>)
pub fn add_content(&mut self, content: Vec<u8>)
Add content vector to search for in response bytes
sourcepub async fn run_scan(&mut self)
pub async fn run_scan(&mut self)
Run scan with current settings.
Results are stored in UriScanner::scan_result
sourcepub fn get_result(&mut self) -> UriScanResult
pub fn get_result(&mut self) -> UriScanResult
Return scan result.
sourcepub async fn scan(&mut self) -> UriScanResult
pub async fn scan(&mut self) -> UriScanResult
Run scan and return result
Trait Implementations
sourceimpl Clone for UriScanner
impl Clone for UriScanner
sourcefn clone(&self) -> UriScanner
fn clone(&self) -> UriScanner
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for UriScanner
impl Send for UriScanner
impl Sync for UriScanner
impl Unpin for UriScanner
impl UnwindSafe for UriScanner
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more