mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-06-03 23:11:12 -03:00
added /etc/feroxbuster as a valid config location
updated .deb to install the example config at /etc/feroxbuster version bumped to 0.2.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "feroxbuster"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
authors = ["Ben 'epi' Risher <epibar052@gmail.com>"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
@@ -46,4 +46,8 @@ panic = 'abort'
|
||||
[package.metadata.deb]
|
||||
section = "utility"
|
||||
license-file = ["LICENSE", "4"]
|
||||
conf-files = ["~/.config/feroxbuster/ferox-config.toml"]
|
||||
conf-files = ["/etc/feroxbuster/ferox-config.toml"]
|
||||
assets = [
|
||||
["target/release/feroxbuster", "/usr/bin/", "755"],
|
||||
["ferox-config.toml.example", "/etc/feroxbuster/ferox-config.toml", "644"],
|
||||
]
|
||||
@@ -97,6 +97,7 @@ After setting built-in default values, any values defined in a `ferox-config.tom
|
||||
built-in defaults.
|
||||
|
||||
`feroxbuster` searches for `ferox-config.toml` in 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
|
||||
|
||||
@@ -233,6 +233,7 @@ impl Configuration {
|
||||
/// 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
|
||||
@@ -255,10 +256,15 @@ impl Configuration {
|
||||
// actually specified in the config file
|
||||
//
|
||||
// search for a config using the following order of precedence
|
||||
// - /etc/feroxbuster/
|
||||
// - CONFIG_DIR/ferxobuster/
|
||||
// - same directory as feroxbuster executable
|
||||
// - current directory
|
||||
|
||||
// merge a config found at /etc/feroxbuster/ferox-config.toml
|
||||
let config_file = PathBuf::new().join("/etc/feroxbuster").join(DEFAULT_CONFIG_NAME);
|
||||
Self::parse_and_merge_config(config_file, &mut config);
|
||||
|
||||
// merge a config found at ~/.config/feroxbuster/ferox-config.toml
|
||||
if let Some(config_dir) = dirs::config_dir() {
|
||||
// config_dir() resolves to one of the following
|
||||
|
||||
Reference in New Issue
Block a user