Page 1 of 1

Custom Montage and Authentication?

Posted: Fri Mar 01, 2013 1:19 am
by Simon
Hi,

I am trying to figure out if it's possible to get a custom montage working when AUTH_TYPE is set to builtin.

This is my simple HTML montage page:

Code: Select all

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<html>
<head>
        <link rel="shortcut icon" href="/cctv.ico" />
        <title>CCTV</title>
</head>
<body bgcolor="black">
<table align="center">
 <tr>
   <td><a href="/index.php?view=watch&mid=4" target="_blank">
        <img src="/cgi-bin/nph-zms?mode=jpeg&monitor=4&scale=50&maxfps=5&buffer=1000&auth=0000000000000000000000000000000&buffer=1000connkey=000000buffer=1000&rand=0000000000"></a></td>
   <td><a href="/index.php?view=watch&mid=6" target="_blank">
        <img src="/cgi-bin/nph-zms?mode=jpeg&monitor=6&scale=50&maxfps=5&buffer=1000&auth=0000000000000000000000000000000&buffer=1000connkey=000000buffer=1000&rand=0000000000"></a></td>
   <td><a href="/index.php?view=watch&mid=2" target="_blank">
        <img src="/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=50&maxfps=5&buffer=1000&auth=0000000000000000000000000000000&buffer=1000connkey=000000buffer=1000&rand=0000000000"></a></td>
   <td><a href="/index.php?view=watch&mid=7" target="_blank">
        <img src="/cgi-bin/nph-zms?mode=jpeg&monitor=7&scale=30&maxfps=5&buffer=1000&auth=0000000000000000000000000000000&buffer=1000connkey=000000buffer=1000&rand=0000000000"></a></td>
   <td><a href="/index.php?view=watch&mid=1" target="_blank">
        <img src="/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=50&maxfps=5&buffer=1000&auth=0000000000000000000000000000000&buffer=1000connkey=000000buffer=1000&rand=0000000000"></a></td>

 </tr>
</table>
</body>
<html>
I know it's due to the fact the the auth, connkey and rand values are invalid (Note, I zeroed them in out my example above) because they change with each successful logon and expire after a period of time. What I'm wonder is if I can bypass this somehow and secure the custom montage page with a .htaccess file since I obviously I know the AUTH_HASH_SECRET?

I have messed about with the php to try and make a page which is valid and can't generate the correct auth, connkey, and rand strings but I think my php skills are too basic at this point to accomplish that.

Thanks in advance.

Simon

Re: Custom Montage and Authentication?

Posted: Fri Mar 01, 2013 11:38 am
by wocketfast
Create a new limited user who can only view the streams
Change your URL "mode=jpeg&monitor=1&scale=100&maxfps=10&buffer=1000&user=username&password=password"

Our use the cambozolla applet ifyou view source on a page you can see it.

Re: Custom Montage and Authentication?

Posted: Sun Mar 03, 2013 1:59 am
by Simon
wocketfast wrote:Create a new limited user who can only view the streams
Change your URL "mode=jpeg&monitor=1&scale=100&maxfps=10&buffer=1000&user=username&password=password"

Our use the cambozolla applet ifyou view source on a page you can see it.
Hi,

Thanks for the suggestion. I think I saw this mentioned on the forum when I was searching to try and make my custom montage work. I tried it again, images from the camera. I updated my links as follows:

Code: Select all

<img src="/cgi-bin/nph-zms?mode=jpeg&monitor=5&scale=50&maxfps=5&buffer=1000&user=montagetest&password=password"></a>
However, when I load the page all of the image links are broken.

Is there some setting I am missing to make this work?

Thanks for your help.

Simon

Re: Custom Montage and Authentication?

Posted: Sun Mar 03, 2013 2:12 am
by Simon
I tried the link directly in the my web browser:

Code: Select all

https://my.server.ip/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=50&maxfps=5&buffer=1000&username=montagetest&password=password
When I do, I get:

Code: Select all

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
Simon

Re: Custom Montage and Authentication?

Posted: Sun Mar 03, 2013 10:38 pm
by jameswilson
try user= and pass=

Re: Custom Montage and Authentication?

Posted: Mon Mar 11, 2013 3:36 am
by Simon
jameswilson wrote:try user= and pass=
hey james, i changed it as you suggested and it works perfectly now! thanks so much for the tip!

simon