mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-06-09 03:51:13 -03:00
scanner can filter out word/line counts
This commit is contained in:
@@ -163,6 +163,14 @@ pub struct Configuration {
|
||||
#[serde(default)]
|
||||
pub filter_size: Vec<u64>,
|
||||
|
||||
/// Filter out messages of a particular line count
|
||||
#[serde(default)]
|
||||
pub filter_line_count: Vec<usize>,
|
||||
|
||||
/// Filter out messages of a particular word count
|
||||
#[serde(default)]
|
||||
pub filter_word_count: Vec<usize>,
|
||||
|
||||
/// Don't auto-filter wildcard responses
|
||||
#[serde(default)]
|
||||
pub dont_filter: bool,
|
||||
@@ -240,6 +248,8 @@ impl Default for Configuration {
|
||||
queries: Vec::new(),
|
||||
extensions: Vec::new(),
|
||||
filter_size: Vec::new(),
|
||||
filter_line_count: Vec::new(),
|
||||
filter_word_count: Vec::new(),
|
||||
filter_status: Vec::new(),
|
||||
headers: HashMap::new(),
|
||||
depth: depth(),
|
||||
|
||||
@@ -421,6 +421,12 @@ pub fn should_filter_response(response: &FeroxResponse) -> bool {
|
||||
if CONFIGURATION
|
||||
.filter_size
|
||||
.contains(&response.content_length())
|
||||
|| CONFIGURATION
|
||||
.filter_line_count
|
||||
.contains(&response.line_count())
|
||||
|| CONFIGURATION
|
||||
.filter_word_count
|
||||
.contains(&response.word_count())
|
||||
{
|
||||
// filtered value from --filter-size, size filters and wildcards are two separate filters
|
||||
// and are applied independently
|
||||
|
||||
Reference in New Issue
Block a user