|
|
@ -56,7 +56,7 @@ fn start_scan( |
|
|
|
to: u32, |
|
|
|
to: u32, |
|
|
|
target_port: u16, |
|
|
|
target_port: u16, |
|
|
|
num_threads: u32, |
|
|
|
num_threads: u32, |
|
|
|
ignorelist: Option<&mut Vec<u32>>, |
|
|
|
ignorelist: Option<Vec<u32>>, |
|
|
|
) -> Result<()> { |
|
|
|
) -> Result<()> { |
|
|
|
println!("Starting wwmap..."); |
|
|
|
println!("Starting wwmap..."); |
|
|
|
|
|
|
|
|
|
|
@ -67,14 +67,14 @@ fn start_scan( |
|
|
|
let mut threads: Vec<JoinHandle<Vec<bool>>> = Vec::new(); |
|
|
|
let mut threads: Vec<JoinHandle<Vec<bool>>> = Vec::new(); |
|
|
|
|
|
|
|
|
|
|
|
for thread_id in 0..num_threads { |
|
|
|
for thread_id in 0..num_threads { |
|
|
|
let thread_ignorelist = ignorelist.unwrap_or(&mut Vec::new()); |
|
|
|
let id_ignorelist = ignorelist.unwrap().cloned().unwrap_or_else(Vec::new()); |
|
|
|
|
|
|
|
|
|
|
|
// Create a worker
|
|
|
|
// Create a worker
|
|
|
|
let worker = create_scan_worker( |
|
|
|
let worker = create_scan_worker( |
|
|
|
thread_id, |
|
|
|
thread_id, |
|
|
|
ips_per_thread, |
|
|
|
ips_per_thread, |
|
|
|
target_port, |
|
|
|
target_port, |
|
|
|
thread_ignorelist |
|
|
|
id_ignorelist |
|
|
|
); |
|
|
|
); |
|
|
|
threads.push(worker); |
|
|
|
threads.push(worker); |
|
|
|
} |
|
|
|
} |
|
|
|