Created
June 16, 2015 21:05
-
-
Save ekkis/cb956423c8d89549b6ad to your computer and use it in GitHub Desktop.
Checks a list of domains or e-mail addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Socket; | |
$\ = $/; | |
$debug = 1; | |
@d = @ARGV; | |
unless (@d) { | |
print "Enter a list of domains or e-mail addresses to be checked, one per line:"; | |
chomp(@d = <>); | |
} | |
for (@d) { | |
s/.*@// if /\@/; | |
$ret = gethostbyname($_); | |
print "$_: " . inet_ntoa($ret) if $debug && $ret; | |
exit 1 unless defined $ret; | |
} | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment