pub fn print_to<W>(&self, mut writer: W, config: Arc<Configuration>) -> Result<()>
    where
        W: Write,
    {
        writeln!(&mut writer, "{}", self.header())?;

        // begin with always printed items
        for target in &self.targets {
            writeln!(&mut writer, "{}", target)?;
        }

        for denied_url in &self.url_denylist {
            writeln!(&mut writer, "{}", denied_url)?;
        }

        writeln!(&mut writer, "{}", self.threads)?;
        writeln!(&mut writer, "{}", self.wordlist)?;
        writeln!(&mut writer, "{}", self.status_codes)?;

        if !config.filter_status.is_empty() {
            // exception here for an optional print in the middle of always printed values is due
            // to me wanting the allows and denys to be printed one after the other
            writeln!(&mut writer, "{}", self.filter_status)?;
        }

        writeln!(&mut writer, "{}", self.timeout)?;

        if config.random_agent {
            writeln!(&mut writer, "{}", self.random_agent)?;
        } else {
            writeln!(&mut writer, "{}", self.user_agent)?;
        }

        // followed by the maybe printed or variably displayed values
        if !config.config.is_empty() {
            writeln!(&mut writer, "{}", self.config)?;
        }

        if !config.proxy.is_empty() {
            writeln!(&mut writer, "{}", self.proxy)?;
        }

        if !config.replay_proxy.is_empty() {
            // i include replay codes logic here because in config.rs, replay codes are set to the
            // value in status codes, meaning it's never empty
            writeln!(&mut writer, "{}", self.replay_proxy)?;
            writeln!(&mut writer, "{}", self.replay_codes)?;
        }

        for header in &self.headers {
            writeln!(&mut writer, "{}", header)?;
        }

        for filter in &self.filter_size {
            writeln!(&mut writer, "{}", filter)?;
        }

        for filter in &self.filter_similar {
            writeln!(&mut writer, "{}", filter)?;
        }

        for filter in &self.filter_word_count {
            writeln!(&mut writer, "{}", filter)?;
        }

        for filter in &self.filter_line_count {
            writeln!(&mut writer, "{}", filter)?;
        }

        for filter in &self.filter_regex {
            writeln!(&mut writer, "{}", filter)?;
        }

        if config.extract_links {
            writeln!(&mut writer, "{}", self.extract_links)?;
        }

        if config.json {
            writeln!(&mut writer, "{}", self.json)?;
        }

        for query in &self.queries {
            writeln!(&mut writer, "{}", query)?;
        }

        if !config.output.is_empty() {
            writeln!(&mut writer, "{}", self.output)?;
        }

        if !config.debug_log.is_empty() {
            writeln!(&mut writer, "{}", self.debug_log)?;
        }

        if !config.extensions.is_empty() {
            writeln!(&mut writer, "{}", self.extensions)?;
        }

        if config.insecure {
            writeln!(&mut writer, "{}", self.insecure)?;
        }

        if config.auto_bail {
            writeln!(&mut writer, "{}", self.auto_bail)?;
        }
        if config.auto_tune {
            writeln!(&mut writer, "{}", self.auto_tune)?;
        }

        if config.redirects {
            writeln!(&mut writer, "{}", self.redirects)?;
        }

        if config.dont_filter {
            writeln!(&mut writer, "{}", self.dont_filter)?;
        }

        if let 1..=4 = config.verbosity {
            writeln!(&mut writer, "{}", self.verbosity)?;
        }

        if config.add_slash {
            writeln!(&mut writer, "{}", self.add_slash)?;
        }

        writeln!(&mut writer, "{}", self.no_recursion)?;

        if config.scan_limit > 0 {
            writeln!(&mut writer, "{}", self.scan_limit)?;
        }

        if config.parallel > 0 {
            writeln!(&mut writer, "{}", self.parallel)?;
        }

        if config.rate_limit > 0 {
            writeln!(&mut writer, "{}", self.rate_limit)?;
        }

        if !config.time_limit.is_empty() {
            writeln!(&mut writer, "{}", self.time_limit)?;
        }

        if matches!(self.update_status, UpdateStatus::OutOfDate) {
            let update = BannerEntry::new(
                "🎉",
                "New Version Available",
                "https://github.com/epi052/feroxbuster/releases/latest",
            );
            writeln!(&mut writer, "{}", update)?;
        }

        writeln!(&mut writer, "{}", self.footer())?;

        Ok(())
    }
/// display the banner on Write writer
display the banner on Write writer
display the banner on Write writer
pub fn print_to<W>(&self, mut writer: W, config: Arc<Configuration>) -> Result<()>
    where
        W: Write,
    {
        writeln!(&mut writer, "{}", self.header())?;
        // begin with always printed items
        for target in &self.targets {
            writeln!(&mut writer, "{}", target)?;
        }
        for denied_url in &self.url_denylist {
            writeln!(&mut writer, "{}", denied_url)?;
        }
        writeln!(&mut writer, "{}", self.threads)?;
        writeln!(&mut writer, "{}", self.wordlist)?;
        writeln!(&mut writer, "{}", self.status_codes)?;
        if !config.filter_status.is_empty() {
            // exception here for an optional print in the middle of always printed values is due
            // to me wanting the allows and denys to be printed one after the other
            writeln!(&mut writer, "{}", self.filter_status)?;
        }
        writeln!(&mut writer, "{}", self.timeout)?;
        if config.random_agent {
            writeln!(&mut writer, "{}", self.random_agent)?;
        } else {
            writeln!(&mut writer, "{}", self.user_agent)?;
        }
        // followed by the maybe printed or variably displayed values
        if !config.config.is_empty() {
            writeln!(&mut writer, "{}", self.config)?;
        }
        if !config.proxy.is_empty() {
            writeln!(&mut writer, "{}", self.proxy)?;
        }
        if !config.replay_proxy.is_empty() {
            // i include replay codes logic here because in config.rs, replay codes are set to the
            // value in status codes, meaning it's never empty
            writeln!(&mut writer, "{}", self.replay_proxy)?;
            writeln!(&mut writer, "{}", self.replay_codes)?;
        }
        for header in &self.headers {
            writeln!(&mut writer, "{}", header)?;
        }
        for filter in &self.filter_size {
            writeln!(&mut writer, "{}", filter)?;
        }
        for filter in &self.filter_similar {
            writeln!(&mut writer, "{}", filter)?;
        }
        for filter in &self.filter_word_count {
            writeln!(&mut writer, "{}", filter)?;
        }
        for filter in &self.filter_line_count {
            writeln!(&mut writer, "{}", filter)?;
        }
        for filter in &self.filter_regex {
            writeln!(&mut writer, "{}", filter)?;
        }
        if config.extract_links {
            writeln!(&mut writer, "{}", self.extract_links)?;
        }
        if config.json {
            writeln!(&mut writer, "{}", self.json)?;
        }
        for query in &self.queries {
            writeln!(&mut writer, "{}", query)?;
        }
        if !config.output.is_empty() {
            writeln!(&mut writer, "{}", self.output)?;
        }
        if !config.debug_log.is_empty() {
            writeln!(&mut writer, "{}", self.debug_log)?;
        }
        if !config.extensions.is_empty() {
            writeln!(&mut writer, "{}", self.extensions)?;
        }
        if config.insecure {
            writeln!(&mut writer, "{}", self.insecure)?;
        }
        if config.auto_bail {
            writeln!(&mut writer, "{}", self.auto_bail)?;
        }
        if config.auto_tune {
            writeln!(&mut writer, "{}", self.auto_tune)?;
        }
        if config.redirects {
            writeln!(&mut writer, "{}", self.redirects)?;
        }
        if config.dont_filter {
            writeln!(&mut writer, "{}", self.dont_filter)?;
        }
        if let 1..=4 = config.verbosity {
            writeln!(&mut writer, "{}", self.verbosity)?;
        }
        if config.add_slash {
            writeln!(&mut writer, "{}", self.add_slash)?;
        }
        writeln!(&mut writer, "{}", self.no_recursion)?;
        if config.scan_limit > 0 {
            writeln!(&mut writer, "{}", self.scan_limit)?;
        }
        if config.parallel > 0 {
            writeln!(&mut writer, "{}", self.parallel)?;
        }
        if config.rate_limit > 0 {
            writeln!(&mut writer, "{}", self.rate_limit)?;
        }
        if !config.time_limit.is_empty() {
            writeln!(&mut writer, "{}", self.time_limit)?;
        }
        if matches!(self.update_status, UpdateStatus::OutOfDate) {
            let update = BannerEntry::new(
                "🎉",
                "New Version Available",
                "https://github.com/epi052/feroxbuster/releases/latest",
            );
            writeln!(&mut writer, "{}", update)?;
        }
        writeln!(&mut writer, "{}", self.footer())?;
        Ok(())
    }
