diff --git a/src/scanner.rs b/src/scanner.rs index 523ba66..25e7fbd 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -25,13 +25,14 @@ fn create_scan_thread( ips_per_thread: u32, ) -> JoinHandle> { thread::spawn(move || { - let results: Vec = Vec::new(); + let mut results: Vec = Vec::new(); // do the scan thing for i in 0..ips_per_thread { let id = (thread_id * ips_per_thread) + i; let ref target = ip_list[id as usize]; let result = scan(&target); + results.push(result); } results @@ -51,13 +52,16 @@ pub fn start_scan(target_port: u16, num_threads: u32, ignorelist: Option 0 { + threads.push(create_scan_thread(ip_list, num_threads, ips_left)); + } Ok(()) }