enh(plugin):allow nmap command options tuning (#2838)
* + allow nmap command options tuning * + fix typo
This commit is contained in:
parent
de9a0dde25
commit
766256427e
|
@ -34,6 +34,7 @@ sub new {
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'subnet:s' => { name => 'subnet' },
|
'subnet:s' => { name => 'subnet' },
|
||||||
|
'nmap-options:s' => { name => 'nmap_options', default => '-sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - ' },
|
||||||
'prettify' => { name => 'prettify' }
|
'prettify' => { name => 'prettify' }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ sub run {
|
||||||
|
|
||||||
my ($stdout) = $options{custom}->execute_command(
|
my ($stdout) = $options{custom}->execute_command(
|
||||||
command => 'nmap',
|
command => 'nmap',
|
||||||
command_options => '-sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - ',
|
command_options => $self->{option_results}->{nmap_options},
|
||||||
command_options_suffix => $self->{option_results}->{subnet},
|
command_options_suffix => $self->{option_results}->{subnet},
|
||||||
timeout => 120
|
timeout => 120
|
||||||
);
|
);
|
||||||
|
@ -180,7 +181,7 @@ __END__
|
||||||
=head1 MODE
|
=head1 MODE
|
||||||
|
|
||||||
Resources discovery.
|
Resources discovery.
|
||||||
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__
|
||||||
|
|
||||||
Timeout defaults to 120 seconds.
|
Timeout defaults to 120 seconds.
|
||||||
|
|
||||||
|
@ -191,6 +192,12 @@ Timeout defaults to 120 seconds.
|
||||||
Specify subnet from which discover
|
Specify subnet from which discover
|
||||||
resources (Must be <ip>/<cidr> format) (Mandatory).
|
resources (Must be <ip>/<cidr> format) (Mandatory).
|
||||||
|
|
||||||
|
=item B<--nmap-options>
|
||||||
|
|
||||||
|
Specify the options to use with Nmap.
|
||||||
|
Default value: -sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - __SUBNET_OPTION__
|
||||||
|
Note that -oX - are mandatory when using the Plugin in Centreon Host Discovery
|
||||||
|
|
||||||
=item B<--prettify>
|
=item B<--prettify>
|
||||||
|
|
||||||
Prettify JSON output.
|
Prettify JSON output.
|
||||||
|
|
Loading…
Reference in New Issue