HTTP Anti-Virus Proxy

Official HAVP Support Forum
Registration disabled, I'm tired of spambots. E-mail havp@hege.li if you have questions.
HAVP project is pretty much frozen/abandoned at this time anyway.


All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 02 Jun 2006 05:04 
It would be very easy for HAVP to invoke a CGI program, passing it some useful set of environment variables and/or arguments, and then delivering the stdout to the client/browser.

Simply say that an executable in the "templates" directory with the appropriate name is used as a CGI program instead of the html file of the same name, and its stdout is delivered instead of the ("<!--message-->" substituted) contents of the html file.

The CGI program can, of course, be written in whatever language one wishes: Shell, Perl, Python, PHP, compiled C/C++, or any interpreter accessible via the usual "#!/path/to/interpreter" convention.


Top
  
 
PostPosted: 05 Jun 2006 10:56 
Offline
HAVP Maintainer

Joined: 27 Feb 2006 19:08
Posts: 62
Paul Kosinski wrote:
It would be very easy for HAVP to invoke a CGI program, passing it some useful set of environment variables and/or arguments, and then delivering the stdout to the client/browser.


Which environment variables do you mean? If you run a CGI on the console/shell you will loose the HTTP environment variables.


Top
 Profile  
 
PostPosted: 06 Jun 2006 05:39 
Offline

Joined: 03 Jun 2006 01:51
Posts: 4
Location: Massachusetts, US
My notion for CGI in HAVP is as follows.

Besides the URL/URI of the object which HAVP couldn't/wouldn't deliver, various other information would be important to a CGI script. This additional info could be passed in environment variables, as is done with standard web-server CGI.

The main piece of info (the URL/URI) could be the argument to the CGI program, and could also be passed in an environment variable. Additional info would be passed in environment variables only. Additional info might include the exact virus report (in the case of a virus), plus all of the parameters from the config file (although this might be optional by means of another config file parameter, for those who prefer not to reveal this to their users).

Of course, the HAVP developers can probably improve of this based on their experience.

--------------------------------------------------------------------

The standard CGI environment variables are shown below. Some (like HTTPS) are totally irrelevant to HAVP and others are of minor importance, but some, such as REQUEST_URI -- the URL/URI of the object requested which wasn't delivered -- and likely REQUEST_METHOD, would be very important.

EnvVar Description

DOCUMENT_ROOT The root directory of your server

HTTP_COOKIE The visitor's cookie, if one is set

HTTP_HOST The hostname of your server

HTTP_REFERER The URL of the page that called your script

HTTP_USER_AGENT The browser type of the visitor

HTTPS "on" if the script is being called through a secure server

PATH The system path your server is running under

QUERY_STRING The query string (see GET, below)

REMOTE_ADDR The IP address of the visitor

REMOTE_HOST The hostname of the visitor (if your server has reverse-name-lookups on; otherwise this is the IP address again)

REMOTE_PORT The port the visitor is connected to on the web server

REMOTE_USER The visitor's username (for .htaccess-protected pages)

REQUEST_METHOD GET or POST

REQUEST_URI The interpreted pathname of the requested document or CGI (relative to the document root)

SCRIPT_FILENAME The full pathname of the current CGI

SCRIPT_NAME The interpreted pathname of the current CGI (relative to the document root)

SERVER_ADMIN The email address for your server's webmaster

SERVER_NAME Your server's fully qualified domain name (e.g. www.cgi101.com)

SERVER_PORT The port number your server is listening on

SERVER_SOFTWARE The server software you're using (such as Apache 1.3)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group