From e886d643a8ba7c7517825fa90894eea59c7ad910 Mon Sep 17 00:00:00 2001 From: Valmo Date: Mon, 29 Jun 2026 07:08:25 -0300 Subject: [PATCH] Fixed worker UI --- src/worker.rs | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/src/worker.rs b/src/worker.rs index 1909f8b..afe1491 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -1,8 +1,4 @@ -use crate::{ - config::Config, - scan::check_port_open, - terminal::{ScreenState, TerminalUi}, -}; +use crate::{config::Config, scan::check_port_open, terminal::TerminalUi}; use anyhow::{anyhow, Context, Result}; use std::{net::Ipv4Addr, sync::Arc}; use tokio::{ @@ -38,14 +34,8 @@ pub async fn run_worker(config: Config, ui: Arc) -> Result<()> { } let job = parse_job_line(&line)?; - let result = execute_job( - &job.ips, - config.port, - config.timeout_ms, - config.concurrency, - &ui, - ) - .await?; + let result = + execute_job(&job.ips, config.port, config.timeout_ms, config.concurrency).await?; let result_line = format!( "RESULT {} {} {} {} {}\n", @@ -58,15 +48,6 @@ pub async fn run_worker(config: Config, ui: Arc) -> Result<()> { write_half.write_all(result_line.as_bytes()).await?; } - if ui.is_enabled() { - ui.render(&ScreenState { - current_ip: "concluĂ­do".to_string(), - tested: 0, - total: 0, - }); - ui.finish(); - } - Ok(()) } @@ -138,7 +119,6 @@ async fn execute_job( port: u16, timeout_ms: u64, concurrency: usize, - ui: &TerminalUi, ) -> Result { let mut tested = 0usize; let mut open_ips = Vec::new(); @@ -159,14 +139,6 @@ async fn execute_job( if is_open { open_ips.push(ip); } - - if ui.is_enabled() { - ui.render(&ScreenState { - current_ip: ip.to_string(), - tested, - total: ips.len(), - }); - } } index = end;