mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-05-31 03:51:12 -03:00
Update src/config/container.rs
Co-authored-by: epi <43392618+epi052@users.noreply.github.com>
This commit is contained in:
@@ -659,8 +659,17 @@ impl Configuration {
|
||||
for ext in arg {
|
||||
if let Some(stripped) = ext.strip_prefix('@') {
|
||||
let contents = read_to_string(stripped).unwrap_or_else(|e| report_and_exit(&e.to_string()));
|
||||
extensions.extend(extensions_string.split('\n').map(|s| s.trim_start_matches('.').trim().to_string()));
|
||||
extensions = extensions.into_iter().filter(|s| !s.is_empty()).collect();
|
||||
let exts_from_file = contents.split('\n').filter_map(|s| {
|
||||
let trimmed = s.trim().trim_start_matches('.');
|
||||
|
||||
if trimmed.is_empty() || trimmed.starts_with('#') {
|
||||
None
|
||||
} else {
|
||||
Some(trimmed.to_string())
|
||||
}
|
||||
});
|
||||
|
||||
extensions.extend(exts_from_file);
|
||||
} else {
|
||||
extensions.push(ext.trim_start_matches('.').to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user