What do you mean by 'whois a hostmask'? You can't perform a whois on a hostmask as far as I know. What kind of information are you looking to retrieve?