pub async fn wildcard(&self, target_url: &str) -> Result<u64> {
        log::trace!("enter: wildcard_test({:?})", target_url);

        if self.handles.config.dont_filter {
            // early return, dont_filter scans don't need tested
            log::trace!("exit: wildcard_test -> 0");
            return Ok(0);
        }

        let ferox_url = FeroxUrl::from_string(target_url, self.handles.clone());

        let ferox_response = self.make_wildcard_request(&ferox_url, 1).await?;

        // found a wildcard response
        let mut wildcard = WildcardFilter::new(self.handles.config.dont_filter);

        let wc_length = ferox_response.content_length();

        if wc_length == 0 {
            log::trace!("exit: wildcard_test -> 1");
            self.send_filter(wildcard)?;
            return Ok(1);
        }

        // content length of wildcard is non-zero, perform additional tests:
        //   make a second request, with a known-sized (64) longer request
        let resp_two = self.make_wildcard_request(&ferox_url, 3).await?;

        let wc2_length = resp_two.content_length();

        if wc2_length == wc_length + (UUID_LENGTH * 2) {
            // second length is what we'd expect to see if the requested url is
            // reflected in the response along with some static content; aka custom 404
            let url_len = ferox_url.path_length()?;

            wildcard.dynamic = wc_length - url_len;

            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let msg = format_template!("{} {:>9} {:>9} {:>9} Wildcard response is dynamic; {} ({} + url length) responses; toggle this behavior by using {}\n", wildcard.dynamic);
                ferox_print(&msg, &PROGRESS_PRINTER);
            }
        } else if wc_length == wc2_length {
            wildcard.size = wc_length;

            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let msg = format_template!("{} {:>9} {:>9} {:>9} Wildcard response is static; {} {} responses; toggle this behavior by using {}\n", wildcard.size);
                ferox_print(&msg, &PROGRESS_PRINTER);
            }
        }

        self.send_filter(wildcard)?;

        log::trace!("exit: wildcard_test");
        Ok(2)
    }
/// Tests the given url to see if it issues a wildcard response
///
/// In the event that url returns a wildcard response, a
/// [WildcardFilter](struct.WildcardFilter.html) is created and sent to the filters event
/// handler.
///
/// Returns the number of times to increment the caller's progress bar
Tests the given url to see if it issues a wildcard response
In the event that url returns a wildcard response, a
[WildcardFilter](struct.WildcardFilter.html) is created and sent to the filters event
handler.

Returns the number of times to increment the caller's progress bar
Tests the given url to see if it issues a wildcard response In the event that url returns a wildcard response a [ WildcardFilter ] ( struct . WildcardFilter . html ) is created and sent to the filters event handler . Returns the number of times to increment the caller ' s progress bar
pub async fn wildcard(&self, target_url: &str) -> Result<u64> {
        log::trace!("enter: wildcard_test({:?})", target_url);
        if self.handles.config.dont_filter {
            // early return, dont_filter scans don't need tested
            log::trace!("exit: wildcard_test -> 0");
            return Ok(0);
        }
        let ferox_url = FeroxUrl::from_string(target_url, self.handles.clone());
        let ferox_response = self.make_wildcard_request(&ferox_url, 1).await?;
        // found a wildcard response
        let mut wildcard = WildcardFilter::new(self.handles.config.dont_filter);
        let wc_length = ferox_response.content_length();
        if wc_length == 0 {
            log::trace!("exit: wildcard_test -> 1");
            self.send_filter(wildcard)?;
            return Ok(1);
        }
        // content length of wildcard is non-zero, perform additional tests:
        //   make a second request, with a known-sized (64) longer request
        let resp_two = self.make_wildcard_request(&ferox_url, 3).await?;
        let wc2_length = resp_two.content_length();
        if wc2_length == wc_length + (UUID_LENGTH * 2) {
            // second length is what we'd expect to see if the requested url is
            // reflected in the response along with some static content; aka custom 404
            let url_len = ferox_url.path_length()?;
            wildcard.dynamic = wc_length - url_len;
            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let msg = format_template!("{} {:>9} {:>9} {:>9} Wildcard response is dynamic; {} ({} + url length) responses; toggle this behavior by using {}\n", wildcard.dynamic);
                ferox_print(&msg, &PROGRESS_PRINTER);
            }
        } else if wc_length == wc2_length {
            wildcard.size = wc_length;
            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let msg = format_template!("{} {:>9} {:>9} {:>9} Wildcard response is static; {} {} responses; toggle this behavior by using {}\n", wildcard.size);
                ferox_print(&msg, &PROGRESS_PRINTER);
            }
        }
        self.send_filter(wildcard)?;
        log::trace!("exit: wildcard_test");
        Ok(2)
    }
pub async fn wildcard ( & self , target_url : & str ) -> Result < u64 > { log :: trace ! ( " " target_url ) ; if self . handles . config . dont_filter { // early return, dont_filter scans don't need tested log :: trace ! ( " " ) ; return Ok ( 0 ) ; } let ferox_url = FeroxUrl :: from_string ( target_url , self . handles . clone ( ) ) ; let ferox_response = self . make_wildcard_request ( & ferox_url , 1 ) . await ? ; // found a wildcard response let mut wildcard = WildcardFilter :: new ( self . handles . config . dont_filter ) ; let wc_length = ferox_response . content_length ( ) ; if wc_length == 0 { log :: trace ! ( " " ) ; self . send_filter ( wildcard ) ? ; return Ok ( 1 ) ; } // content length of wildcard is non-zero, perform additional tests: //   make a second request, with a known-sized (64) longer request let resp_two = self . make_wildcard_request ( & ferox_url , 3 ) . await ? ; let wc2_length = resp_two . content_length ( ) ; if wc2_length == wc_length + ( UUID_LENGTH * 2 ) { // second length is what we'd expect to see if the requested url is // reflected in the response along with some static content; aka custom 404 let url_len = ferox_url . path_length ( ) ? ; wildcard . dynamic = wc_length - url_len ; if matches ! ( self handles config output_level OutputLevel Default OutputLevel Quiet ) { let msg = format_template ! ( " \n " wildcard dynamic ) ; ferox_print ( & msg , & PROGRESS_PRINTER ) ; } } else if wc_length == wc2_length { wildcard . size = wc_length ; if matches ! ( self handles config output_level OutputLevel Default OutputLevel Quiet ) { let msg = format_template ! ( " \n " wildcard size ) ; ferox_print ( & msg , & PROGRESS_PRINTER ) ; } } self . send_filter ( wildcard ) ? ; log :: trace ! ( " " ) ; Ok ( 2 ) }
Tests the given url to see if it issues a wildcard response
In the event that url returns a wildcard response, a
[WildcardFilter](struct.WildcardFilter.html) is created and sent to the filters event
handler.
Tests the given url to see if it issues a wildcard response In the event that url returns a wildcard response a [ WildcardFilter ] ( struct . WildcardFilter . html ) is created and sent to the filters event handler .
&self
target_url
&str