#!/usr/bin/perl -w use strict; use Socket; my $ip = $ARGV[0] || undef; unless ($ip) { print "What is the IP?\n"; $ip = <STDIN>; chomp $ip; } die "No IP given\n" if !$ip; print "Finding host for $ip...\n"; my $iaddr = inet_aton($ip); my $name = gethostbyaddr($iaddr, AF_INET) || "NO DATA"; print "$ip is $name\n";
Cheers,
KM
In reply to Re: DNS Resolution4
by KM
in thread DNS Resolution4
by muaddib2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |