home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / gopher / 1035 < prev    next >
Encoding:
Text File  |  1992-07-21  |  3.4 KB  |  90 lines

  1. Newsgroups: alt.gopher
  2. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!schemers
  3. From: schemers@leland.Stanford.EDU (Roland Schemers)
  4. Subject: Re: Better Gopher->whois script available
  5. Message-ID: <1992Jul22.041826.1120@leland.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Organization: Distributed Computing Group, Stanford University
  8. References: <199207220129.AA25891@mudhoney.micro.umn.edu>
  9. Distribution: alt
  10. Date: Wed, 22 Jul 92 04:18:26 GMT
  11. Lines: 77
  12.  
  13. In article <199207220129.AA25891@mudhoney.micro.umn.edu> lindner@boombox.micro.umn.edu. writes:
  14. >As an example of what can be shoehorned into the old types I've
  15. >reimplemented Roland Schemers gophertowhois script, using direct
  16. >connections to whois servers, and also made it possible to service
  17. >multiple whois servers with one script.  I've also added parsing to
  18. >make more whois servers directly browsable.
  19.  
  20. Of course by using type '7' and making everyone go through mudhoney
  21. you are increasing traffic by:
  22.  
  23. client "qwhois host query"  -> mudhoney
  24. mudhoney "query"            -> whois server 
  25. whois server "whois output" -> mudhoney
  26. mudhoney "dir result"       -> client
  27. client "give me raw result" -> mudhoney
  28. mudhoney "query"            -> whois server 
  29. whois server "whois output" -> mudhoney
  30. mudhoney "whois output"     -> client
  31.  
  32. Quite a lot of work if we just want to see one match :-) 
  33.  
  34. Even though its nice to get back a list when there are multiple
  35. matches, it shows a drawback of using type 7. The whois server
  36. must be contacted twice to get the information. It might not be
  37. a big deal in the case of whois (or then again...), but when it 
  38. comes to some intensive operation its a pain to force it to happen 
  39. twice just because '7' wants to return a dir. Of course a hack
  40. could be used to save the output to a "temp" file and then
  41. have the client request that file, but it gets ugly :-)
  42.  
  43. >then parses the resulting output.  The script understands a few of the
  44. >more popular whois-gateways, including:
  45. >
  46.  
  47. It doesn't work for "schemers" though :-(
  48.  
  49. There is only one match for schemers, but to your script it looks
  50. like a CSO gateway type.
  51.  
  52. Even though our whois output might seem strange, its very easy to
  53. parse. The logic from the one I posted checks the last line of whois output.
  54. If it is blank, then there was one match. If it ends with:
  55.  
  56. (returned N entries)
  57.  
  58. Then there were N  matches. If it ends with "NO MATCH" then there
  59. was no match.
  60.  
  61. We also have all computers, IP addresses, etc in the whois database:
  62.  
  63. whois slapshot.stanford.edu
  64. whois 36.53.0.16
  65.  
  66. Both show information about my computer.
  67.  
  68. Since there is no "standard" whois output, this effort may be
  69. more difficult then at first glance.
  70.  
  71. For example, try it with "william smith" at MIT. It returns 3 users. If you
  72. select the first 2 you get the raw output, if you select the 3rd
  73. you get no match.
  74.  
  75. Maybe the best approach is to run through the output once, looking
  76. for distinguishing features in the output. After making a good
  77. guess at which type it is, then make a second pass using a more
  78. detailed approach. A more detailed analysis of the various whois 
  79. servers maybe in order.
  80.  
  81. Roland
  82.  
  83.  
  84.  
  85. -- 
  86. Roland J. Schemers III              |            Networking Systems
  87. Systems Programmer                  |            168 Pine Hall   (415)-723-6740
  88. Distributed Computing Group         |            Stanford, CA 94305-4122
  89. Stanford University                 |            schemers@Slapshot.Stanford.EDU
  90.