Created
August 21, 2012 06:46
-
-
Save guerrerocarlos/3412745 to your computer and use it in GitHub Desktop.
Python Whois Robot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import subprocess | |
archivo = open("disponibles","a") | |
for LENGTH in range(3,8): | |
a = itertools.product("ABCDEFGHIJKLMNOPQRSTUVWXYZ",repeat=LENGTH) | |
for each in a: | |
domain = "".join(each)+".com" | |
print domain | |
pos = " ".join(subprocess.Popen(['whois', domain], stdout=subprocess.PIPE).stdout.readlines()).find("No match") | |
if pos > -1: | |
print "DISPONIBLE" | |
archivo.write(domain+",DISPONIBLE\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment