httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Arrison" <arri...@gnostech.com>
Subject RE: Running DOS batch files as CGI
Date Wed, 16 Jan 2002 13:33:17 GMT
Dror,
    Theoretically, any program, written in any language, can be used as a
CGI program.  The only requirements are that it outputs something that
apache knows what to do with (HTML, GIF, or other valid mime type).  So yes,
a simple DOS batch file like:

REM   I am a batch file
ECHO "Content-type: text/html\n\n"
ECHO "Here's my content"

	should work.  You just have to get apache to recognize that it's not a text
file, but rather an executable script.  This can be done on an extension
basis (*.bat), or preferably on a per file basis (asdf.bat).  I would guess
that adding a handler for *.bat might be a little dangerous. A little
misconfiguration could allow an attacker to run random .bat files your
computer.
	Sorry I don't have an article describing how to do it, but maybe this will
help a little.

     -Mike Arrison
      arrison@gnostech.com
      Systems Engineer
      Gnostech, Inc.
      http://www.gnostech.com

-----Original Message-----
From: Dror Braznitzki [mailto:DrorBr@yellowpages.co.il]
Sent: Wednesday, January 16, 2002 4:10 AM
To: Apache Mailing List (E-mail)
Subject: Running DOS batch files as CGI




Hi All,
Is it possible to run MS-DOS batch files as a CGI on Apache ?
Can anyone direct me to an article about it or give a shirt example of how
to do it ?
Thanx,
Dror



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.yellowpages.co.il
**********************************************************************


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message