Who Am I???
About the whoami.cgi script:
The whoami.cgi
CGI script will show you what your browser sends
to the remove server.
It will also show additional information about the
environment on the www.isthe.com server itself.
The source
for this whoami.cgi CGI script is available.
Viewing the results:
The results of
whoami.cgi
will be displayed in several parts:
- Process execution
- process argument count
- value of the process arguments
- current working directory
- user id
- group id
- group membership
- CGI environment variables
Various environment variables related to CGI scripts.
Common ones reported are:
- $CONTENT_LENGTH - length of POST method standard input
- $CONTENT_TYPE - format type of POST method standard input
- $CONTEXT_DOCUMENT_ROOT - document root of web content
- $DOCUMENT - web server document root path
- $GATEWAY_INTERFACE - CGI interface version
- $PATH - execution path of the CGI script
- $PATH_INFO - path beyond CGI script in URL
- $PATH_TRANSLATED - translation of $PATH_INFO to filename
- $QUERY_STRING - string beyond first ? in URL
- $REMOTE_ADDR - IP address of the remote host
- $REMOTE_HOST - remote hostname
- $REMOTE_PORT - TCP port from remote host
- $REQUEST_METHOD - CGI info request method (GET or POST)
- $REQUEST_SCHEME - URI scheme type
- $REQUEST_URI - URI of the request (http or https)
- $REQUEST_URL - URL of the request
- $SCRIPT_FILENAME - filename of the CGI script
- $SCRIPT_NAME - CGI script to be executed
- $SERVER_ADMIN - Sever admin (sometimes the Email address)
- $SERVER_NAME - HTTP server hostname running the CGI
- $SERVER_PORT - HTTP server contact port
- $SERVER_PROTOCOL - HTTP server HTTP protocol
- $SERVER_SIGNATURE - Footer information for server-generated documents
- $SERVER_SOFTWARE - HTTP server software
- $SERVER_URL - URL of the HTTP server
- $TZ - timezone of CGI script
- $UNIQUE_ID - Unique request ID
- HTTP environment variables:
Various environment variables that begin with HTTP.
Common ones reported are:
- $HTTP_ACCEPT - HTTP server formats accepted
- $HTTP_CONNECTION - HTML server connection type
- $HTTP_HOST - HTML server hostname
- $HTTP_PRAGMA - HTML server pragma
- $HTTP_REFERER - URL referenced
- $HTTP_USER_AGENT - User agent software
- other environment variables:
Any other environment variables found.
- data on standard input:
Data read on standard input.
The POST method passes data on standard input
in lines of the form: name=value.
The source
for this whoami.cgi CGI script is available.
plain CGI URL - (GET method)
This is just a request for a CGI script with no extra path information
and no query using the GET method.
/cgi-bin/chongo/whoami.cgi
CGI URL with extra path - (GET method)
This is a request for a script with the extra path ``/extra/path'',
and no query using the GET method.
/cgi-bin/chongo/whoami.cgi/extra/path
CGI URL with a query - (GET method)
This is a query ``query'' for a script with no extra path
information using the GET method.
/cgi-bin/chongo/whoami.cgi?query
CGI URL with extra path and a query - (GET method)
This is a request for a script with the extra path ``/extra/path'',
and a query ``query'' using the GET method.
/cgi-bin/chongo/whoami.cgi/extra/path?a+query
CGI simple FORM - (GET method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no query
and no extra path information using the GET method.
CGI simple FORM - (POST method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no query
and no extra path information using the POST method.
CGI complex FORM - (GET method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no query
and no extra path information using the GET method.
CGI complex FORM - (POST method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no query
and no extra path information using the POST method.
CGI complex FORM with query string - (GET method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no
extra path and a query string of ``query'' using the GET method.
CGI complex FORM with query string - (POST method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with no
extra path and a query string of ``query'' using the POST method.
CGI complex FORM with extra path & query string - (GET method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with
a query string of ``query'' and an extra path of
``/extra/path'' using the GET method.
CGI complex FORM with extra path & query string - (POST method)
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will execute the CGI with
a query string of ``query'' and an extra path of
``/extra/path'' using the POST method.
My
CGI demo page contains more examples
of CGI scripts.
|