Is there any way how to improve scripts verification speed? Or there is another (not a sw) solution?
I tried something like this (but its slow and useless):
import urllib
from socket import *
import string, re
strings = string.ascii_lowercase
digits = string.digits
def validate(url):
try:
targetIP = gethostbyname(url)
print url,' - Registered - ', targetIP
except:
print url," - Free"
def generate(url):
for x in strings:
url_mod = "www."+ x + url
validate(url_mod)
generate("atrion.com")
Your speed problem comes from looking up the domain in the DNS, not from Python.
I would try configuring my system to use a different DNS server, like the Google Public DNS. Note that this is a system-level configuration, not a Python configuration. You can find a link to configuration instructions on that page.
Note also that if you are making a lot of such queries, Google might interpret it as a denial-of-service attack and cut you off. Just FYI.