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