Networking Forums

Networking Forums > Computer Networking > Linux Networking > dns resolver tool

Reply
Thread Tools Display Modes

dns resolver tool

 
 
Tony
Guest
Posts: n/a

 
      10-07-2004, 08:59 PM
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?


 
Reply With Quote
 
 
 
 
Innocenti Maresin
Guest
Posts: n/a

 
      10-07-2004, 09:56 PM
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
 
ynotssor
Guest
Posts: n/a

 
      10-08-2004, 01:08 AM
"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
 
Tony
Guest
Posts: n/a

 
      10-08-2004, 01:30 AM
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
 
Michael Heiming
Guest
Posts: n/a

 
      10-08-2004, 05:17 PM
-----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
 
Stachu 'Dozzie' K.
Guest
Posts: n/a

 
      10-09-2004, 08:07 PM
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
 
Stachu 'Dozzie' K.
Guest
Posts: n/a

 
      10-09-2004, 08:11 PM
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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CacheHashTableSize to increase size of DNS resolver cache Ratchel Myers Windows Networking 1 04-29-2010 09:56 PM
Setting up of local resolver Alexander Krizhanovsky Linux Networking 6 07-30-2007 04:05 PM
DNS resolver does not work Ib Tornøe Windows Networking 4 09-11-2006 06:56 AM
DNS Resolver Ross Windows Networking 1 01-23-2004 11:26 PM
dns resolver danny tew Windows Networking 0 10-24-2003 05:45 PM



1 2 3 4 5 6 7 8 9 10 11