|
||||||||
|
|
#1
|
|
I got a file with like 2000 ip addresses. one ip on each line. Is there a
dns resolver tool to get me the Full DNS name of this file? Tony |
|
#2
|
|||
|
|||
|
Tony wrote:
> I got a file with like 2000 ip addresses. one ip on each line. Is there a > dns resolver tool to get me the Full DNS name of this file? #!/usr/bin/perl -n use Socket; chomp; print gethostbyaddr(inet_aton($_),AF_INET) . "\n"; -- qq~~~~\ [ úá IP âĺú ăĺîúőňů ] / /\ \ [ FAQ you ] € http://www.comtv.ru/~av95/chainik.html \ /_/ / \____/ |
|
#3
|
|||
|
|||
|
"Tony" <(E-Mail Removed)> wrote in message
news:ck4an5$j4d$(E-Mail Removed) > I got a file with like 2000 ip addresses. one ip on each line. Is > there a dns resolver tool to get me the Full DNS name of this file? While the other response you received is very simple and elegant, I prefer the recursive functionality offered by http://jdrowell.com/projects/jdresolve tony -- use hotmail for email replies |
|
#4
|
|||
|
|||
|
how do i make it read the file?
one ip address per line "Innocenti Maresin" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > Tony wrote: > >> I got a file with like 2000 ip addresses. one ip on each line. Is there a >> dns resolver tool to get me the Full DNS name of this file? > > #!/usr/bin/perl -n > use Socket; > chomp; > print gethostbyaddr(inet_aton($_),AF_INET) . "\n"; > > > -- > qq~~~~\ [ úá IP âĺú ăĺîúőňů ] > / /\ \ [ FAQ you ] € http://www.comtv.ru/~av95/chainik.html > \ /_/ / > \____/ > > > |
|
#5
|
|||
|
|||
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message In comp.os.linux.networking Tony <(E-Mail Removed)>: > I got a file with like 2000 ip addresses. one ip on each line. Is there a > dns resolver tool to get me the Full DNS name of this file? while read ip;do host $ip;done < file -- Michael Heiming (GPG-Key ID: 0xEDD27B94) mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBZsupAkPEju3Se5QRAtF0AJ9VwuKOFJQiIgQgR6ma+8 iOcc4kKgCgt0t3 lsc9tiEUnuTJASSFVQxsAIE= =Mg+H -----END PGP SIGNATURE----- |
|
#6
|
|||
|
|||
|
On 2004-10-08, Tony wrote:
>>> I got a file with like 2000 ip addresses. one ip on each line. Is there a >>> dns resolver tool to get me the Full DNS name of this file? >> >> #!/usr/bin/perl -n >> use Socket; >> chomp; >> print gethostbyaddr(inet_aton($_),AF_INET) . "\n"; > how do i make it read the file? > > one ip address per line #v+ cat > file.pl << EOF #!/usr/bin/perl -n use Socket; chomp; print gethostbyaddr(inet_aton($_),AF_INET) . "\n"; EOF chmod a+x file.pl ../file.pl /some/where/file/with.ip.one.perl.line #v- PS. Don't toppost and cut the signatures. -- Stanislaw Klekot |
|
#7
|
|||
|
|||
|
On 2004-10-07, Tony wrote:
> I got a file with like 2000 ip addresses. one ip on each line. Is there a > dns resolver tool to get me the Full DNS name of this file? nslookup < file.with.ips > result -- Stanislaw Klekot |
![]() |
| Tags |
| dns, resolver, tool |
| Thread Tools | |
| Display Modes | |
|
|