pub fn print_to < W > ( & self , mut writer : W , config : Arc < Configuration > ) -> Result < ( ) > where W : Write , { writeln ! ( mut writer " " self header ( ) ) ? ; // begin with always printed items for target in & self . targets { writeln ! ( mut writer " " target ) ? ; } for denied_url in & self . url_denylist { writeln ! ( mut writer " " denied_url ) ? ; } writeln ! ( mut writer " " self threads ) ? ; writeln ! ( mut writer " " self wordlist ) ? ; writeln ! ( mut writer " " self status_codes ) ? ; if ! config . filter_status . is_empty ( ) { // exception here for an optional print in the middle of always printed values is due // to me wanting the allows and denys to be printed one after the other writeln ! ( mut writer " " self filter_status ) ? ; } writeln ! ( mut writer " " self timeout ) ? ; if config . random_agent { writeln ! ( mut writer " " self random_agent ) ? ; } else { writeln ! ( mut writer " " self user_agent ) ? ; } // followed by the maybe printed or variably displayed values if ! config . config . is_empty ( ) { writeln ! ( mut writer " " self config ) ? ; } if ! config . proxy . is_empty ( ) { writeln ! ( mut writer " " self proxy ) ? ; } if ! config . replay_proxy . is_empty ( ) { // i include replay codes logic here because in config.rs, replay codes are set to the // value in status codes, meaning it's never empty writeln ! ( mut writer " " self replay_proxy ) ? ; writeln ! ( mut writer " " self replay_codes ) ? ; } for header in & self . headers { writeln ! ( mut writer " " header ) ? ; } for filter in & self . filter_size { writeln ! ( mut writer " " filter ) ? ; } for filter in & self . filter_similar { writeln ! ( mut writer " " filter ) ? ; } for filter in & self . filter_word_count { writeln ! ( mut writer " " filter ) ? ; } for filter in & self . filter_line_count { writeln ! ( mut writer " " filter ) ? ; } for filter in & self . filter_regex { writeln ! ( mut writer " " filter ) ? ; } if config . extract_links { writeln ! ( mut writer " " self extract_links ) ? ; } if config . json { writeln ! ( mut writer " " self json ) ? ; } for query in & self . queries { writeln ! ( mut writer " " query ) ? ; } if ! config . output . is_empty ( ) { writeln ! ( mut writer " " self output ) ? ; } if ! config . debug_log . is_empty ( ) { writeln ! ( mut writer " " self debug_log ) ? ; } if ! config . extensions . is_empty ( ) { writeln ! ( mut writer " " self extensions ) ? ; } if config . insecure { writeln ! ( mut writer " " self insecure ) ? ; } if config . auto_bail { writeln ! ( mut writer " " self auto_bail ) ? ; } if config . auto_tune { writeln ! ( mut writer " " self auto_tune ) ? ; } if config . redirects { writeln ! ( mut writer " " self redirects ) ? ; } if config . dont_filter { writeln ! ( mut writer " " self dont_filter ) ? ; } if let 1 ..= 4 = config . verbosity { writeln ! ( mut writer " " self verbosity ) ? ; } if config . add_slash { writeln ! ( mut writer " " self add_slash ) ? ; } writeln ! ( mut writer " " self no_recursion ) ? ; if config . scan_limit > 0 { writeln ! ( mut writer " " self scan_limit ) ? ; } if config . parallel > 0 { writeln ! ( mut writer " " self parallel ) ? ; } if config . rate_limit > 0 { writeln ! ( mut writer " " self rate_limit ) ? ; } if ! config . time_limit . is_empty ( ) { writeln ! ( mut writer " " self time_limit ) ? ; } if matches ! ( self update_status UpdateStatus OutOfDate ) { let update = BannerEntry :: new ( " " " , " " , ) ; writeln ! ( mut writer " " update ) ? ; } writeln ! ( mut writer " " self footer ( ) ) ? ; Ok ( ( ) ) }
display the banner on Write writer
display the banner on Write writer
&self
writer
W
config
Arc<Configuration>