From 2b7822f1a19aa0be4610c8b4eb9138d33e6ad690 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 14 Aug 2022 01:04:47 +0200 Subject: [PATCH] Debug stuff --- src/scanner.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scanner.rs b/src/scanner.rs index 039b501..382e482 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -12,11 +12,13 @@ fn tcp_scan(mut target: IPv4, target_port: u16) -> bool { let timeout = Duration::new(1, 0); + println!("Sending TCP packet to: {:?} port={}", target, target_port); if let Ok(res) = TcpStream::connect_timeout(&dest, timeout) { - info!("* Got TCP ack from: {:?} | {:?}", dest, res); - return true; + println!("** Got TCP ack from: {:?} | {:?}", dest, res); + true + } else { + false } - false } fn create_scan_thread( @@ -25,7 +27,7 @@ fn create_scan_thread( target_port: u16, ) -> JoinHandle> { thread::spawn(move || { - info!("Creating thread worker #{}", thread_id); + println!("Creating thread worker #{}", thread_id); let mut results: Vec<(u32, bool)> = Vec::new(); // do the scan thing