Subj : Re: CGI questiuon To : Jasen Betts From : Scott Adams Date : Fri Dec 12 2003 07:14 am -=> Quoting Jasen Betts to Scott Adams <=- JB>> I want to serve a binary files to an HTTP client (like wget) from JB>> a CGI script, is that posssible? JB>> The plan is to have one/some of my machines requesting files over JB>> the network and have the CGI script on the server coordinating JB>> the cd-draw to change discs depending on the path the script JB>> gets. SA> There could be some serious security issues if its done wrong for SA> the network. I'm not a network person myself so couldn't help you SA> on the details but what id o know if a script is involved just SA> have to be very very careful :) JB> I've got the CGI working now but I wimped out of using perl and ended JB> up doing it in about 30 lines of bash, it doesn't do any URL JB> traslaition or anything fancy, it just grabs a CD name from $PATH_INFO JB> in the environment and the filename from the query string JB> (command-line) JB> spits out the CD if it's not the one it wants and uses "wall" to JB> hassle anyone nearby (IOW me) to feed it the apropriate disk. JB> and once satisfied responds with a "location" message that points the JB> server (apache at the moment) at a symlink to the cdrom drive's mount JB> point JB> so far "the network" is three PCs within arm's reach of me but one of JB> them's going into the spare room later this month. JB> I'm not planning on opening port 80 to the world for a while yet. and JB> if I do I'll put an IP address check near the start of the script and JB> give foreigners a 404 JB> hmm speaking of 404s... you get to give a text (or html etc) message JB> for interactive users to read... I wonder if I could grab the output JB> of JB> /usr/games/fortune bofh That might work never thought of that. JB> (which emits BOFH excuses for computer problems) JB> and insert that into the error page :) Yep. Well sounds like your on the right track. .... Minbari: The term 'bonehead' will never be the same again. --- Fringe BBS * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91) .