homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
How to send a CGI script a command behind a protect folder
wfernley




msg:437185
 2:48 pm on Mar 13, 2006 (gmt 0)

I'm not sure if there is a way around this but I will try anyways :)

I have a cgi script http://www.example.com/folder/script.cgi. I want to send it a command http://www.example.com/folder/script.cgi?command=dothis. The /folder/ is protected however by a username and password (Done in Apache). So when you try to access the cgi it asks for a username and password.

What I would like to accomplish is to bypass the username and password like this:
[username:password@example.com...]

This doesn't work. Is there a way to make it work? ;)

Thanks in advance for your help!

 

webdoctor




msg:437186
 1:15 pm on Mar 14, 2006 (gmt 0)

What I would like to accomplish is to bypass the username and password like this:
[username:password@example.com...]

This doesn't work. Is there a way to make it work? ;)

In an attempt to combat phishing, many browsers stopped allowing username:password@host URI syntax.

Why exactly are you protecting a CGI, and then wanting to bypass the protection?

wfernley




msg:437187
 1:52 pm on Mar 14, 2006 (gmt 0)

Hi webdoctor, thank you for your reply.

The reason why I am protecting a CGI is because its actually on a network camera. The CGI handles all the commands for the camera. So if you send a command to the CGI to move right, the camera will pan right.

Considering you dont want all people to access the camera you need a username and password.

I understand how some browsers (like IE) are getting rid of the username:password@ but for some reason even though my browser is up to date it still works. (IE & FireFox)

Is there a way around this?

Thanks!

webdoctor




msg:437188
 2:04 pm on Mar 14, 2006 (gmt 0)

Can't you send the commands to the camera by calling them through a wrapper script?

I'm thinking of a PHP script which checks the user has the right cookie / ip address / username and password and THEN sends the command directly to the camera, without the user ever seeing the direct command?

wfernley




msg:437189
 2:16 pm on Mar 14, 2006 (gmt 0)

I'm not very familiar with rapper scripts. How would I go about doing this?

webdoctor




msg:437190
 2:40 pm on Mar 14, 2006 (gmt 0)

This thread [webmasterworld.com] talks about running commands from a script.

I get the feeling I still don't really understand what you're doing, or why you're doing this :-)

Visitors to your site are supposed to be controlling a camera, right? Except you want to restrict this to certain visitors? Do they have a password or something? Or are you able to restrict it to certain ip addresses?

wfernley




msg:437191
 3:39 pm on Mar 14, 2006 (gmt 0)

Yeah it is kinda hard to explain what I'm trying to do.

It will not be on my website though. It is just a script I will be running in the background that will tell the camera to move to a certain spot at a specific time.

It is secured by a username and password and not by IP Address.

webdoctor




msg:437192
 3:53 pm on Mar 14, 2006 (gmt 0)

It is just a script I will be running in the background that will tell the camera to move to a certain spot at a specific time

You are intent on triggering this movement at a particular time, through a web browser?

wfernley




msg:437193
 4:01 pm on Mar 14, 2006 (gmt 0)

Yes it would be through IE. The person using the script would just open it in IE and have it minimized on their desktop.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved