From ad1cda6262d03868971d37721fd873eae502e35f Mon Sep 17 00:00:00 2001 From: qgarnier Date: Thu, 30 Mar 2023 14:04:11 +0200 Subject: [PATCH] (plugin) apps::nmap::cli - redirect stderr to null (#4324) --- src/apps/nmap/cli/mode/discovery.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/nmap/cli/mode/discovery.pm b/src/apps/nmap/cli/mode/discovery.pm index bdfd5fb38..2c2f6a54e 100644 --- a/src/apps/nmap/cli/mode/discovery.pm +++ b/src/apps/nmap/cli/mode/discovery.pm @@ -115,7 +115,7 @@ sub run { my ($stdout) = $options{custom}->execute_command( command => 'nmap', command_options => $self->{option_results}->{nmap_options}, - command_options_suffix => $self->{option_results}->{subnet}, + command_options_suffix => $self->{option_results}->{subnet} . ' 2> /dev/null', timeout => 120 ); @@ -187,7 +187,7 @@ __END__ =head1 MODE Resources discovery. -Default command used: nmap -sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - __SUBNET_OPTION__ +Default command used: nmap -sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - __SUBNET_OPTION__ 2> /dev/null Timeout defaults to 120 seconds.