I have this DNS script (From the List) & it works great!  I also have script that pings a range of IP address & puts the results to a file Class.txt.  What I would like to do is run the IP finder, then the DNS script to resolve the computer name via the IP.  I want the DNS script to read the class.txt file to get the IP address. then redirect the info to a file.

Can anyone help?

Thanks

Leo D

##DNS Script##

use Socket;

my $target = shift || die "Must provide a hostname or IP address\n";
my($ip);

$ip = inet_ntoa(inet_aton($target));
print "Target:\t\t$target\n";
print "IP:\t\t$ip\n";
my ($name,$alias,$addrtype,$length,$new_addr) =
   gethostbyaddr(inet_aton($ip),AF_INET) || die "Could not
find host:  $!\n";
print "Hostname:\t$name\n" if ($name ne $target);
print "Alias:\t$alias\n" if ($alias ne "");



Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.

Reply via email to