
 A Hypertext Archie Gateway for the CGI interface of an httpd deamon

 Version 1.2 	21 Jan 94

 This script relies on the C-archie client from Brendan Kehoe
 Once installed, please set the correct path below.
 You can obtain the latest version from a comp.sources archive, or at
 file://ftp.uu.net/networking/info-service/archie/clients

 QUERIES 

 An accompanying HTML Form sets up the query and allows all the functionality
 of c-archie to be set explicitly. 
 
 For clients without form support the script can be called without arguments,
 resulting in an ISINDEX page. Reasonable defaults are taken
 for each option. A pointer to the script without arguments is included in
 the form header.

 The accompanying Form relies heavilly on Martijn Koster's ArchiePlex Form.
 Infact it will probably work with that too.

 HYPERTEXT RESULTS

 The main point of providing this script is infact to format the Archie
 results into Hypertext. This is acheived with a bit of awk script.
 Hypertext links point to the files and directories listed by archie. 
 One click and you've got what was asked for !
 Mosaic's internal icons are used for file and directory pointers, a
 textual alternative is provided for browsers without. 

 INSTALLATION (very easy !)

 1. Install C-archie (see above for suggested sources)
 2. Edit the line in AA describing the location of C archie
 3. Put AA in your servers cgi-bin. 
 4. Put AA.html in your htdocs tree, and away you go...

 You might like to edit some of the defaults in AA, such as the server for
 non-forms based queries. See DEFAULT_SERVER and others below.

 PORTING NOTES

 This script should work on almost all systems with a bourne shell, awk and
 c-archie. Try the gnu utilities gawk and bash on non-unix machines 
 (NB I've not tried this). 

 I've used it sucessfully on Sillicon Graphics machines running IRIX 4 but..

Ultrix

 set the first line to be #!/bin/sh5 otherwise the [ dosn't function correctly.


 Acknowledgements

 Thanks to Martijn Koster for his ArchiePlex interface. It was the
 inspiration for me to provide one for NCSA's httpd. I used his HTML form
 as the bsis for this script.
 Thanks also to Brendan Kehoe for his archie client, that was 
 quite straightforward to HyperTextualise (a new word ?)

 Thanks for the comments from the following people that brought version 1.1
 JQ Johnson, Simon Poole, Paul Harrington.

 Enjoy !

 Guy Brooker
 guy@jw.estec.esa.nl

 21/01/94

 Modifications
 
 Version 1.0
 19/12/93	Guy Brooker
 
 Version 1.1
 07/01/94	Guy Brooker
		o Dangerous Security Hole Removed. For a non-forms based query
		  QUERY_STRING was assigned query=$*. This enabled malicious
		  queries such as `cat</etc/passwd`. The QUERY_STRING passed
		  by httpd is now used, as this escapes these 'special
		  characters' i.e `ls` = %60ls%60. A hail of thanks go to
		  JQ Johnson for pointing out the problem.

		o The Swiss entry was removed due to site access resrictions.

		o Horizontal rules are used to separate each Host.

 Version 1.2
 21/01/94	Guy Brooker
		o Improved variable expansion to check legality of identifiers
		  and remove the possiblility of the shell interpreting any
		  characters passed in QUERY_STRING.

		o Report the name of the Archie server used

		o Nice Level now works correctly

