RE: DNS Lookup

2003-06-11 Thread Bob Showalter
Airman wrote: > Does anyone know how to reference different DNS servers when > using gethostbyname. I want to check up to three different > nameserver for consistency checking. Use Net::DNS module instead. gethostbyname() isn't really designed for that kind of thing. -- To unsubscribe, e-mail: [

RE: DNS Lookup

2003-06-10 Thread Dan Muey
I think gethostbyname uses the nameservers listed in /etc/resolv.conf but what does that have to do with perl? try man gethostbyname HTH > -Original Message- > From: Airman [mailto:[EMAIL PROTECTED] > Sent: Monday, June 09, 2003 6:34 PM > To: [EMAIL PROTECTED] > Subj

DNS Lookup

2003-06-10 Thread Airman
Does anyone know how to reference different DNS servers when using gethostbyname. I want to check up to three different nameserver for consistency checking. Thanks, Glen

Re: DNS lookup

2002-03-19 Thread William.Ampeh
Thank you Oliver. This is what I want. It is faster than my nslookup script. Thank you. __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DNS lookup

2002-03-19 Thread Oliver Andrich
Hi, whats wrong with using gethostbyaddr from the Socket package? A lot easier, faster and slicker. Have you looked at this? perldoc -f gethostbyaddr use Socket; sub dnsLookup { my $ip = shift; $iaddr = inet_aton($ip); # or whatever address $name = gethostbyaddr($

RE: DNS lookup

2002-03-19 Thread William.Ampeh
Can anyone tell me how to perform a dns lookup using perl? I am using nslookup, what is a better way to do this? Here is a snippet of my code : #!/opt/local/bin/perl %dns = &NSLOOKUP($ARGV[0]); print "\n ip = $dns{Address} host = $dns{

RE: DNS lookup

2002-03-18 Thread Timothy Johnson
I think you can use gethostbyaddr() for this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 1:19 PM To: [EMAIL PROTECTED] Subject: DNS lookup I need to find a way to do a DNS lookup of a list of ips (at least 250 entries), get their

DNS lookup

2002-03-18 Thread William.Ampeh
I need to find a way to do a DNS lookup of a list of ips (at least 250 entries), get their corresponding hostnames and produce a report. It sounds very simple, an I implemented it with "nslookup ip" (loop for 250 times). I tried "host -al" (which produces a long list of hos