mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-21 12:45:10 +02:00
commit
15a337b19d
@ -43,6 +43,7 @@ sub new {
|
|||||||
"urlpath:s" => { name => 'url_path' },
|
"urlpath:s" => { name => 'url_path' },
|
||||||
"credentials" => { name => 'credentials' },
|
"credentials" => { name => 'credentials' },
|
||||||
"ntlm" => { name => 'ntlm' },
|
"ntlm" => { name => 'ntlm' },
|
||||||
|
"ntlmv2" => { name => 'ntlmv2' },
|
||||||
"username:s" => { name => 'username' },
|
"username:s" => { name => 'username' },
|
||||||
"password:s" => { name => 'password' },
|
"password:s" => { name => 'password' },
|
||||||
"proxyurl:s" => { name => 'proxyurl' },
|
"proxyurl:s" => { name => 'proxyurl' },
|
||||||
@ -201,6 +202,10 @@ Specify this option if you access webpage over basic authentication
|
|||||||
|
|
||||||
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
||||||
|
|
||||||
|
=item B<--ntlmv2>
|
||||||
|
|
||||||
|
Specify this option if you access webpage over ntlmv2 authentication (Use with --credentials and --port options)
|
||||||
|
|
||||||
=item B<--username>
|
=item B<--username>
|
||||||
|
|
||||||
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
||||||
|
@ -47,6 +47,7 @@ sub new {
|
|||||||
"urlpath:s" => { name => 'url_path' },
|
"urlpath:s" => { name => 'url_path' },
|
||||||
"credentials" => { name => 'credentials' },
|
"credentials" => { name => 'credentials' },
|
||||||
"ntlm" => { name => 'ntlm' },
|
"ntlm" => { name => 'ntlm' },
|
||||||
|
"ntlmv2" => { name => 'ntlmv2' },
|
||||||
"username:s" => { name => 'username' },
|
"username:s" => { name => 'username' },
|
||||||
"password:s" => { name => 'password' },
|
"password:s" => { name => 'password' },
|
||||||
"proxyurl:s" => { name => 'proxyurl' },
|
"proxyurl:s" => { name => 'proxyurl' },
|
||||||
@ -398,6 +399,10 @@ Specify this option if you access webpage over basic authentication
|
|||||||
|
|
||||||
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
||||||
|
|
||||||
|
=item B<--ntlmv2>
|
||||||
|
|
||||||
|
Specify this option if you access webpage over ntlmv2 authentication (Use with --credentials and --port options)
|
||||||
|
|
||||||
=item B<--username>
|
=item B<--username>
|
||||||
|
|
||||||
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
||||||
|
@ -43,6 +43,7 @@ sub new {
|
|||||||
"urlpath:s" => { name => 'url_path' },
|
"urlpath:s" => { name => 'url_path' },
|
||||||
"credentials" => { name => 'credentials' },
|
"credentials" => { name => 'credentials' },
|
||||||
"ntlm" => { name => 'ntlm' },
|
"ntlm" => { name => 'ntlm' },
|
||||||
|
"ntlmv2" => { name => 'ntlmv2' },
|
||||||
"username:s" => { name => 'username' },
|
"username:s" => { name => 'username' },
|
||||||
"password:s" => { name => 'password' },
|
"password:s" => { name => 'password' },
|
||||||
"proxyurl:s" => { name => 'proxyurl' },
|
"proxyurl:s" => { name => 'proxyurl' },
|
||||||
@ -179,6 +180,10 @@ Specify this option if you access webpage over basic authentication
|
|||||||
|
|
||||||
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
||||||
|
|
||||||
|
=item B<--ntlmv2>
|
||||||
|
|
||||||
|
Specify this option if you access webpage over ntlmv2 authentication (Use with --credentials and --port options)
|
||||||
|
|
||||||
=item B<--username>
|
=item B<--username>
|
||||||
|
|
||||||
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
||||||
|
@ -47,6 +47,7 @@ sub new {
|
|||||||
"urlpath:s" => { name => 'url_path' },
|
"urlpath:s" => { name => 'url_path' },
|
||||||
"credentials" => { name => 'credentials' },
|
"credentials" => { name => 'credentials' },
|
||||||
"ntlm" => { name => 'ntlm' },
|
"ntlm" => { name => 'ntlm' },
|
||||||
|
"ntlmv2" => { name => 'ntlmv2' },
|
||||||
"username:s" => { name => 'username' },
|
"username:s" => { name => 'username' },
|
||||||
"password:s" => { name => 'password' },
|
"password:s" => { name => 'password' },
|
||||||
"proxyurl:s" => { name => 'proxyurl' },
|
"proxyurl:s" => { name => 'proxyurl' },
|
||||||
@ -425,6 +426,10 @@ Specify this option if you access webpage over basic authentication
|
|||||||
|
|
||||||
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
Specify this option if you access webpage over ntlm authentication (Use with --credentials option)
|
||||||
|
|
||||||
|
=item B<--ntlmv2>
|
||||||
|
|
||||||
|
Specify this option if you access webpage over ntlmv2 authentication (Use with --credentials and --port options)
|
||||||
|
|
||||||
=item B<--username>
|
=item B<--username>
|
||||||
|
|
||||||
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
Specify username for basic authentication (Mandatory if --credentials is specidied)
|
||||||
|
@ -267,6 +267,11 @@ sub request {
|
|||||||
|
|
||||||
if (defined($request_options->{credentials}) && defined($request_options->{ntlm})) {
|
if (defined($request_options->{credentials}) && defined($request_options->{ntlm})) {
|
||||||
$self->{ua}->credentials($request_options->{hostname} . ':' . $request_options->{port}, '', $request_options->{username}, $request_options->{password});
|
$self->{ua}->credentials($request_options->{hostname} . ':' . $request_options->{port}, '', $request_options->{username}, $request_options->{password});
|
||||||
|
} elsif (defined($request_options->{credentials}) && defined($request_options->{ntlmv2})) {
|
||||||
|
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Authen::NTLM',
|
||||||
|
error_msg => "Cannot load module 'Authen::NTLM'.");
|
||||||
|
Authen::NTLM::ntlmv2(1);
|
||||||
|
$self->{ua}->credentials($request_options->{hostname} . ':' . $request_options->{port}, '', $request_options->{username}, $request_options->{password});
|
||||||
} elsif (defined($request_options->{credentials})) {
|
} elsif (defined($request_options->{credentials})) {
|
||||||
$req->authorization_basic($request_options->{username}, $request_options->{password});
|
$req->authorization_basic($request_options->{username}, $request_options->{password});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user