Thread Whois mit Parametern verkürzt länge des Domainnamens
(7 answers)
Opened by wiesensurfer at 2011-10-04 08:30
Hab grad eins rumliegen ;)
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #!/usr/bin/perl ########################################################################### use strict; use IO::Socket; my $domain = 'selfhtml.org'; my $ip = gethostbyname($domain); # 32 bit network order #$ip = inet_ntoa($ip); $ip = join(".", unpack('CCCC', $ip)); # same as above ;) binmode STDOUT; my $sock = IO::Socket::INET->new('whois.publicinterestregistry.net:whois') or die "no socket"; print "\n======= DENIC ==========================\n"; print $sock "$domain\n"; print $_ while <$sock>; print "\n======= RIPE ===========================\n"; $sock = IO::Socket::INET->new('whois.ripe.net:whois') or die "no socket"; print $sock "$ip\n"; print $_ while <$sock>; |