From 7a45b25746cf5b605f72358163b67a88a137d65b Mon Sep 17 00:00:00 2001 From: ramonn Date: Thu, 14 Aug 2014 16:09:55 +0000 Subject: [PATCH] 2014-08-14 Ramon Novoa * lib/PandoraFMS/Config.pm, lib/PandoraFMS/ReconServer.pm: Added a separate timing template for network scans, since they can be very slow. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10429 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 6 ++++++ pandora_server/lib/PandoraFMS/Config.pm | 4 ++++ pandora_server/lib/PandoraFMS/ReconServer.pm | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 01dee23d40..3a96667e65 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2014-08-14 Ramon Novoa + + * lib/PandoraFMS/Config.pm, + lib/PandoraFMS/ReconServer.pm: Added a separate timing template for + network scans, since they can be very slow. + 2014-08-14 Sancho Lerena * FreeBSD/pandora_server.conf.new, diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index bcfa96c2ab..2b28295fda 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -265,6 +265,7 @@ sub pandora_load_config { # nmap for recon OS fingerprinting and tcpscan (optional) $pa_config->{"nmap"} = "/usr/bin/nmap"; $pa_config->{"nmap_timing_template"} = 2; # > 5.1 + $pa_config->{"recon_timing_template"} = 3; # > 5.1 # braa for enterprise snmp server $pa_config->{"braa"} = "/usr/bin/braa"; @@ -611,6 +612,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^nmap_timing_template\s([0-9]*)/i) { $pa_config->{'nmap_timing_template'}= clean_blank($1); } + elsif ($parametro =~ m/^recon_timing_template\s([0-9]*)/i) { + $pa_config->{'recon_timing_template'}= clean_blank($1); + } elsif ($parametro =~ m/^braa\s(.*)/i) { $pa_config->{'braa'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index 49bc5a9564..2f19df0453 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -142,7 +142,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->{'nmap_timing_template'}; + my $nmap_args = '-nsP -PE --max-retries '.$pa_config->{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$pa_config->{'recon_timing_template'}; my $np = new PandoraFMS::NmapParser; eval { $np->parsescan($pa_config->{'nmap'}, $nmap_args, ($task->{'subnet'}));