(Licentie: uitsluitend voor WHT leden)Code:#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket;
use Net::Whois::Proxy;
my $d;my $w;
my $use_fork = 1;
my $sock = new IO::Socket::INET (
LocalHost => '127.0.0.1',
LocalPort => '43',
Proto => 'tcp',
Listen => 1,
Reuse => 1,
)
or die "socket: $!";
$SIG{CHLD} = 'IGNORE' if $use_fork;
while (1) {
my $con = $sock->accept()
or die "accept: $!";
fork and next if $use_fork;
my $domain = "is " . <$con> ;
$d = `whois -h whois.domain-registry.nl $domain`;
print $con $d;
last if $use_fork;
}
dit maakt een normale whois service op localhost, dat alles vertaald naar een IS request naar SIDN

