From 6196d06e82eae7a8dfdd37d6d7efc2acff4f491e Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 9 Sep 2014 13:06:42 +0200 Subject: [PATCH] Force nmap to use seconds as the timeout unit. --- pandora_server/lib/PandoraFMS/ReconServer.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index 2f19df0453..d0d06e82bf 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -141,8 +141,7 @@ sub data_consumer ($$) { } # Call nmap - my $timeout = $pa_config->{'networktimeout'}*1000; - my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'recon_timing_template'}; + my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$pa_config->{'networktimeout'}.'s -T'.$pa_config->{'recon_timing_template'}; my $np = new PandoraFMS::NmapParser; eval { $np->parsescan($pa_config->{'nmap'}, $nmap_args, ($task->{'subnet'})); @@ -327,8 +326,7 @@ sub get_host_parent { my ($pa_config, $host, $dbh, $group, $max_depth, $resolve, $os_detect) = @_; # Call nmap - my $timeout = $pa_config->{'networktimeout'}*1000; - my $nmap_args = '-nsP -PE --traceroute --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'nmap_timing_template'}; + my $nmap_args = '-nsP -PE --traceroute --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$pa_config->{'networktimeout'}.'s -T'.$pa_config->{'nmap_timing_template'}; my $np = new PandoraFMS::NmapParser; eval { $np->parsescan($pa_config->{'nmap'}, $nmap_args, ($host));