Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: DNS Resolution4

by KM (Priest)
on Apr 25, 2001 at 21:34 UTC ( #75551=note: print w/ replies, xml ) Need Help??


in reply to DNS Resolution4

I use this little script for checking IPs I get in SPAM headers to make sure I email the correct abuse@* addresses:

#!/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


Comment on Re: DNS Resolution4
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://75551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-08-01 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls