Re: PERL DNS Lookup's using Socket

2003-09-29 Thread Dan Anderson
I don't know if you've been following the news but Verisign and some
others have funneled *.com and *.net to their web site for expired and
invalid domain names.  You should correct for such things when looking
up the IP.

-Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PERL DNS Lookup's using Socket

2003-09-27 Thread Airman
I'm using the following PERL code to do some DNS queries. Anyone know how to
specify what dns or nameserver to use instead of what is in
/etc/resolv.conf (unix)? Or is there a better way in PERL?

MAIN:
{
use Socket;

# Get Server IP Address of domain name
$host=gethostbyname($domainname);
$ipaddr=join('.', unpack('C4', $host));

# Get Server's primary domain name
($a,$b,$c,$d)=split(/\./, $ipaddr);
$dnsname=pack('C4',($a,$b,$c,$d));
($dnsname,$a,$b,$c,$d)=gethostbyaddr($dnsname, AF_INET);

??? validate from some other name server ???

Thanks,
Glen



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PERL DNS Lookup's using Socket

2003-09-27 Thread George Schlossnagle
On Saturday, September 27, 2003, at 03:47  PM, Airman wrote:

I'm using the following PERL code to do some DNS queries. Anyone know 
how to
specify what dns or nameserver to use instead of what is in
/etc/resolv.conf (unix)? Or is there a better way in PERL?
You can't specify it if you're using gethostbyname(), that uses the 
systems name resolution facilities which will use your resolv.conf 
settings.  You might try using the CPAN module Net::DNS for some 
additional flexibility.

George

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]