async fn make_wildcard_request(
        &self,
        target: &FeroxUrl,
        length: usize,
    ) -> Result<FeroxResponse> {
        log::trace!("enter: make_wildcard_request({}, {})", target, length);

        let unique_str = self.unique_string(length);

        // To take care of slash when needed
        let slash = if self.handles.config.add_slash {
            Some("/")
        } else {
            None
        };

        let nonexistent_url = target.format(&unique_str, slash)?;

        let response = logged_request(&nonexistent_url.to_owned(), self.handles.clone()).await?;

        if self
            .handles
            .config
            .status_codes
            .contains(&response.status().as_u16())
        {
            // found a wildcard response
            let mut ferox_response =
                FeroxResponse::from(response, true, self.handles.config.output_level).await;
            ferox_response.set_wildcard(true);

            if self
                .handles
                .filters
                .data
                .should_filter_response(&ferox_response, self.handles.stats.tx.clone())
            {
                bail!("filtered response")
            }

            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let boxed = Box::new(ferox_response.clone());
                self.handles.output.send(Command::Report(boxed))?;
            }

            log::trace!("exit: make_wildcard_request -> {}", ferox_response);
            return Ok(ferox_response);
        }

        log::trace!("exit: make_wildcard_request -> Err");
        bail!("uninteresting status code")
    }
/// Generates a uuid and appends it to the given target url. The reasoning is that the randomly
/// generated unique string should not exist on and be served by the target web server.
///
/// Once the unique url is created, the request is sent to the server. If the server responds
/// back with a valid status code, the response is considered to be a wildcard response. If that
/// wildcard response has a 3xx status code, that redirection location is displayed to the user.
Generates a uuid and appends it to the given target url. The reasoning is that the randomly
generated unique string should not exist on and be served by the target web server.

Once the unique url is created, the request is sent to the server. If the server responds
back with a valid status code, the response is considered to be a wildcard response. If that
wildcard response has a 3xx status code, that redirection location is displayed to the user.
Generates a uuid and appends it to the given target url . The reasoning is that the randomly generated unique string should not exist on and be served by the target web server . Once the unique url is created the request is sent to the server . If the server responds back with a valid status code the response is considered to be a wildcard response . If that wildcard response has a 3xx status code that redirection location is displayed to the user .
async fn make_wildcard_request(
        &self,
        target: &FeroxUrl,
        length: usize,
    ) -> Result<FeroxResponse> {
        log::trace!("enter: make_wildcard_request({}, {})", target, length);
        let unique_str = self.unique_string(length);
        // To take care of slash when needed
        let slash = if self.handles.config.add_slash {
            Some("/")
        } else {
            None
        };
        let nonexistent_url = target.format(&unique_str, slash)?;
        let response = logged_request(&nonexistent_url.to_owned(), self.handles.clone()).await?;
        if self
            .handles
            .config
            .status_codes
            .contains(&response.status().as_u16())
        {
            // found a wildcard response
            let mut ferox_response =
                FeroxResponse::from(response, true, self.handles.config.output_level).await;
            ferox_response.set_wildcard(true);
            if self
                .handles
                .filters
                .data
                .should_filter_response(&ferox_response, self.handles.stats.tx.clone())
            {
                bail!("filtered response")
            }
            if matches!(
                self.handles.config.output_level,
                OutputLevel::Default | OutputLevel::Quiet
            ) {
                let boxed = Box::new(ferox_response.clone());
                self.handles.output.send(Command::Report(boxed))?;
            }
            log::trace!("exit: make_wildcard_request -> {}", ferox_response);
            return Ok(ferox_response);
        }
        log::trace!("exit: make_wildcard_request -> Err");
        bail!("uninteresting status code")
    }
async fn make_wildcard_request ( & self , target : & FeroxUrl , length : usize , ) -> Result < FeroxResponse > { log :: trace ! ( " " target length ) ; let unique_str = self . unique_string ( length ) ; // To take care of slash when needed let slash = if self . handles . config . add_slash { Some ( " " ) } else { None } ; let nonexistent_url = target . format ( & unique_str , slash ) ? ; let response = logged_request ( & nonexistent_url . to_owned ( ) , self . handles . clone ( ) ) . await ? ; if self . handles . config . status_codes . contains ( & response . status ( ) . as_u16 ( ) ) { // found a wildcard response let mut ferox_response = FeroxResponse :: from ( response , true , self . handles . config . output_level ) . await ; ferox_response . set_wildcard ( true ) ; if self . handles . filters . data . should_filter_response ( & ferox_response , self . handles . stats . tx . clone ( ) ) { bail ! ( " " ) } if matches ! ( self handles config output_level OutputLevel Default OutputLevel Quiet ) { let boxed = Box :: new ( ferox_response . clone ( ) ) ; self . handles . output . send ( Command :: Report ( boxed ) ) ? ; } log :: trace ! ( " " ferox_response ) ; return Ok ( ferox_response ) ; } log :: trace ! ( " " ) ; bail ! ( " " ) }
Generates a uuid and appends it to the given target url.
Generates a uuid and appends it to the given target url .
&self
target
&FeroxUrl
length
usize