[][src]Struct feroxbuster::config::Configuration

pub struct Configuration {
    pub wordlist: String,
    pub config: String,
    pub proxy: String,
    pub target_url: String,
    pub statuscodes: Vec<u16>,
    pub client: Client,
    pub threads: usize,
    pub timeout: u64,
    pub verbosity: u8,
    pub quiet: bool,
    pub output: String,
    pub useragent: String,
    pub redirects: bool,
    pub insecure: bool,
    pub extensions: Vec<String>,
    pub headers: HashMap<String, String>,
    pub queries: Vec<(String, String)>,
    pub norecursion: bool,
    pub addslash: bool,
    pub stdin: bool,
    pub depth: usize,
    pub sizefilters: Vec<u64>,
    pub dontfilter: bool,
}

Represents the final, global configuration of the program.

This struct is the combination of the following:

  • default configuration values
  • plus overrides read from a configuration file
  • plus command-line options

In that order.

Inspired by and derived from https://github.com/PhilipDaniels/rust-config-example

Fields

wordlist: String

Path to the wordlist

config: String

Path to the config file used

proxy: String

Proxy to use for requests (ex: http(s)://host:port, socks5://host:port)

target_url: String

The target URL

statuscodes: Vec<u16>

Status Codes of interest (default: 200 204 301 302 307 308 401 403 405)

client: Client

Instance of reqwest::Client

threads: usize

Number of concurrent threads (default: 50)

timeout: u64

Number of seconds before a request times out (default: 7)

verbosity: u8

Level of verbosity, equates to log level

quiet: bool

Only print URLs

output: String

Output file to write results to (default: stdout)

useragent: String

Sets the User-Agent (default: feroxbuster/VERSION)

redirects: bool

Follow redirects

insecure: bool

Disables TLS certificate validation

extensions: Vec<String>

File extension(s) to search for

headers: HashMap<String, String>

HTTP headers to be used in each request

queries: Vec<(String, String)>

URL query parameters

norecursion: bool

Do not scan recursively

addslash: bool

Append / to each request

stdin: bool

Read url(s) from STDIN

depth: usize

Maximum recursion depth, a depth of 0 is infinite recursion

sizefilters: Vec<u64>

Filter out messages of a particular size

dontfilter: bool

Don't auto-filter wildcard responses

Implementations

impl Configuration[src]

pub fn new() -> Self[src]

Creates a Configuration object with the following built-in default values

  • timeout: 5 seconds
  • redirects: false
  • wordlist: DEFAULT_WORDLIST
  • config: None
  • threads: 50
  • timeout: 7 seconds
  • verbosity: 0 (no logging enabled)
  • proxy: None
  • statuscodes: DEFAULT_RESPONSE_CODES
  • output: None (print to stdout)
  • quiet: false
  • useragent: feroxer/VERSION
  • insecure: false (don't be insecure, i.e. don't allow invalid certs)
  • extensions: None
  • sizefilters: None
  • headers: None
  • queries: None
  • norecursion: false (recursively scan enumerated sub-directories)
  • addslash: false
  • stdin: false
  • dontfilter: false (auto filter wildcard responses)
  • depth: 4 (maximum recursion depth)

After which, any values defined in a ferox-config.toml config file will override the built-in defaults.

ferox-config.toml can be placed in any of the following locations (in the order shown):

  • /etc/feroxbuster/
  • CONFIG_DIR/ferxobuster/
  • The same directory as the feroxbuster executable
  • The user's current working directory

If more than one valid configuration file is found, each one overwrites the values found previously.

Finally, any options/arguments given on the commandline will override both built-in and config-file specified values.

The resulting Configuration is a singleton with a static lifetime.

Trait Implementations

impl Clone for Configuration[src]

impl Debug for Configuration[src]

impl Default for Configuration[src]

fn default() -> Self[src]

Builds the default Configuration for feroxbuster

impl<'de> Deserialize<'de> for Configuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,