I got this error a little later, when the script was already running for a while:
Error Connecting To Server: whois.crsnic.net
Maybe you should not use "whois" but just a simple "host" or "ping" to resolve whether or not a domain is free. When in doubt, you can still do an "whois", but for a heuristic approach, it would be waaay faster.
Faster, but inaccurate. There are plenty of domains that are registered, but the DNS doesn't resolve. That doesn't mean they are available to register!
When I wrote a domain searcher script what I did was filter first by names that return are resolvable, and then whois the remainder. Reduces load on the dependent whois server whose terms of service usually say "don't run scripts against me"
That's exactly the approach I tried to suggest: Find as many correct replies first, because there certainly are hosts which names can be resolved and try the whois-approach on everything else.
Error Connecting To Server: whois.crsnic.net
Maybe you should not use "whois" but just a simple "host" or "ping" to resolve whether or not a domain is free. When in doubt, you can still do an "whois", but for a heuristic approach, it would be waaay faster.