mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-06-07 18:21:13 -03:00
fixed indexing out of bounds w/ extensions/methods on resume
This commit is contained in:
@@ -337,7 +337,18 @@ impl ScanHandler {
|
||||
continue;
|
||||
}
|
||||
|
||||
let list = self.get_wordlist(scan.requests() as usize)?;
|
||||
let divisor = self.handles.expected_num_requests_multiplier();
|
||||
|
||||
let list = if divisor > 1 && scan.requests() > 0 {
|
||||
// if there were extensions provided and/or more than a single method used, and some
|
||||
// number of requests have already been sent, we need to adjust the offset into the
|
||||
// wordlist to ensure we don't index out of bounds
|
||||
|
||||
let adjusted = self.handles.wordlist.len() as f64 / divisor as f64 - 1.0;
|
||||
self.get_wordlist(adjusted as usize)?
|
||||
} else {
|
||||
self.get_wordlist(scan.requests() as usize)?
|
||||
};
|
||||
|
||||
log::info!("scan handler received {} - beginning scan", target);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user