nanog mailing list archives

Re: WHOIS source? (fwd)


From: Steve Sobol <sjsobol () NorthShoreTechnologies net>
Date: Fri, 23 Jun 2000 19:03:46 -0400


System Administrator wrote:

oops, forgot the signal & timer, so here it is..

#!/usr/bin/perl5 -
eval {
  $SIG{'INT'}= 'exit'; # exit on any funny business
  alarm(30); # watchdog timer
  chomp($query=<>);
  dbmopen(%whois,"whoisdatabase",undef);
  $answer=$whois{$query}||"what's that?\r\n";
  dbmclose(%whois);
  print($answer);
}
__END__

ps: im using the free mysql db from www.mysql.com for this under fbsd 4.0

I am using MySQL too. Having looked at some of the source code, I've
decided it will be easier to maintain code I wrote myself - my needs
are very basic.

--
North Shore Technologies, Cleveland, OH 
http://NorthShoreTechnologies.net
Steve Sobol, BOFH - President, Chief Website Architect and Janitor
Spammers and Net-abusers: Don't bother asking me for service. See
http://NorthShoreTechnologies.net/go/policy/ for more information.



Current thread: