home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / MSDOS / GOPHER / PC_SERVE / HAMBURG / GOPHDOC.ZIP / GOPHSERV.DOC < prev    next >
Encoding:
Text File  |  1993-02-22  |  6.4 KB  |  161 lines

  1.             A Gopher Server for DOS
  2.              (c) Gunter Hille 1993
  3.              Hille@informatik.uni-hamburg.de
  4.                  22-FEB-1993
  5.  
  6. GOPHSERV.EXE is a very small (less than 30 KB) GOPHER server program
  7. for a PC with DOS or MS-WINDOWS operating system. The program was created 
  8. by using the TCP/IP library from the University of Minnesota Gopher project
  9. (I obtained and made development with version 1.02). 
  10.  
  11. If your Gopher client works with the IBMTCP.DVR driver (22-APR-92),
  12. this server should work as well, if you do the following things:
  13.  
  14. 1. Set the two environment variables 
  15.    MYIP= <your internet address>
  16.    NETMASK=<your mask>
  17.    The first is necessary for the Server to start, the netmask will be set
  18.    to 255.255.255.0 if it is missing.
  19.  
  20. 2. Load the packet driver for your ethernet card.
  21.    If you want to run the server as a Window 3.1 background job, install the
  22.    WINPKT driver as well before you start your Windows session.
  23.  
  24. 3. create a file with the extension .GOP in the same directory where the
  25.    Gopher server program is located and fill it with information about the
  26.    files which shall be readable by the client programs. You may use my
  27.    Gopher tool GOPMKDIR.EXE to create this file. This is the root information
  28.    sent to a Gopher client.
  29.  
  30.    Here is an example of a typical root file 00ROOT.GOP:
  31.  
  32. 0About this Gopher Server<TAB>0About.doc<TAB>134.100.9.162<TAB>70
  33. 1Documents at this site<TAB>1\DOCS<TAB>134.100.9.164<TAB>70
  34.  
  35.   Please notice that the server looks for all files with "GOP" extension.
  36.   This is useful when different programs are creating Gopher files.
  37.  
  38. 4. Do not use symbolic names for internet hosts, just type in the internet
  39.    address (this will be most likely your own IP address). Then the Gopher
  40.    server does not call a nameserver, and you can run it on your PC network
  41.    without the use of a nameserver.
  42.    The Gopher server does not connect a nameserver if the dotted numbers are
  43.    given as addresses. It was developed on a Novell Lite network with no 
  44.    nameserver available.
  45.  
  46. Do not use the packet drivers when running other network software which
  47. accesses your ethernet card (e.g. DEC PATHWORKS, Novell, Novell Lite).
  48. If you use the IPXPKT shim packet driver, you will lose access to the
  49. Internet, but you can run the client/server package locally on your
  50. Novell net.
  51.  
  52. The server supports only the following Gopher types:
  53.  
  54.  0 (file)
  55.  1 (directory)
  56.  7 (search engine).
  57.  
  58. A directory entry (type 1) points to a directory (in MS-DOS notation).
  59. If there are files with the extension .GOP in this directory,
  60. the contents of these files will be returned to the client process.
  61. All files with extension ".GOP" must contain valid Gopher lines.
  62.  
  63. The last type needs a few comments. In this Gopher server a search engine
  64. is just another program, which will be executed by the server program. The
  65. executed program returns exactly two files, one (RESULTS.PDX) containing a
  66. list in Gopher notation. The first and only entry in this list points to a
  67. file which contains information from the executed program (results, infos
  68. or error messages).
  69.  
  70. Here is an example of a file 00ROOT.GOP in the Gopher root directory,
  71. where the search engine is just a batch program:
  72.  
  73. 0About this Gopher <TAB> 0ABOUT.DOC <TAB> 134.100.9.161 <TAB> 70
  74. 1Documents <TAB> 1\DOCS <TAB> 134.100.9.161 <TAB> 70
  75. 7Search Engine <TAB> 7\DOCS\DOSEARCH.BAT <TAB> 134.100.9.161 <TAB> 70
  76.  
  77. <TAB> is the ASCII tab character.
  78.  
  79. The first line means: "send file ABOUT.DOC (in this directory) to the client"
  80.  
  81. The second line returns the contents of all files with the extension .GOP
  82. in the subdirectory \DOCS on host 134.100.9.161
  83.  
  84. The last line executes a batch program. After finishing the batch file, the
  85. server looks for a file named RESULTS.PDX and sends this file to the client.
  86. And here comes the trick: the server sends this file as a list of files to 
  87. the client (and the contents of the file must be valid Gopher info). As the
  88. Gopher server executes the search engine, this file may be modified by the
  89. search engine. Or the file(s) specified in RESULT.PDX may change after each
  90. execution of the search engine.
  91.  
  92. Here is a sample batch file DOSEARCH.BAT, which returns a directory list of
  93. all requested files on my machine:
  94.  
  95. REM dosearch.bat for Gunter's PC
  96. DIR %1 > RESULTS.DIR
  97. COPY DUMMY.PDX RESULTS.PDX
  98.  
  99. where DUMMY.PDX contains the following Gopher info line:
  100.  
  101. 0Directory search results<TAB>0\RESULTS.DIR<TAB>134.100.9.161<TAB>70
  102.  
  103. A path to a file must be specified absolute, because the server changes
  104. it's working directory after each request from the client.
  105.  
  106. The server writes all requests to a logfile GOPHSERV.LOG. The format of this
  107. file is in QUIS-format (described in PXCREATE.DOC). It can easily be
  108. converted and then analyzed by database programs like PARADOX or DBASE.
  109.  
  110.  
  111. Known bugs:
  112.  
  113. The server is unable to report the internet address of the caller, this might
  114. be a bug in the TCP/IP lib of the UoM or it may be just my unability to 
  115. understand it. I hope to fix this soon.
  116.  
  117.  
  118. The server is available via anonymous ftp from 
  119.  
  120.     ftp.informatik.uni-hamburg.de
  121.  
  122.  
  123. Caveat!!!
  124.  
  125. The Gopher server allows remote users to execute programs on your machine
  126. (like the batch program shown above). There is no security on accessing
  127. files or executing batchfiles. When a naughty client requests such a file
  128. or batch program, he can inspect any file he wants or execute any batch
  129. procedure, if he has information or guesses about the location of these
  130. files. Even worse, if he is doing a TELNET session to the Gopher port,
  131. he can send the DOS-command "DELETE *.*". So please, don't use it on the
  132. Internet (there are enough Gophers running on more powerful machines than
  133. a PC). On the other side, this Gopher server gives you the ability of
  134. remote program execution in a network.
  135.  
  136. The possibilities you will get by such an universal GOPHER server
  137. will - hopefully - outnumber the evil doings.
  138.  
  139.  
  140.  
  141. Remarks (15-FEB-1993):
  142.  
  143. I added a security option to the distributed version 1.13 of the PC Gopher
  144. server. Executable programs must be listed in a file GOPHPROG.DAT, this
  145. file will be read at startup. Only program names (no extension) appearing
  146. in this list may be executed by the server. So it is up to you giving
  147. your server the necessary security.
  148.  
  149.  
  150. Please send comments and bug reports to:
  151.  
  152.     hille@informatik.uni-hamburg.de
  153.  
  154.  
  155. Gunter Hille
  156. Computer Science Dept.
  157. University Hamburg
  158. Vogt-Koelln-Str. 30
  159. D-2000 Hamburg 54
  160. Germany
  161.