home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.gopher
- Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!schemers
- From: schemers@leland.Stanford.EDU (Roland Schemers)
- Subject: Re: Better Gopher->whois script available
- Message-ID: <1992Jul22.041826.1120@leland.Stanford.EDU>
- Sender: news@leland.Stanford.EDU (Mr News)
- Organization: Distributed Computing Group, Stanford University
- References: <199207220129.AA25891@mudhoney.micro.umn.edu>
- Distribution: alt
- Date: Wed, 22 Jul 92 04:18:26 GMT
- Lines: 77
-
- In article <199207220129.AA25891@mudhoney.micro.umn.edu> lindner@boombox.micro.umn.edu. writes:
- >As an example of what can be shoehorned into the old types I've
- >reimplemented Roland Schemers gophertowhois script, using direct
- >connections to whois servers, and also made it possible to service
- >multiple whois servers with one script. I've also added parsing to
- >make more whois servers directly browsable.
-
- Of course by using type '7' and making everyone go through mudhoney
- you are increasing traffic by:
-
- client "qwhois host query" -> mudhoney
- mudhoney "query" -> whois server
- whois server "whois output" -> mudhoney
- mudhoney "dir result" -> client
- client "give me raw result" -> mudhoney
- mudhoney "query" -> whois server
- whois server "whois output" -> mudhoney
- mudhoney "whois output" -> client
-
- Quite a lot of work if we just want to see one match :-)
-
- Even though its nice to get back a list when there are multiple
- matches, it shows a drawback of using type 7. The whois server
- must be contacted twice to get the information. It might not be
- a big deal in the case of whois (or then again...), but when it
- comes to some intensive operation its a pain to force it to happen
- twice just because '7' wants to return a dir. Of course a hack
- could be used to save the output to a "temp" file and then
- have the client request that file, but it gets ugly :-)
-
- >then parses the resulting output. The script understands a few of the
- >more popular whois-gateways, including:
- >
-
- It doesn't work for "schemers" though :-(
-
- There is only one match for schemers, but to your script it looks
- like a CSO gateway type.
-
- Even though our whois output might seem strange, its very easy to
- parse. The logic from the one I posted checks the last line of whois output.
- If it is blank, then there was one match. If it ends with:
-
- (returned N entries)
-
- Then there were N matches. If it ends with "NO MATCH" then there
- was no match.
-
- We also have all computers, IP addresses, etc in the whois database:
-
- whois slapshot.stanford.edu
- whois 36.53.0.16
-
- Both show information about my computer.
-
- Since there is no "standard" whois output, this effort may be
- more difficult then at first glance.
-
- For example, try it with "william smith" at MIT. It returns 3 users. If you
- select the first 2 you get the raw output, if you select the 3rd
- you get no match.
-
- Maybe the best approach is to run through the output once, looking
- for distinguishing features in the output. After making a good
- guess at which type it is, then make a second pass using a more
- detailed approach. A more detailed analysis of the various whois
- servers maybe in order.
-
- Roland
-
-
-
- --
- Roland J. Schemers III | Networking Systems
- Systems Programmer | 168 Pine Hall (415)-723-6740
- Distributed Computing Group | Stanford, CA 94305-4122
- Stanford University | schemers@Slapshot.Stanford.EDU
-