-
-
Save rmoriz/59d1215b347cf06a11a403818e42936f to your computer and use it in GitHub Desktop.
IPv6-Erhebung am Hochtechnologiestandort Deutschland.
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 -w | |
use strict; | |
use diagnostics; | |
use Net::DNS; | |
print "IPv6-Erhebung am Hochtechnologiestandort Deutschland.\n\n"; | |
print "Es wurden die Homepages der DAX-Unternehmen auf IPv6-Support untersucht.\n\n"; | |
printf "%-35s %s\n", 'Hostname', 'IPv6-Adresse'; | |
printf "%-35s %s\n", '--------', '------------'; | |
my $list = <<End; | |
www.adidas.com | |
www.allianz.de | |
www.basf.com | |
www.bayer.de | |
www.beiersdorf.de | |
www.bmw.de | |
www.commerzbank.de | |
www.daimler.com | |
www.db.com | |
deutsche-boerse.com | |
www.telekom.de | |
www.eon.de | |
www.fmc-ag.de | |
www.fresenius.de | |
www.heidelbergcement.com | |
www.henkel.de | |
www.infineon.com | |
www.k-plus-s.com | |
www.the-linde-group.com | |
www.lufthansa.com | |
www.man.de | |
www.merck.de | |
www.metro24.de | |
www.munichre.com | |
www.rwe.de | |
www.sap.com | |
www.siemens.com | |
www.thyssenkrupp.com | |
www.volkswagenag.com | |
www.google.de | |
www.facebook.com | |
www.sixxs.net | |
www.he.net | |
www.microsoft.com | |
www.apple.com | |
End | |
my @hosts = split /\n/, $list; | |
my $res = Net::DNS::Resolver->new(); | |
foreach my $host (@hosts){ | |
my $ip6addr = '-'; | |
my $query = $res->search($host, 'AAAA'); | |
if ($query){ | |
foreach my $rr ($query->answer){ | |
next unless $rr->type eq 'AAAA'; | |
$ip6addr = $rr->address; | |
} | |
} | |
printf "%-35s: %s\n", $host, $ip6addr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment