Change url used for authentication to magicBox.cgi?action=getDeviceType

This commit is contained in:
Isaac Connor 2021-03-30 16:03:50 -04:00
parent 7489c3850d
commit c9c4224dd2
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ sub open {
}
# Detect REALM, has to be /cgi-bin/ptz.cgi because just / accepts no auth
my $res = $self->{ua}->get($$self{base_url}.'cgi-bin/ptz.cgi');
my $res = $self->{ua}->get($$self{base_url}.'cgi-bin/magicBox.cgi?action=getDeviceType');
if ( $res->is_success ) {
$self->{state} = 'open';
@ -121,7 +121,7 @@ sub open {
Debug('No headers line');
} # end if headers
} else {
Error("Failed to get $$self{base_url}cgi-bin/ptz.cgi ".$res->status_line());
Error("Failed to get $$self{base_url}cgi-bin/magicBox.cgi?action=getDeviceType ".$res->status_line());
} # end if $res->status_line() eq '401 Unauthorized'