mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 23:24:27 +02:00
Revert nmap discovery (#2152)
* Revert "enh(linux/local): add timeout and sudo as options for nmap discovery (#2148)" This reverts commit 8e9b1ddc4b23a7c006a86b12caf1a35b94e09b83. Both options are implemented in cli custom mode, timeout defaut will be 120. * enh(linux/local): add timeout default in help
This commit is contained in:
parent
08a5b67b5b
commit
e44ffda25c
@ -35,8 +35,6 @@ sub new {
|
|||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'subnet:s' => { name => 'subnet' },
|
'subnet:s' => { name => 'subnet' },
|
||||||
'timeout:s' => { name => 'timeout', default => 120 },
|
|
||||||
'sudo' => { name => 'sudo' },
|
|
||||||
'prettify' => { name => 'prettify' }
|
'prettify' => { name => 'prettify' }
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -114,8 +112,7 @@ sub run {
|
|||||||
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 => '-sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21-25,80,139,443,3306,8080,8443 -oX - ',
|
||||||
command_options_suffix => $self->{option_results}->{subnet},
|
command_options_suffix => $self->{option_results}->{subnet},
|
||||||
sudo => $self->{option_results}->{sudo},
|
timeout => 120
|
||||||
timeout => $self->{option_results}->{timeout}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
my $results = $self->decode_xml_response(
|
my $results = $self->decode_xml_response(
|
||||||
@ -186,6 +183,8 @@ __END__
|
|||||||
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__
|
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.
|
||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--subnet>
|
=item B<--subnet>
|
||||||
@ -193,14 +192,6 @@ Command used: nmap -sS -sU -R -O --osscan-limit --osscan-guess -p U:161,162,T:21
|
|||||||
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<--timeout>
|
|
||||||
|
|
||||||
Timeout in seconds (Default: 120).
|
|
||||||
|
|
||||||
=item B<--sudo>
|
|
||||||
|
|
||||||
Defines if 'sudo' must be used to execute the 'nmap' command.
|
|
||||||
|
|
||||||
=item B<--prettify>
|
=item B<--prettify>
|
||||||
|
|
||||||
Prettify JSON output.
|
Prettify JSON output.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user