Nice useful code Gummo :) You could definitely improve this by halting all possible output from the whois call.