Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

dns resolver tool

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2004, 09:59 PM
Default dns resolver tool



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
Reply With Quote
  #2  
Old 10-07-2004, 10:56 PM
Innocenti Maresin
Guest
 
Posts: n/a
Default Re: dns resolver tool

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
\ /_/ /
\____/



Reply With Quote
  #3  
Old 10-08-2004, 02:08 AM
ynotssor
Guest
 
Posts: n/a
Default Re: dns resolver tool

"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

Reply With Quote
  #4  
Old 10-08-2004, 02:30 AM
Tony
Guest
 
Posts: n/a
Default Re: dns resolver tool

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
> \ /_/ /
> \____/
>
>
>



Reply With Quote
  #5  
Old 10-08-2004, 06:17 PM
Michael Heiming
Guest
 
Posts: n/a
Default Re: dns resolver tool

-----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-----
Reply With Quote
  #6  
Old 10-09-2004, 09:07 PM
Stachu 'Dozzie' K.
Guest
 
Posts: n/a
Default Re: dns resolver tool

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
Reply With Quote
  #7  
Old 10-09-2004, 09:11 PM
Stachu 'Dozzie' K.
Guest
 
Posts: n/a
Default Re: dns resolver tool

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
Reply With Quote
Reply

Tags
dns, resolver, tool

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:52 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.